Skip to content

Instantly share code, notes, and snippets.

@njahn82
njahn82 / open_apc_plots.R
Created February 15, 2017 09:37
Plots for TIB/SUB Fortbildung
#' Plots TIB/SUB Fortbildung Open APC Initiative
#' Required libraries
library(dplyr)
library(ggplot2)
library(scales)
#' ## Load datasets from GitHub
#' Get cost data from the Open APC initiatve
apc <- readr::read_csv("https://raw.githubusercontent.com/OpenAPC/openapc-de/f946f5c55e5335c3f2298be88507af94de45d585/data/apc_de.csv", col_names = TRUE)
#' Overview
apc
@njahn82
njahn82 / openaire.json
Created March 16, 2017 16:16
API output openaire
{
"response": {
"browseResults": null,
"header": {
"locale": {
"$": "en_GB"
},
"page": {
"$": 1
},
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 38 columns, instead of 9 in line 1.
Date of initial application by author,Submitted by,University department,PubMed Central (PMC) ID,PubMed ID,DOI,Affiliated author,Publisher,Journal,ISSN,Type of publication,Article title,Date of publication,Fund that APC is paid from (1),Fund that APC is paid from (2),Fund that APC is paid from (3),Funder of research (1),Funder of research (2),Funder of research (3),Grant ID (1),Grant ID (2),Grant ID (3),Date of APC payment,APC paid (actual currency) including VAT if charged,APC paid (actual currency) excluding VAT,VAT (actual currency),Currency of APC,APC paid (£) including VAT if charged,APC paid (£) excluding VAT,VAT (£),Additional publication costs (£),"Discounts, memberships & pre-payment agreements",Amount of APC charged to COAF grant (include VAT if charged) in £,Amount of APC charged to RCUK OA fund (include VAT if charged) in £,Licence,Correct license applied,Problem-free open access publication,Notes
01/01/2015,,CRUK Cambridge Institute,,,10.1530/ERC-14-0454 ,,Society for Endocrinology,Endocrine-Rela
@njahn82
njahn82 / wos_cr.csv
Created May 10, 2017 16:01
wos_cr_journal_title_match
We can't make this file beautiful and searchable because it's too large.
Full Journal Title,JournalTitle
CA-A CANCER JOURNAL FOR CLINICIANS,CA A Cancer Journal for Clinicians
NEW ENGLAND JOURNAL OF MEDICINE,New England Journal of Medicine
NATURE REVIEWS DRUG DISCOVERY,Nature Reviews Drug Discovery
LANCET,The Lancet
NATURE BIOTECHNOLOGY,Nature Biotechnology
NATURE MATERIALS,Nature Materials
NATURE REVIEWS MOLECULAR CELL BIOLOGY,Nature Reviews Molecular Cell Biology
NATURE,Nature
ANNUAL REVIEW OF ASTRONOMY AND ASTROPHYSICS,Annual Review of Astronomy and Astrophysics
@njahn82
njahn82 / .gitignore
Last active July 6, 2017 19:45
Emotionensanalyse publikationsfreiheit.de
.Rproj.user
.Rhistory
.RData
.Ruserdata
@njahn82
njahn82 / pub_test.r
Created August 23, 2017 15:52
pub test
#' ## What's registered in PUB?
#'
#' ### Fetch the data
#'
orgs <- rio::import("pevz_org.csv") %>%
mutate(year = list(2009:2016)) %>%
tidyr::unnest(year)
u <- "https://pub.uni-bielefeld.de/publication?limit=1000&q="
tt <- purrr::map2(.x = orgs$id, .y= orgs$year, .f = function(x, y) {
my_url <- URLencode(paste0(u, "department=", x, " AND year=", y, "&fmt=json"))
@njahn82
njahn82 / arwu.R
Created November 8, 2017 08:45
ARWU
# url heraussuchen
u <- "http://www.shanghairanking.com/de/ARWU2015.html"
# scrapen mit rvest
library(rvest)
library(dplyr)
library(rio)
read_html(u) %>%
html_table(fill = TRUE) %>%
rio::export("~/Downloads/arwu_2015.xlsx")
@njahn82
njahn82 / refs
Created November 17, 2017 07:52
OA monitoring GOSSIP publications
Aarts, A. A. ..., Cordes, A. …, Lippold, M.A., … Nosek, B. A. (2015). Estimating the reproducibility of psychological science. Science, 349, aac4716. http://doi.org/10.1126/science.aac4716 1, 2, 3, 4, 6, 7
Albrecht, T., & Mattler, U. (2012). Individual differences in subjective experience and objective performance in metacontrast masking. Journal of Vision, 12:5, 1-24. http://doi.org/10.1167/12.5.5 5
Aribisala, B. S., Royle, N. A., Muñoz Maniega, S., Valdés Hernández, M. C., Murray, C., Penke, L., ... Wardlaw, J. M. (2014). Quantitative multi-modal MRI of the hippocampus and cognitive ability in community-dwelling older subjects. Cortex, 53, 34-44. 5
Arslan, R. C., & Penke, L. (2015). Zeroing in on the genetics of intelligence. Journal of Intelligence, 3, 41-45. http://doi.org/10.3390/jintelligence3020041. 5
Arslan, R. C., Penke, L., Johnson, W., Iacono, W. G., & McGue, M. (2014). The effect of paternal age on offspring intelligence and personality when controlling for paternal trait level. PLoS One, 9, e9009
@njahn82
njahn82 / cr_wellcome.R
Last active November 28, 2017 12:33
cr wellcome
#' get DOIs per ISSN
library(tidyverse)
wellcome_df <- rcrossref::cr_works(filter = c(issn = "2398-502X"), limit = 1000) %>%
.$data
#' prepare unnest
names(wellcome_df$link) <- wellcome_df$DOI
#' unnest, remove unneded string, and export data
wellcome_dois <- dplyr::bind_rows(wellcome_df$link, .id = "doi") %>%
mutate(URL = gsub("/iparadigms", "", URL)) %>%
select(1:2)
@njahn82
njahn82 / cr_opac.R
Created December 6, 2017 13:24
Did research institutions sponsor hybrid open access journals that currently share open license metadata with Crossref?
library(jsonlite)
library(tidyverse)
library(ggalt)
#' get data from the open apc initiative
u <-
"https://raw.githubusercontent.com/OpenAPC/openapc-de/ec458eaf0232eb193bb5f8e3b8481491e39a60ef/data/apc_de.csv"
o_apc <- readr::read_csv(u) %>%
filter(is_hybrid == TRUE)
#' Some summary statistics:
#'