Python project for analyzing U.S. legislative bills. Incorporates high-performance Zig utils for speedy processing.
This project integrates Zig executables for quickly analyzing U.S. legislative bills. This project uses six Zig CLI tools:
| Tool | Description |
|---|---|
clean_bill |
Cleans bill text (removes line numbers, whitespace) |
extract_amendments |
Extracts amendments |
extract_headings |
Extracts section headers (TITLE, SEC.) |
extract_money |
Extracts funding amounts (e.g., $5,000,000) |
filter_keywords |
Filters lines by keyword (listed in keywords.txt) |
split_sections |
Splits full bill into files by section |
Research bills:
Create a data/billname folder (e.g. data/2025-hconres0014/) and using the website, add:
- bill.txt - paste the TXT version of the bill
- amendments.csv - paste this from the Congress.gov site
- keywords.txt - list keywords for that bill (and amendments)
See pro-analytics-01 for recommended workflow for a professional Python project.
Create virtual environment (modify if not using Windows PowerShell):
py -m venv .venv
.\.venv\Scripts\activate
py -m pip install --upgrade pip setuptools wheel
py -m pip install --upgrade -r requirements.txt --timeout 100List required Zig executables in requirements-zig.txt. Install them into zig-out with:
py zig-install-requirements.pyCopy these two files from zig-bill-utils:
- zig-bill-utils-run.ps1
- zig-version.txt
Run pipeline on each data/billname folder in this repo:
./zig-bill-utils-run.ps1MIT License © 2025 Denise Case