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
# ggparliament example | |
# Zoe Meers | |
# 12 July 2018 | |
# | |
library(tidyverse) | |
library(ggparliament) # download from github using devtools. | |
# predictions from NY Times -- see https://www.nytimes.com/interactive/2018/03/26/us/elections/house-races-midterms.html | |
# Regarding order -- from the POV of the speaker, Republicans sit to the left of the chamber and Democrats to the right. |
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(ggplot2) # devtools::install_github("hadley/ggplot2") or subtitles won't work | |
library(tidyr) | |
library(dplyr) | |
library(readr) | |
library(scales) | |
URL <- "https://static01.nyt.com/newsgraphics/2016/04/21/undervote/ad8bd3e44231c1091e75621b9f27fe31d116999f/data.tsv" | |
fil <- "nytimes_vote.tsv" | |
if (!file.exists(fil)) download.file(URL, fil) |
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
# load required libraries | |
library(shiny) | |
library(plyr) | |
library(ggplot2) | |
library(googleVis) | |
library(reshape2) | |
####creation of example data on local directory for uploading#### |