RESQUE-Framework / website

The Research Quality Evaluation Scheme
https://resque-framework.github.io/website/
MIT License
2 stars 3 forks source link

normalize dois #82

Closed nicebread closed 4 months ago

nicebread commented 4 months ago

Applicants enter the dois in strange (though valid) formats. Can you normalize the dois after they have been entered? I use this function in R; this captures all errors I have encountered so far:

  library(stringr)
    dois |>
        str_trim() |>
        str_replace("dx.doi.org", "doi.org") |>
        str_replace("http:", "https:") |>
        str_replace("^10.", "https://doi.org/10.") |>
        str_to_lower()
alpkaanaksu commented 4 months ago
const publicationInformation = await fetchInformationUsingDOI(doi);
// ...         
currentResult.DOI = publicationInformation.DOI;

So we actually use the DOI returned from doi.org (10. ...), but we don't include "https://doi.org/" in front of the DOI. (I will change this)

@nicebread Are you sure that the data you were using were not created before we switched to fetching title and publication year automatically?

nicebread commented 4 months ago

Yeah, probably they were created before