Skip to content

Commit c0b1dde

Browse files
committed
Rerun update with knitr (2022-09-03 for preprints posted up until 2022-08-28)
1 parent becfb17 commit c0b1dde

13 files changed

+11
-6
lines changed

covid19_preprints.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ processed further to extract the needed information.
440440
```r
441441
parseDataCiteDescription<-function(x) {
442442
if(length(x) >0) {
443-
if(x$descriptionType=="Abstract") {
443+
#descriptionType and description are character vectors, spanning content of description field
444+
#testing (2022-08) found that selecting on "Abstract" could be omitted
445+
if("Abstract"%in%x$descriptionType) {
444446
return(str_to_sentence(str_c(x$description, collapse="; ")))
445447
} else {
446448
return(NA_character_)
@@ -459,7 +461,10 @@ parseDataCitePreprints <- function(item) {
459461
title= map_chr(item$data$attributes$titles,
460462
~ str_to_sentence(str_c(.x$title, collapse="; "))),
461463
abstract= map_chr(item$data$attributes$descriptions,
462-
function(x) parseDataCiteDescription(x)))
464+
function(x) parseDataCiteDescription(x)),
465+
abstract_length= map_int(item$data$attributes$descriptions,
466+
function(x) length(x))
467+
)
463468
}
464469

465470
dc_preprints_df<- map_df(dc_preprints, parseDataCitePreprints) %>%
@@ -620,7 +625,7 @@ covid_preprints_update <- covid_preprints_update %>%
620625
title= str_squish(title))
621626
```
622627

623-
#Remove duplicate records (incl. versions) on same preprint server
628+
\#Remove duplicate records (incl. versions) on same preprint server
624629

625630
```r
626631
covid_preprints_previous<- read_csv("data/covid19_preprints.csv")
Loading
Loading
Loading
Loading
Loading

data/covid19_preprints.csv

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:3703940a1dd97d45e8f993e278082ece7a168c3ec93b3b957363744b305a879f
3-
size 122867213
2+
oid sha256:fb485b21b462512369574a125cc6e4ef79b64cd342d4466bb11959d0d41693fa
3+
size 123090842

data/metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"release_date": "2022-09-03",
3-
"sample_date": "2022-08-31",
3+
"sample_date": "2022-09-03",
44
"posted_date": "2022-08-28",
55
"url": "https://github.com/nicholasmfraser/covid19_preprints/blob/master/data/covid19_preprints.csv?raw=true"
66
}
-11.4 KB
Loading
Loading
3.13 KB
Loading
625 Bytes
Loading

0 commit comments

Comments
 (0)
close