SELECT
cr_year,
publisher,
COUNT(DISTINCT doi) AS cr_articles,
This file contains 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
#' Manipulating, analyzing and exporting data with tidyverse | |
#' https://datacarpentry.org/R-ecology-lesson/03-dplyr.html | |
library(tidyverse) | |
#' dplyr | |
#' - the most common data manipulation tasks | |
#' - https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf | |
#' tidyr | |
#' - reshape your data |
library(tidyverse)
library(bigrquery)
library(DBI)
Connection
library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.1.1
#> Warning: package 'readr' was built under R version 4.1.1
library(biblids) # install via GitHub https://github.com/subugoe/biblids
tt <- readr::read_csv("~/Downloads/DOIs.txt")
#> Rows: 40479 Columns: 1
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
library(tidyverse)
# raw subject table
subject_mag_raw <- readr::read_csv("data/NPL_DOI_FOS.csv",
col_types = cols(.default = "c"))
subject_mag_raw %>%
# Represents https://academic.microsoft.com/paper/2518129109/
filter(doi == "10.7717/peerj.2369") %>%
# Only top level subjects
filter(is.na(fos_1)) %>%
library(rvest)
library(tidyverse)
library(janitor)
#>
#> Attaching package: 'janitor'
#> The following objects are masked from 'package:stats':
#>
#> chisq.test, fisher.test
esac <-
library(rcrossref)
library(purrr)
my_dois <-
c(
"skksks",
"10.5281/zenodo.4032609",
"10.1667/rr13708.1",
"10.1016/s0021-9258(19)52311-0",
This file contains 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
#' Get most current Open APC snapshot | |
#' | |
#' Open APC shares several csv files via GitHub, which contain data about | |
#' institutional spending for open access articles. | |
#' | |
#' | |
#' @param open_apc_cols character vector representing Open APC collections. | |
#' See `open_apc_collections()` for an overview. | |
#' | |
#' @importFrom dplyr filter `%>%` inner_join |
# import csv file
tt <- read.delim("~/Downloads/vanished_v2.csv", sep = ";")
# table dimensions
dim(tt)
#> [1] 807 61
# empty rows at bottom like row 635
tt[635,]
#> Source If.Identified.by.second.source Journal.Name ISSN E.ISSN URL
#> 635
This file contains 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(tidyverse) | |
my_df <- readr::read_csv("data/u4_13_17.csv") | |
no_group <- my_df %>% | |
filter(is.na(CA)) | |
no_group %>% | |
select(PY, UT, C1) %>% | |
mutate(adresses = strsplit(C1, "; \\[")) -> tt | |
tt %>% | |
unnest() %>% | |
tidyr::separate(adresses, sep ="] ", c("authors", "address"), fill = "left") %>% |
NewerOlder