denisecase/py-bill-utils
Python project for analyzing U.S. legislative bills. Reference project for adding high-performance Zig to Python projects.
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:
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 100
List required Zig executables in requirements-zig.txt
. Install them into zig-out
with:
py zig-install-requirements.py
Copy these two files from zig-bill-utils:
Run pipeline on each data/billname
folder in this repo:
./zig-bill-utils-run.ps1
MIT License © 2025 Denise Case