knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(voteviewr) options(width = 90)
Get data from Voteview.com
You can install the released version of voteviewr from CRAN with:
install.packages("voteviewr")
You can install the dev version of voteviewr from Github with:
if (!requireNamespace("remotes")) { install.packages("remotes") } remotes::install_packages("r-congress/voteviewr")
Import Voteview data from the House and Senate for the 116th U.S. Congress
## read using defaults (both chambers of current congress) cng116 <- read_voteview()
or get data from the House and Senate separately for the 115th U.S. Congress
## house 115th data h115 <- read_voteview("house", 115) ## senate 115th data s115 <- read_voteview("senate", "115th")
or specify a session of Congress
## both chambers of 99th Congress cng99 <- read_voteview(99) ## cng99 <- read_voteview(99, "senate")
or specify a year
## get data on the 99th Congress cng1961 <- read_voteview(1961)
A tibble is returned
## preview tibble
cng116
More info on all returned variables
## view object structure str(cng116)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.