knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The Washington Explorer (WashEx) package creates an interface between R and the Washington State Legislative Web Services. It serves as a companion to Legislative Explorer: Washington, a project developed by John Wilkerson and Rohnin Randles at the University of Washington. The package contains functions to retrieve data regarding the following:
You can install the released version of washex
from CRAN with:
install.packages("washex")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("rwrandles/washex-r")
Some possible implementations of the washex
package include
library(washex) library(tidyverse) sponsors_2007 <- getSponsors("2007-08") sponsors_2007 %>% group_by(District) %>% summarize(prop_repub = round(mean(Party == "R"),3)) head(getCommittees("2007-08")[,"Name"]) head(getStatusChanges("2007-08", "1001") %>% select("HistoryLine", "ActionDate")) ag_bills <- getRCWBills("2007-08", c("15","16")) getRollCalls.votes("2007-08", ag_bills$BillNumber) %>% filter(str_detect("Final Passage", Motion)) %>% mutate(Party = sponsors_2007$Party[match(MemberId, sponsors_2007$Id)]) %>% group_by(BillId) %>% summarize(repub_support = sum(Vote == "Yea" & Party == "R") / sum(Party == "R"), dem_support = sum(Vote == "Yea" & Party == "D") / sum(Party == "D"))
If you encounter any bugs or issues while using the package, please file an issue with a minimum reproducible example on Github
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.