Created
December 6, 2017 13:24
-
-
Save njahn82/009c58f6e6f6f419a443d0acd28be6dc to your computer and use it in GitHub Desktop.
Did research institutions sponsor hybrid open access journals that currently share open license metadata with Crossref?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| #' | |
| #' We also would like to add data from offsetting aggrements, which is also collected | |
| #' Open APC initiative, but does not include pricing information. | |
| #' | |
| o_offset <- readr::read_csv("https://raw.githubusercontent.com/OpenAPC/openapc-de/ec458eaf0232eb193bb5f8e3b8481491e39a60ef/data/offsetting/offsetting.csv") | |
| #' Merge with Open APC dataset | |
| o_apc <- o_offset %>% | |
| mutate(euro = as.integer(euro)) %>% | |
| bind_rows(o_apc) | |
| #' Include country information, which are available via Open APC OLAP server: | |
| #' <https://github.com/OpenAPC/openapc-olap/blob/master/static/institutions.csv> | |
| country_apc <- readr::read_csv("https://raw.githubusercontent.com/OpenAPC/openapc-olap/master/static/institutions.csv") %>% | |
| select(institution, country) | |
| countries <- readr::read_csv("https://raw.githubusercontent.com/OpenAPC/openapc-olap/master/static/institutions_offsetting.csv") %>% | |
| bind_rows(country_apc) %>% | |
| distinct() %>% | |
| mutate(country = gsub("NDL", "NLD", country)) %>% | |
| mutate(country_name = countrycode::countrycode(country, "iso3c", "country.name")) | |
| #' merge with open apc dataset | |
| #' | |
| o_apc <- o_apc %>% | |
| left_join(countries, by = "institution") | |
| #' main indicator file from hybrid oa dashboard | |
| jns <- jsonlite::stream_in(file("https://raw.githubusercontent.com/subugoe/hybrid_oa_dashboard/master/data/jn_facets_df.json")) %>% | |
| distinct(issn, journal_title, publisher) | |
| o_apc_country <- o_apc %>% | |
| left_join(jns, by = "issn") %>% | |
| group_by(country, journal_title, period) %>% | |
| summarize(oapc_n_country = n()) %>% | |
| filter(period %in% c("2013", "2014", "2015","2016", "2017")) %>% | |
| ungroup() %>% | |
| group_by(country, journal_title) %>% | |
| summarize(oapc_total = sum(oapc_n_country)) | |
| #' data from hybrid oa dashboard | |
| o_apc_ind <- jsonlite::stream_in(file("https://raw.githubusercontent.com/subugoe/hybrid_oa_dashboard/master/data/oapc_aggregated.json")) %>% | |
| group_by(country, journal_title) %>% | |
| summarize(oapc_cr = sum(oapc_n_country)) | |
| my_df <- left_join(o_apc_country, o_apc_ind, by = c("country", "journal_title")) | |
| cr_jns <- my_df %>% | |
| filter(!is.na(oapc_cr)) %>% | |
| group_by(country) %>% | |
| summarise(cr_jns = n_distinct(journal_title)) | |
| jns <- my_df %>% | |
| group_by(country) %>% | |
| summarise(jns = n_distinct(journal_title)) %>% | |
| inner_join(cr_jns, by = ("country")) %>% | |
| arrange(desc(jns)) %>% | |
| mutate(country = forcats::as_factor(country)) | |
| gg <- ggplot(jns, | |
| aes(x = jns, xend = cr_jns, y = country, color = group)) + | |
| ggalt::geom_dumbbell( | |
| colour="#30638E", | |
| colour_xend="#EDAE49", | |
| colour_x="#30638E", | |
| size_x=3.5, | |
| alpha = 0.9, | |
| size_xend = 3.5 | |
| ) + | |
| scale_y_discrete(limits = rev(levels(jns$country))) + | |
| scale_x_continuous(breaks = seq(0, 3500, by = 500)) + | |
| labs(x = "Number of Hybrid OA Journals", | |
| y = NULL, | |
| title = "Did research institutions sponsor hybrid open access journals\nthat currently share open license metadata with Crossref?", | |
| subtitle = "Notice that only those hybrid open access journals were included where\nacademic institutions sponsored the publication fee according to the Open APC initiative" | |
| ) + | |
| geom_text(data=jns, | |
| aes(x=2300, y= "GBR", label="with Crossref licensing infos"), | |
| color="#EDAE49", hjust=1, size=3, nudge_x=-10) + | |
| geom_text(data=jns, | |
| aes(x=3500, y= "GBR", label="All"), | |
| color="#30638E", hjust=0, size=3, nudge_x=10) + | |
| theme_minimal(base_family="Arial Narrow") + | |
| theme(plot.margin=margin(30,30,30,30)) + | |
| theme(panel.grid.minor=element_blank()) + | |
| theme(axis.ticks=element_blank()) + | |
| theme(panel.grid.major.y=element_blank()) + | |
| theme(panel.border=element_blank()) | |
| ggsave(gg, filename = "licensing_coverage_country.png", width = 9, height = 6, dpi = 450, device = "png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment