ropensci / rdatacite

Wrapper to DataCite metadata
https://docs.ropensci.org/rdatacite
Other
25 stars 3 forks source link

new method for citation.crosscite.org #22

Open sckott opened 6 years ago

sckott commented 6 years ago

https://citation.crosscite.org/

rkrug commented 3 years ago

Now this would be what I am looking for... Is there another way of formatting the returned data from dc_dois() as citations?

sckott commented 3 years ago

i should probably close this issue - this is i believe already handled in rcrossref::cr_cn() - let me know if that works for you

rkrug commented 3 years ago

Yes - it does mainly.

But I have some cases, where the DOIs are only in crossref, and others only in datacite. So my approach is to get both and than merge them. In my case, crossref covers 38 of 40 DOIs, except of two ZENODO based DOIs (https://doi.org/10.5281/zenodo.50213 and https://doi.org/10.5281/zenodo.57081).

Is there a similar function for datacite?

sckott commented 3 years ago

thanks for the details. but i get:

cr_cn(c("10.5281/zenodo.50213", "10.5281/zenodo.57081"))
#> [[1]]
#> [1] "@article{https://doi.org/10.5281/zenodo.50213,\n  doi = {10.5281/ZENODO.50213},\n  url = {https://zenodo.org/record/50213},\n  author = {Petchey, Owen and Plebani, Marco and Pennekamp, Frank},\n  keywords = {Ecology, FOS: Biological sciences, Forecasting, Prediction, Chaos, Nonlinear dynamics, Plankton community, Species interactions},\n  title = {[Re] Chaos In A Long-Term Experiment With A Plankton Community},\n  publisher = {Zenodo},\n  year = {2016},\n  copyright = {Creative Commons Attribution 4.0}\n}\n"
#> 
#> [[2]]
#> [1] "@misc{https://doi.org/10.5281/zenodo.57081,\n  doi = {10.5281/ZENODO.57081},\n  url = {https://zenodo.org/record/57081},\n  author = {Petchey, Owen L.},\n  keywords = {Forecasting, nonlinear, time-series, Sugihara, embedding, dynamics},\n  title = {Simplex Projection Walkthrough},\n  publisher = {Zenodo},\n  year = {2016},\n  copyright = {Creative Commons Attribution 4.0}\n}\n"

Can you clarify where you aren't getting data for these two DOIs?

sckott commented 3 years ago

see also https://docs.ropensci.org/rcrossref/reference/cr_cn.html#arguments - the url parameter and the examples on that page, you can set the base url for content negotiation

rkrug commented 3 years ago

My problem comes in when I want to use the text format

rcrossref::cr_cn(c("10.5281/zenodo.50213", "10.5281/zenodo.57081"), format = "text”)

also, I want to get the complete metadata:

> rcrossref::cr_works(c("10.5281/zenodo.50213", "10.5281/zenodo.57081"))
$meta
NULL

$data
# A tibble: 0 x 0

$facets
NULL

Warning messages:
1: 404 (client error): /works/10.5281/zenodo.50213 - Resource not found.
2: 404 (client error): /works/10.5281/zenodo.57081 - Resource not found.
3: Unknown or uninitialised column: `doi`.
4: Unknown or uninitialised column: `doi`.

versus

> rdatacite::dc_dois(c("10.5281/zenodo.50213", "10.5281/zenodo.57081"))
datacite: dois
found: 2, pages: 1, page: 1
slots: data, meta, links
$data
# A tibble: 2 x 4
  id    type  attributes$doi $identifiers $creators $titles $publisher
  <chr> <chr> <chr>          <list>       <list>    <list>  <chr>
1 10.5… dois  10.5281/zenod… <list [0]>   <df[,5] … <df[,1… Zenodo
2 10.5… dois  10.5281/zenod… <list [0]>   <df[,5] … <df[,1… Zenodo
# … with 42 more variables: $container <df[,0]>, $publicationYear <int>,
#   $subjects <list>, $contributors <list>, $dates <list>, $language <lgl>,
#   $types$ris <chr>, $$bibtex <chr>, $$citeproc <chr>, $$schemaOrg <chr>,
#   $$resourceTypeGeneral <chr>, $$resourceType <chr>,
#   $relatedIdentifiers <list>, $sizes <list>, $formats <list>, $version <lgl>,
#   $rightsList <list>, $descriptions <list>, $geoLocations <list>,
#   $fundingReferences <list>, $url <chr>, $contentUrl <lgl>,
#   $metadataVersion <int>, $schemaVersion <chr>, $source <lgl>,
#   $isActive <lgl>, $state <chr>, $reason <lgl>, $viewCount <int>,
#   $downloadCount <int>, $referenceCount <int>, $citationCount <int>,
#   $partCount <int>, $partOfCount <int>, $versionCount <int>,
#   $versionOfCount <int>, $created <chr>, $registered <chr>, $published <chr>,
#   $updated <chr>, relationships$client$data$id <chr>, $$$type <chr>

$included
NULL
sckott commented 3 years ago

also, I want to get the complete metadata:

i'm not sure i follow. what is your question on that topic?

sckott commented 3 years ago

reinstall remotes::install_github("ropensci/rdatacite") - added new fxn dc_cn to use datacite's content negotation