Skip to content

dwillis/state_legislatures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

State Legislatures

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.

Usage

Download this repository to use server-side, or make client-side requests to the raw versions of any file in the data directory.

Contributing

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.

Prerequisites

Install homebrew, git, ruby and bundler.

Install pdftotext command line utility. If on a Mac, install pdftotext by installing poppler:

brew install poppler

Installation

Download the source code and install package dependencies:

git clone [email protected]:dwillis/state_legislatures.git
cd state_legislatures
bundle install

Conversion Process

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

About

Summary data about state legislative bodies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages