Created
April 4, 2014 00:01
-
-
Save sckott/9965340 to your computer and use it in GitHub Desktop.
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
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) | |
library(rCharts) | |
m1 <- mPlot(x = "date", y = c("D", "R"), type = "Line", data = df) | |
m1$set(pointSize = 0, lineWidth = 1) | |
m1 | |
m1$publish("My Chart", host = 'rpubs') # publish to rpubs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment