Roll Call Votes

This task scrapes roll call vote data directly from the House Clerk's office (clerk.house.gov) and the Senate's official website (senate.gov).

Usage

To fetch votes for the current session of Congress, run:

usc-run votes

To fetch votes for a specific session, use the --congress and --session flags.

# Fetch all House and Senate votes for the 2021 session of the 117th Congress
usc-run votes --congress=117 --session=2021

Options

  • --congress=<number>: The Congress to fetch votes for.
  • --session=<year>: The session year (e.g., 2021). For a given Congress, there are typically two session years.
  • --sessions=<c.y,c.y>: A comma-separated list of congress-session pairs to fetch, e.g., --sessions=117.2021,117.2022.
  • --chamber=<house|senate>: Limit the scrape to either the House or the Senate.
  • --vote_id=<id>: Fetch a single, specific vote. The ID format is h123-117.2021 for the House or s45-117.2021 for the Senate.
  • --limit=<count>: Process only the first count number of votes found.
  • --fast: A special flag that only downloads new votes or votes from the last three days. This is useful for frequent, quick updates.

Example Script

The scripts/votes.sh script provides an example of how to fetch vote data for a large range of historical congresses (101st through 113th).

#!/bin/sh
usc-run votes --govtrack --congress=101 --session=1989 --chamber=senate $@
usc-run votes --govtrack --congress=101 --session=1990 $@
usc-run votes --govtrack --congress=102 --session=1991 $@
# ... and so on ...

Output Structure

Processed vote data is stored in:

data/{congress}/votes/{session_year}/{chamber}{vote_number}/

For example, House roll call vote #34 in the 2021 session of the 117th Congress would be at data/117/votes/2021/h34/data.json.