Skip to content

drawjk705/us-congress

Repository files navigation

Imports: isort pre-commit

Release CI

US Congress

Client for getting information on the US Congress.

Requirements

For this package to work, you must get an API key from ProPublica, whose API this uses, and set the following the environment variable PROPUBLICA_CONG_KEY to whatever that key is, either with

export PROPUBLICA_CONG_KEY=<your key>

or in a .env file:

PROPUBLICA_CONG_KEY=<your key>

Getting started

To install with pip, simply run

pip install us_congress
>>> from us_congress import Congress
>>> cong = Congress(116)
>>> cong
<Congress 116>

This will return a client for querying data on a particular congress (in the above example, the 116th Congress).

Right now, this enables only getting lists of Representatives and Senators:

cong.getRepresentatives() # DataFrame with all representatives
cong.getSenators()        # DataFrame with all senators

About

Client to work with US Congress data

Resources

License

Stars

Watchers

Forks

Contributors

Languages