Bills, Resolutions, and Amendments
This is one of the core tasks of the project. It collects and processes data on all bills, resolutions, and amendments from the official bulk data repository provided by Congress.
How It Works
Collecting bill data is a two-step process:
- Download Bulk Data: The
govinfo
task is used to download theBILLSTATUS
bulk data collection. This contains XML files with detailed metadata for each piece of legislation. - Process Data: The
bills
task parses these raw XML files and transforms them into structureddata.json
anddata.xml
files.
Usage
To get all bill data, run the following commands in sequence:
# 1. Download the raw BILLSTATUS XML files from GovInfo.gov
usc-run govinfo --bulkdata=BILLSTATUS
# 2. Process the downloaded XML into JSON and legacy XML formats
usc-run bills
The scripts/bills.sh
script automates this two-step process.
Options
In addition to the common options, the bills
task supports several specific flags:
--congress=<number>
: Restrict processing to a specific Congress. This is highly recommended for faster runs. You can provide a comma-separated list (e.g.,--congress=116,117
).--bill_id=<id>
: Process only a single bill. The ID should be in the formathr123-117
. You can provide a comma-separated list.--limit=<count>
: Process only the firstcount
number of bills found.--amendments=False
: By default, the script also processes amendment data found within the bill status files. Set this toFalse
to skip amendment processing.--reparse_actions
: A special mode to re-run the action parsing logic on existingdata.json
files without re-downloading anything. This is useful for development when the action parsing logic is updated.
Example
To process all bills from the 117th Congress and generate GovTrack-compatible XML:
usc-run govinfo --bulkdata=BILLSTATUS --congress=117
usc-run bills --congress=117 --govtrack
Output Structure
Processed bill data is stored in the following structure:
data/{congress}/bills/{bill_type}/{bill_type}{bill_number}/
For example, data for H.R. 4350
from the 117th Congress would be located in data/117/bills/hr/hr4350/
.