Skip to content

Instantly share code, notes, and snippets.

library(europepmc)
library(tidyverse)
library(cowplot)
#> 
#> ********************************************************
#> Note: As of version 1.0.0, cowplot does not change the
#>   default ggplot2 theme anymore. To recover the previous
#>   behavior, execute:
#>   theme_set(theme_cowplot())
@njahn82
njahn82 / wp_1_2.Rmd
Last active March 3, 2020 15:34
wp 1.2 hoad
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
@njahn82
njahn82 / example.md
Created February 26, 2020 09:22
Percentile Ranks KB
    select
        pk_items,
        count,
        wos_b_2019.d_percentiles.c_max,
        wos_b_2019.classifications.classification,
        wos_b_2019.items.pubyear,
        wos_b_2019.items.doctype,
        wos_b_2019.items.pubtype,
@njahn82
njahn82 / script.R
Last active December 3, 2019 11:57
Elsevier invoice data check
library(tidyverse)
library(rcrossref)
library(janitor)
library(crminer)
my_dois <- readxl::read_xlsx("dois_elsevier.xlsx") %>%
clean_names()
# call Crossref
cr_df <- cr_works(my_dois$digital_object_identifier_doi, .progress = "text")
# get CC licensed articles
cc_df <- cr_df$data %>%
@njahn82
njahn82 / base_with_r.md
Created October 17, 2019 13:25
BASE example
library(tidyverse)
library(jsonlite)
#> 
#> Attaching package: 'jsonlite'
#> The following object is masked from 'package:purrr':
#> 
#>     flatten
base_df <- jsonlite::stream_in(file("~/Downloads/base_dois.json"), verbose = FALSE)
#> Warning in readLines(con, n = pagesize, encoding = "UTF-8"): incomplete
@njahn82
njahn82 / cr_economics.md
Last active September 11, 2019 10:14
Journal of Applied Econometrics Crossref Example
library(rcrossref)
cr_works(filter = c(
	issn = "1099-1255",
	from_pub_date = "2013-01-01",
	until_pub_date = "2019-12-31",
	type = "journal-article"
    ),
limit = 500)
@njahn82
njahn82 / epm_hits_eg.md
Created August 12, 2019 08:00
Europe PMC hits Example
my_query <-
  '(TITLE:"older adult" or TITLE:elderly) and (TITLE:falls or TITLE:trauma)'
europepmc::epmc_hits_trend(query = my_query,
                           period = 2008:2018,
                           data_src = 'med')
#> # A tibble: 11 x 3
#>     year all_hits query_hits
#>    <int>    <dbl>      <dbl>
#&gt; 1 2008 761217 72
library(tidyverse)
library(rcrossref)
library(roadoi)

Load data

---
title: "Dataset two"
author: "Najko"
date: '2019-06-17'
output:
html_document:
keep_md: yes
---
@njahn82
njahn82 / results_short.csv
Created April 27, 2019 16:13
Upsetr conversion
ev_cat n
open (via free pdf) 2064941
open (via page says license) 729059
oa repository (via OAI-PMH title and first author match) 661745
oa journal (via doaj)&open (via page says license) 522859
oa journal (via doaj) 405607
oa journal (via doaj)&oa repository (via OAI-PMH doi match)&oa repository (via pmcid lookup)&open (via page says license) 390785
open (via crossref license) 336514
oa repository (via OAI-PMH doi match) 226068
oa repository (via OAI-PMH doi match)&oa repository (via pmcid lookup) 215211