Skip to content

Instantly share code, notes, and snippets.

# Title: scopusfilter.rb
# Author: Scott Chamberlain, @sckott
# Licence: MIT
# Description: Uses HTTParty
#
# Example use:
#
# {{ '10.1016/j.actao.2009.04.001' | scopus }}
require 'httparty'

install

devtools::install_github("ropensci/elife")
library(elife)

search and get keywords back

Install and load package

install_github("ropengov/rsunlight")
library(ropengov)

Search for data

Install libraries if you don't have them

install.packages(c("phytools","apTreeshape","ggplot2","plyr"))

Load libraries

library(phytools)
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='morris/css/morris.css'>
<script src='morris/js/jquery-1.8.2.min.js' type='text/javascript'></script>
<script src='morris/js/raphael-2.1.0.min.js' type='text/javascript'></script>
<script src='morris/js/morris.min.js' type='text/javascript'></script>
install_github("ropengov/rsunlight")
library("ropengov")
dream <- lapply(c('D','R'), function(x) cw_timeseries(phrase='climate change', party=x,
granularity='month'))
df <- merge(dream[[1]], dream[[2]], by='month', all=TRUE)
df[is.na(df)] <- 0
names(df) <- c('date','D','R')
df$date <- as.character(df$date)

load taxize

library("taxize")

read in data, change to your path

dat <- read.csv("~/Downloads/TPWD Taxonomy Subset.csv")
@sckott
sckott / alm_othersources.md
Last active August 29, 2015 13:59
ALM data from four sources

Install and load alm

devtools::install_github("ropensci/alm")
@sckott
sckott / alm_othersources.md
Created April 11, 2014 17:07
ALM data from four sources

Install and load alm

install_github("ropensci/alm")