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
#!/usr/bin/env python | |
# Initially written by Heather Piwowar, June 2011 | |
# Public domain: have at it! | |
# For annotating bibtex files, pulling in article info from customized spreadsheets | |
import csv | |
import re | |
import codecs | |
from pybtex.database.input import bibtex as bibtex_in | |
from pybtex.database.output import bibtex as bibtex_out |
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
#!/usr/bin/env python | |
# Initially written by Heather Piwowar, June 2011 | |
# Public domain: have at it! | |
# For converting ISI Web of Science tab-delimited exports into bibtex format | |
import csv | |
import glob | |
import random | |
from collections import defaultdict | |
import codecs |
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
### Heather Piwowar | |
### MIT open license. | |
### blog post about interm results: | |
library(rms) | |
# if true, draw figures on screen instead of in a file | |
SCREEN=TRUE | |
# set to ".eps" or ".png" |
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
### Heather Piwowar | |
# Modifications to add confidence intervals added by Heather Piwowar | |
# Based on dotchart2{Hmisc} | |
dotchart2.CIs = | |
function (data, labels, groups = NULL, gdata = NA, horizontal = TRUE, | |
pch = 16, xlab = "", ylab = "", auxdata, auxgdata = NULL, | |
auxtitle, lty = if (.R.) 1 else 2, lines = TRUE, dotsize = 0.8, | |
cex = par("cex"), cex.labels = cex, cex.group.labels = cex.labels * | |
1.25, sort. = TRUE, add = FALSE, dotfont = par("font"), |
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
dotchart2.CIs = | |
function (data, labels, groups = NULL, gdata = NA, horizontal = TRUE, | |
pch = 16, xlab = "", ylab = "", auxdata, auxgdata = NULL, | |
auxtitle, lty = if (.R.) 1 else 2, lines = TRUE, dotsize = 0.8, | |
cex = par("cex"), cex.labels = cex, cex.group.labels = cex.labels * | |
1.25, sort. = TRUE, add = FALSE, dotfont = par("font"), | |
groupfont = 2, reset.par = add, xaxis = TRUE, width.factor = 1.1, | |
lcolor = if (.R.) "gray" else par("col"), ...) | |
{ | |
if (.R. && !add) { |
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(Hmisc) | |
journdat = read.csv("~/Downloads/JournalData.csv", as.is=TRUE, na.strings="N/A") | |
journdat$is.Environmental.Sciences = 0 | |
journdat$is.Environmental.Sciences[grep("*Environmental Sciences*", journdat$ISI.Category)] = 1 | |
summary(Policy.request...require.code ~ Impact.Factor + Policy.has.instructions.for.how.to.cite.data. + Subscription.Model + is.Environmental.Sciences, journdat) | |
response = summary(Policy.request...require.code ~ Impact.Factor + Policy.has.instructions.for.how.to.cite.data. + Subscription.Model + is.Environmental.Sciences, journdat) |
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
import os | |
import time | |
import re | |
import nose | |
from nose.tools import assert_equals | |
from collections import defaultdict | |
import EUtils | |
from EUtils import HistoryClient, ThinClient | |
import dataset | |
import datasources |
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
humans[mesh] AND "magnetic resonance imaging"[mesh] | |
NOT "magnetic resonance imaging/ethics"[mesh] | |
AND "mental disorders"[mesh] | |
AND (fmri[Title/Abstract] OR "Functional MRI"[Title/Abstract] | |
OR "Functional magnetic resonance imaging"[Title/Abstract] | |
OR "Functional MR Imaging"[Title/Abstract]) | |
AND Journal Article[ptyp] AND English[lang] | |
NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp] | |
OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp] | |
OR Comment[ptyp] OR Corrected and Republished Article[ptyp]) |
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
humans[mesh] AND "magnetic resonance imaging"[mesh] | |
NOT "magnetic resonance imaging/ethics"[mesh] | |
NOT "mental disorders"[mesh] | |
AND (fmri[Title/Abstract] OR "Functional MRI"[Title/Abstract] | |
OR "Functional magnetic resonance imaging"[Title/Abstract] | |
OR "Functional MR Imaging"[Title/Abstract]) | |
AND Journal Article[ptyp] AND English[lang] | |
NOT (Editorial[ptyp] OR Letter[ptyp] OR Meta-Analysis[ptyp] | |
OR Practice Guideline[ptyp] OR Review[ptyp] OR Case Reports[ptyp] | |
OR Comment[ptyp] OR Corrected and Republished Article[ptyp]) |
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
import nose | |
from nose.tools import assert_equals | |
from tests import slow, online, notimplemented, acceptance | |
import urllib2 | |
import random | |
import datasources | |
from datasources import pubmed | |
from datasources import urlopener |