MyNixOS website logo
Description

Washington State Legislative Explorer.

Gets data from the Washington State Legislature.

WashEx

CRANstatus R-CMD-check Travis buildstatus

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:

  • Bill summaries
  • Roll calls
  • Amendments
  • Sponsors
  • Committees
  • Committee membership
  • Hearings
  • Revised Code of Washington (RCW)

Installation

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")

Usage

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))
#> # A tibble: 49 x 2
#>    District prop_repub
#>    <chr>         <dbl>
#>  1 1             0    
#>  2 10            0.75 
#>  3 11            0    
#>  4 12            1    
#>  5 13            1    
#>  6 14            1    
#>  7 15            1    
#>  8 16            0.667
#>  9 17            0.667
#> 10 18            1    
#> # ... with 39 more rows

head(getCommittees("2007-08")[,"Name"])
#> [1] "Agriculture & Natural Resources"                                 
#> [2] "Appropriations"                                                  
#> [3] "Appropriations Subcommittee on Education"                        
#> [4] "Appropriations Subcommittee on General Government & Audit Review"
#> [5] "Appropriations Subcommittee on Health & Human Services"          
#> [6] "Capital Budget"

head(getStatusChanges("2007-08", "1001") %>%
  select("HistoryLine", "ActionDate"))
#>                                                     HistoryLine
#> 1        First reading, referred to Public Safety & Emerg Prep.
#> 2                   PSEP - Executive action taken by committee.
#> 3 PSEP - Majority; 1st substitute bill be substituted, do pass.
#> 4                                   Referred to Human Services.
#> 5                     HS - Executive action taken by committee.
#> 6   HS - Majority; 2nd substitute bill be substituted, do pass.
#>            ActionDate
#> 1 2007-01-08T00:00:00
#> 2 2007-02-01T00:00:00
#> 3 2007-02-01T00:00:00
#> 4 2007-02-06T00:00:00
#> 5 2007-02-22T00:00:00
#> 6 2007-02-22T00:00:00

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"))
#> # A tibble: 16 x 3
#>    BillId     repub_support dem_support
#>    <chr>              <dbl>       <dbl>
#>  1 E2SHB 1303        0.457        1    
#>  2 E2SHB 2798        0.943        0.984
#>  3 EHB 3381          0.0571       0.841
#>  4 ESB 5204          1            0.984
#>  5 ESHB 1151         1            1    
#>  6 HB 1311           0.971        0.873
#>  7 HB 1418           0.114        0.937
#>  8 HB 1775           0.957        0.968
#>  9 HB 1888           0.971        1    
#> 10 HB 2467           0.943        0.984
#> 11 HB 3106           0.886        0.952
#> 12 SB 6283           0.943        0.984
#> 13 SB 6284           0.943        0.921
#> 14 SHB 1128          0.0286       0.968
#> 15 SHB 1312          1            0.984
#> 16 SHB 1338          0.943        0.889

Issues

If you encounter any bugs or issues while using the package, please file an issue with a minimum reproducible example on Github.

Metadata

Version

1.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows