Skip to content

Instantly share code, notes, and snippets.

@njahn82
njahn82 / dvcs_url.csv
Last active August 29, 2015 14:01
DVCS in Europe PMC OA articles
dvcs base.url
GitHub github.com
BitBucket bitbucket.org
GoogleCode code.google.com
LaunchPad launchpad.net
SourceForge sourceforge.net
@njahn82
njahn82 / ccDOAJ.md
Created June 23, 2014 13:28
CC Licences Social Science Journals
#load data
doaj <- read.csv("http://www.doaj.org/doaj?func=csv", header = TRUE, sep=",")

#subset social science journals
doaj.soz <- doaj[grep("Social Science",doaj$Subjects),]

#cross-tabulate licence conditions
table(doaj.soz$CC.License)
@njahn82
njahn82 / index.html
Last active August 29, 2015 14:03
unibiAPC
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://timelyportfolio.github.io/rCharts_d3_sankey/css/sankey.css'>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_d3_sankey/js/sankey.js' type='text/javascript'></script>
<style>
@njahn82
njahn82 / orcid.md
Last active August 29, 2015 14:03
Demonstrate ORCID use in Europe PMC via rebi

Loading rebi

require(devtools)
install_github("rebi", "ropensci")
require(rebi)

list tables for an article

check apc_de dataset against DOAJ journal master list

# load doaj data 

doaj <- read.csv("data/doaj/doajJournalList.csv", header = T, sep = ",")
doaj.eissn <- doaj[!doaj$EISSN == "",] # exclude empty Eissn

# join ISSN and EISSN as vector
@njahn82
njahn82 / docCN.Rmd
Last active August 29, 2015 14:12
Sample output
Example:
### Load package
```{r}
require(devtools)
devtools::install_github("njahn82/rcrossref")
```
### Retrieve metadata content type `application/vnd.crossref.unixsd+xml`
@njahn82
njahn82 / crossref-tdm.xml
Last active August 29, 2015 14:13
10.1155/2012/412512.json
<?xml version="1.0" encoding="UTF-8"?>
<crossref_result xmlns="http://www.crossref.org/qrschema/3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation="http://www.crossref.org/qrschema/3.0 http://www.crossref.org/schema/queryResultSchema/crossref_query_output3.0.xsd">
<query_result>
<head>
<doi_batch_id>none</doi_batch_id>
</head>
<body>
<query status="resolved">
<doi type="journal_article">10.1155/2012/412512</doi>
<crm-item name="publisher-name" type="string">Hindawi Publishing Corporation</crm-item>
@njahn82
njahn82 / dvcs_epmc_md.csv
Last active August 29, 2015 14:15
Parsing EPMC for DVCS hosting services with R
We can't make this file beautiful and searchable because it's too large.
"","id","source","pmid","DOI","title","authorString","journalTitle","pubYear","journalIssn","pubType","isOpenAccess","inEPMC","inPMC","citedByCount","hasReferences","hasTextMinedTerms","hasDbCrossReferences","hasLabsLinks","hasTMAccessionNumbers","luceneScore","issue","journalVolume","pageInfo","pmcid","tmAccessionTypeList","dbCrossReferenceList","dvcs"
"1","25577191","MED","25577191","10.1093/molbev/msu411","CodABC: A Computational Framework to Coestimate Recombination, Substitution and Molecular Adaptation rates by approximate Bayesian computation.","Arenas M, Lopes JS, Beaumont MA, Posada D.","Mol Biol Evol","2015","0737-4038","journal article","N","N","N","0","N","N","N","N","N","719.82654",NA,NA,NA,NA,NA,NA,"code.google.com"
"2","25217575","MED","25217575","10.1093/bioinformatics/btu609","EUROCarbDB(CCRC): a EUROCarbDB node for storing glycomics standard data.","Al Jadda K, Porterfield MP, Bridger R, Heiss C, Tiemeyer M, Wells L, Miller JA, York WS, Ranzinger R.","Bioinformatics","2015","1367-4803","jour
@njahn82
njahn82 / license.md
Last active August 29, 2015 14:17
Licenses in OpenAPC dataset

Licenses found

download_apc <- function(path = NULL, dir = "tmp", file = "apc_de.csv"){
  if(is.null(path)) {
    path <- c("https://raw.githubusercontent.com/OpenAPC/openapc-de/master/data/apc_de.csv")
  } 
  dir.create(dir) 
  download.file(url = path, destfile = paste(dir, file, sep = "/"), method = "curl")