Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try write_dwc() on non-Zenodo dataset #25

Closed
peterdesmet opened this issue May 13, 2022 · 11 comments
Closed

Try write_dwc() on non-Zenodo dataset #25

peterdesmet opened this issue May 13, 2022 · 11 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@peterdesmet
Copy link
Member

@sarahcd do you have a good example dataset in the Movebank repository that I can use to test if the write_dwc() function handles it elegantly?

@peterdesmet peterdesmet added the help wanted Extra attention is needed label May 13, 2022
@peterdesmet
Copy link
Member Author

@sarahcd in 2016 you suggested http://dx.doi.org/10.5441/001/1.sj8t3r11 (peterdesmet/movebank2gbif#4 (comment)). Maybe that is still a good one?

@sarahcd
Copy link
Collaborator

sarahcd commented May 19, 2022

Yes that one still looks good! Once we confirm that our current examples are working, when I read through the vignette, I can try to think of studies with other variations we should try it on.

@peterdesmet
Copy link
Member Author

Great, here's what I did:

library(frictionless)
library(movepub)
library(dplyr)

package <-
  create_package() %>%
  movepub::add_resource("reference-data", "https://www.datarepository.movebank.org/bitstream/handle/10255/move.488/Lesser%20Kestrels%20EBD-reference-data.csv?sequence=1") %>%
  movepub::add_resource("gps", "https://www.datarepository.movebank.org/bitstream/handle/10255/move.487/Lesser%20Kestrels%20EBD.csv?sequence=1")

write_package(package, "kestrels") # Save datapackage.json file
write_dwc(package, directory = "kestrels", doi = "https://doi.org/10.5441/001/1.sj8t3r11")
#> Creating EML metadata.
#> Reading data from `package`.
#> Creating database and transforming to Darwin Core.

Created on 2022-05-20 by the reprex package (v2.0.1)

Works fine, but can you verify the resulting (meta)data:

@sarahcd
Copy link
Collaborator

sarahcd commented Aug 19, 2022

I also added rightsHolder and contact as described in the vignette. Noticed that in the eml, the contact seems to map to metadataProvider and contact. For the use case of publishing data from the Movebank Repository, these might differ, e.g., the corresponding researcher for the contact and the repository/curator as the metadataProvider. Otherwise everything looks good, I will try some more examples and update if I find other things to consider.

@peterdesmet
Copy link
Member Author

Correct, the provided contact maps to metadataProvider and contact. I think it's a fair simplification over providing an extra argument in the function, and it is documented as such in the function https://inbo.github.io/movepub/reference/write_dwc.html#arguments

Any of the provided values can be changed in the IPT afterwards if need be.

@sarahcd
Copy link
Collaborator

sarahcd commented Aug 22, 2022

One other comment: For datasets from the data repository, the link to the Movebank study is not in the DataCite metadata, so it is missing from the eml (it shows "deposit of Movebank study "). Until we get this added, is there a line of code I could use to define the link in R?

@peterdesmet
Copy link
Member Author

Indeed, the study URL is pulled from the second alternativeIdentifier in the EML:

study_url <- eml$dataset$alternateIdentifier[[2]]

To allow users to define it, we could:

  • Add a parameter study_id (from which the link can be build)
  • Have users correct add this when they edit metadata in the IPT

Given that the link is used in the description and as external link, I think a parameter would be good?

@sarahcd
Copy link
Collaborator

sarahcd commented Aug 31, 2022

I agree!

@peterdesmet
Copy link
Member Author

Ok, recorded in separate issue. Any other remarks regarding trying write_dwc() on non-Zenodo datasets?

@sarahcd
Copy link
Collaborator

sarahcd commented Sep 1, 2022

Everything else worked well on 3 GPS studies I tried it with.

@peterdesmet
Copy link
Member Author

Excellent, will close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants