This repository contains summary data about state legislative bodies as compiled by the National Conference of State Legislatures (NCSL) from 2009-2016, including partisan compositions and gender compositions.
Data in this repository has been transformed and validated using automated, repeatable processes.
Download this repository to use server-side, or make client-side requests to the raw versions of any file in the data directory.
When new data is posted by NCSL, add the source url to lib/ncsl/gender_composition.rb or lib/ncsl/party_composition.rb, then run the appropriate conversion process.
Install homebrew, git, ruby and bundler.
Install pdftotext
command line utility. If on a Mac, install pdftotext
by installing poppler
:
brew install poppler
Download the source code and install package dependencies:
git clone [email protected]:dwillis/state_legislatures.git
cd state_legislatures
bundle install
Download party composition pdf files and convert to machine-readable formats:
ruby script/etl_party_compositions.rb
Scrape gender composition html tables and convert to machine-readable formats:
ruby script/etl_gender_compositions.rb