Skip to content

Commit

Permalink
Merge pull request #53 from ropensci/v0.4.3
Browse files Browse the repository at this point in the history
V0.4.3
  • Loading branch information
njahn82 committed Sep 20, 2023
2 parents b30f317 + 70670fa commit 7aa1cc6
Show file tree
Hide file tree
Showing 11 changed files with 309 additions and 319 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: europepmc
Title: R Interface to the Europe PubMed Central RESTful Web Service
Version: 0.4.2.009
Version: 0.4.3
Authors@R: c(
person("Najko", "Jahn", email = "najko.jahn@gmail.com",
role = c("aut", "cre", "cph")),
person("Maëlle", "Salmon", role = c("ctb")))
License: GPL-3
Date: 2023-08-20
Date: 2023-09-20
URL: https://docs.ropensci.org/europepmc/, https://github.com/ropensci/europepmc/
BugReports: https://github.com/ropensci/europepmc/issues
Description: An R Client for the Europe PubMed Central RESTful Web Service
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# europepmc 0.4.3

- Skip test on CRAN

# europepmc 0.4.2

- Minor fixes documentation
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ knitr::opts_chunk$set(


[![R build status](https://github.com/ropensci/europepmc/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/europepmc/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/f8xtpvhhr074lk44?svg=true)](https://ci.appveyor.com/project/sckott/europepmc)
[![codecov.io](https://codecov.io/github/ropensci/europepmc/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/europepmc?branch=master)
[![cran version](https://www.r-pkg.org/badges/version/europepmc)](https://cran.r-project.org/package=europepmc)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/europepmc)](https://github.com/r-hub/cranlogs.app)
Expand Down Expand Up @@ -100,7 +99,7 @@ See vignette [Introducing europepmc, an R interface to Europe PMC RESTful API](h
There is also a nice function allowing you to easily create review graphs like described in Maëlle
Salmon's [blog post](https://masalmon.eu/2017/05/14/evergreenreviewgraph/):

```{r, fig.path="man/figures/"}
```{r, fig.path="man/figures/", fig.retina = 1}
tt_oa <- europepmc::epmc_hits_trend("Malaria", period = 1995:2019, synonym = FALSE)
tt_oa
# we use ggplot2 for plotting the graph
Expand Down
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ europepmc - R Interface to Europe PMC RESTful Web Service


[![R build status](https://github.com/ropensci/europepmc/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/europepmc/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/f8xtpvhhr074lk44?svg=true)](https://ci.appveyor.com/project/sckott/europepmc)
[![codecov.io](https://codecov.io/github/ropensci/europepmc/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/europepmc?branch=master)
[![cran version](https://www.r-pkg.org/badges/version/europepmc)](https://cran.r-project.org/package=europepmc)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/europepmc)](https://github.com/r-hub/cranlogs.app)
Expand Down Expand Up @@ -82,25 +81,24 @@ PMC search syntax to `epmc_search()`.
```r
europepmc::epmc_search(query = '"2019-nCoV" OR "2019nCoV"')
#> # A tibble: 100 × 29
#> id source pmid pmcid doi title authorString journalTitle issue
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 36754560 MED 36754560 PMC992… 10.1… Inno… Yerlikaya S… BMJ Open 2
#> 2 37400836 MED 37400836 PMC103… 10.1… Effe… Ebrahimi T,… BMC Oral He… 1
#> 3 37223279 MED 37223279 PMC101… 10.1… Bill… Lamsal R, R… Data Brief <NA>
#> 4 36727245 MED 36727245 PMC101… 10.1… Vasc… Morrissey E… JBI Evid Sy… 5
#> 5 37211453 MED 37211453 PMC101… 10.1… Safe… Smith K, He… Vaccine 26
#> 6 PPR525786 PPR <NA> <NA> 10.1… The … Alihsan B, … <NA> <NA>
#> 7 PPR621660 PPR <NA> <NA> 10.1… Safe… Smith K, He… <NA> <NA>
#> 8 36679914 MED 36679914 PMC986… 10.3… The … Cherif YYS,… Vaccines (B… 1
#> 9 PPR689808 PPR <NA> <NA> 10.2… Perf… MOUNA L, BO… <NA> <NA>
#> 10 37258070 MED 37258070 PMC102… 10.1… Comp… Hui L, Garn… BMJ Open 5
#> id source pmid pmcid doi title authorString journalTitle issue journalVolume
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 36754560 MED 36754560 PMC9… 10.1… Inno… Yerlikaya S… BMJ Open 2 13
#> 2 37400836 MED 37400836 PMC1… 10.1… Effe… Ebrahimi T,… BMC Oral He… 1 23
#> 3 37223279 MED 37223279 PMC1… 10.1… Bill… Lamsal R, R… Data Brief <NA> 48
#> 4 36727245 MED 36727245 PMC1… 10.1… Vasc… Morrissey E… JBI Evid Sy… 5 21
#> 5 37648680 MED 37648680 <NA> 10.3… [Cli… Liu ZT, Che… Zhonghua Ya… 10 59
#> 6 37211453 MED 37211453 PMC1… 10.1… Safe… Smith K, He… Vaccine 26 41
#> 7 37479685 MED 37479685 PMC1… 10.1… SuPA… Wei C, Datt… Nat Commun 1 14
#> 8 37652823 MED 37652823 <NA> 10.1… Immu… Raiser F, D… Vaccine <NA> <NA>
#> 9 37714559 MED 37714559 <NA> 10.1… New-… Kobayashi N… BMJ Case Rep 9 16
#> 10 PPR525786 PPR <NA> <NA> 10.1… The … Alihsan B, … <NA> <NA> <NA>
#> # ℹ 90 more rows
#> # ℹ 20 more variables: journalVolume <chr>, pubYear <chr>, journalIssn <chr>,
#> # pageInfo <chr>, pubType <chr>, isOpenAccess <chr>, inEPMC <chr>,
#> # inPMC <chr>, hasPDF <chr>, hasBook <chr>, hasSuppl <chr>,
#> # citedByCount <int>, hasReferences <chr>, hasTextMinedTerms <chr>,
#> # hasDbCrossReferences <chr>, hasLabsLinks <chr>,
#> # hasTMAccessionNumbers <chr>, firstIndexDate <chr>, …
#> # ℹ 19 more variables: pubYear <chr>, journalIssn <chr>, pageInfo <chr>, pubType <chr>,
#> # isOpenAccess <chr>, inEPMC <chr>, inPMC <chr>, hasPDF <chr>, hasBook <chr>,
#> # hasSuppl <chr>, citedByCount <int>, hasReferences <chr>, hasTextMinedTerms <chr>,
#> # hasDbCrossReferences <chr>, hasLabsLinks <chr>, hasTMAccessionNumbers <chr>,
#> # firstIndexDate <chr>, firstPublicationDate <chr>, versionNumber <int>
```

Be aware that Europe PMC expands queries with MeSH synonyms by default. You can turn this behavior off using the `synonym = FALSE` parameter.
Expand All @@ -124,14 +122,14 @@ tt_oa
#> <int> <dbl> <dbl>
#> 1 1995 449216 1471
#> 2 1996 458644 1529
#> 3 1997 456805 1834
#> 4 1998 474695 1756
#> 3 1997 456804 1834
#> 4 1998 474693 1756
#> 5 1999 493837 1951
#> 6 2000 532142 2078
#> 7 2001 545709 2179
#> 8 2002 561496 2350
#> 7 2001 545702 2180
#> 8 2002 561497 2351
#> 9 2003 588612 2596
#> 10 2004 628192 2830
#> 10 2004 628176 2831
#> # ℹ 15 more rows
# we use ggplot2 for plotting the graph
library(ggplot2)
Expand Down
3 changes: 2 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Status: OK

---

This submission fixes the package manual entry as requested by the CRAN team.
This submission fixes the problems shown on
<https://cran.r-project.org/web/checks/check_results_europepmc.html>

Thanks!

Expand Down
Binary file modified man/figures/unnamed-chunk-4-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/testthat/test_epmc_hits_trend.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ test_that("epmc_hits_trend fails correctly", {
})

test_that("epmc_hits_trend synonym search works correctly", {
skip_on_cran()

a <- epmc_hits_trend('malaria', period = 2012:2016, synonym = FALSE)
b <- epmc_hits_trend('malaria', period = 2012:2016, synonym = TRUE)

Expand Down
88 changes: 44 additions & 44 deletions vignettes/evergreenreviewgraphs.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Making trend graphs"
author: "Najko Jahn"
date: "2023-08-21"
date: "2023-09-20"
output: rmarkdown::html_vignette
vignette: >
%\VignetteEngine{knitr::rmarkdown}
Expand All @@ -27,19 +27,19 @@ europepmc::epmc_hits_trend(query = "aspirin", period = 2010:2022)
#> # A tibble: 13 × 3
#> year all_hits query_hits
#> <int> <dbl> <dbl>
#> 1 2010 851063 5507
#> 2 2011 904794 6003
#> 3 2012 946175 6833
#> 4 2013 1004386 7652
#> 5 2014 1055159 8210
#> 6 2015 1096370 8779
#> 7 2016 1117117 8950
#> 8 2017 1138383 9394
#> 9 2018 1180056 10103
#> 10 2019 1243536 10666
#> 11 2020 1450476 14294
#> 12 2021 1549953 16643
#> 13 2022 1542398 15975
#> 1 2010 851106 5513
#> 2 2011 904847 6009
#> 3 2012 946206 6840
#> 4 2013 1004432 7658
#> 5 2014 1055201 8226
#> 6 2015 1096429 8789
#> 7 2016 1117164 8965
#> 8 2017 1138419 9411
#> 9 2018 1180115 10116
#> 10 2019 1243574 10675
#> 11 2020 1450562 14358
#> 12 2021 1550459 16755
#> 13 2022 1542959 16214
```

By default, synonym search is disabled and only Medline/PubMed index is searched.
Expand All @@ -52,7 +52,7 @@ By default, synonym search is disabled and only Medline/PubMed index is searched

### Use Case: Growth of Open Access Literature

There is a growing interest in knowing the proportion of open access to scholarly literature. Europe PMC allows searching for open access content with the [`OPEN_ACCESS:Y` parameter](https://europepmc.org/search?query=OPEN_ACCESS:Y&page=1&sortby=Relevance). At the moment, Europe PMC contains 5,509,277 open access full-texts. Let's see how they are relatively distributed over the period 2010 - 2022.
There is a growing interest in knowing the proportion of open access to scholarly literature. Europe PMC allows searching for open access content with the [`OPEN_ACCESS:Y` parameter](https://europepmc.org/search?query=OPEN_ACCESS:Y&page=1&sortby=Relevance). At the moment, Europe PMC contains 5,641,836 open access full-texts. Let's see how they are relatively distributed over the period 2010 - 2022.


```r
Expand All @@ -61,19 +61,19 @@ tt_oa
#> # A tibble: 13 × 3
#> year all_hits query_hits
#> <int> <dbl> <dbl>
#> 1 2010 851063 78677
#> 2 2011 904794 105675
#> 3 2012 946175 140016
#> 4 2013 1004386 176541
#> 5 2014 1055159 212039
#> 6 2015 1096370 244234
#> 7 2016 1117117 273364
#> 8 2017 1138383 312717
#> 9 2018 1180056 352067
#> 10 2019 1243536 405927
#> 11 2020 1450476 585116
#> 12 2021 1549953 714017
#> 13 2022 1542398 790600
#> 1 2010 851106 78743
#> 2 2011 904847 105737
#> 3 2012 946206 140082
#> 4 2013 1004432 176617
#> 5 2014 1055201 212221
#> 6 2015 1096429 244342
#> 7 2016 1117164 273575
#> 8 2017 1138419 312877
#> 9 2018 1180115 352369
#> 10 2019 1243574 406182
#> 11 2020 1450562 585074
#> 12 2021 1550459 714651
#> 13 2022 1542959 794387
# we use ggplot2 for plotting the graph
library(ggplot2)
ggplot(tt_oa, aes(factor(year), query_hits / all_hits, group = 1)) +
Expand Down Expand Up @@ -141,16 +141,16 @@ my_df
#> # A tibble: 70 × 5
#> year all_hits refs_hits query_hits query_id
#> <int> <dbl> <dbl> <dbl> <chr>
#> 1 2009 793211 555994 13 "REF:\"code.google.com\""
#> 2 2010 851063 541440 40 "REF:\"code.google.com\""
#> 3 2011 904794 604311 65 "REF:\"code.google.com\""
#> 4 2012 946175 636818 92 "REF:\"code.google.com\""
#> 5 2013 1004386 763699 135 "REF:\"code.google.com\""
#> 6 2014 1055159 797691 140 "REF:\"code.google.com\""
#> 7 2015 1096370 780509 117 "REF:\"code.google.com\""
#> 8 2016 1117117 783865 65 "REF:\"code.google.com\""
#> 9 2017 1138383 819481 52 "REF:\"code.google.com\""
#> 10 2018 1180056 757547 29 "REF:\"code.google.com\""
#> 1 2009 793210 556002 13 "REF:\"code.google.com\""
#> 2 2010 851106 541447 40 "REF:\"code.google.com\""
#> 3 2011 904847 604315 65 "REF:\"code.google.com\""
#> 4 2012 946206 636843 92 "REF:\"code.google.com\""
#> 5 2013 1004432 763720 135 "REF:\"code.google.com\""
#> 6 2014 1055201 797730 140 "REF:\"code.google.com\""
#> 7 2015 1096429 780777 117 "REF:\"code.google.com\""
#> 8 2016 1117164 784272 65 "REF:\"code.google.com\""
#> 9 2017 1138419 819735 52 "REF:\"code.google.com\""
#> 10 2018 1180115 757852 29 "REF:\"code.google.com\""
#> # ℹ 60 more rows

### total
Expand All @@ -162,14 +162,14 @@ hits_summary
#> # A tibble: 5 × 2
#> query_id all
#> <chr> <dbl>
#> 1 "REF:\"cran.r-project.org\"" 44677
#> 2 "REF:\"github.com\"" 28886
#> 3 "REF:\"sourceforge.net\"" 1777
#> 4 "REF:\"code.google.com\"" 896
#> 5 "REF:\"bitbucket.org\"" 440
#> 1 "REF:\"cran.r-project.org\"" 44864
#> 2 "REF:\"github.com\"" 29009
#> 3 "REF:\"sourceforge.net\"" 1779
#> 4 "REF:\"code.google.com\"" 897
#> 5 "REF:\"bitbucket.org\"" 442
```

The proportion of papers where Europe PMC was able to make the cited literature available was 63 for the period 2009-2022. There also seems to be a time-lag between indexing reference lists because the absolute number of publication was decreasing over the years. This is presumably because Europe PMC also includes delayed open access content, i.e. content which is not added immediately with the original publication.[^4]
The proportion of papers where Europe PMC was able to make the cited literature available was 64 for the period 2009-2022. There also seems to be a time-lag between indexing reference lists because the absolute number of publication was decreasing over the years. This is presumably because Europe PMC also includes delayed open access content, i.e. content which is not added immediately with the original publication.[^4]

[^4]: Ebd.

Expand Down

0 comments on commit 7aa1cc6

Please sign in to comment.