The Question
How prominent are interest groups in congressional floor speeches, and what predicts that prominence? This project operationalizes a concept that does not have a clean label, “interest group presence in political speech,” and builds the measurement infrastructure to study it at scale.
What I Built
A five-stage NLP pipeline that processes raw Congressional Record documents from the GovInfo API into a multi-level analytical dataset. This is the post-graduation rebuild of my MSc thesis pipeline; the original thesis classifier was Multinomial Naive Bayes with TF-IDF features (F1 ≈ 0.73), and the rebuild is a separate artifact with its own corpus and metrics:
- Data Collection: Custom Python scraper pulling House and Senate granules from the GovInfo API with retry logic and rate limiting
- Text Processing: HTML parsing, sentence segmentation, dictionary-based entity extraction with character offsets against a lookup dictionary of 5,447 advocacy organizations (Washington Representatives Study)
- Classification: TF-IDF + Logistic Regression with group-aware cross-validation and threshold optimization, reaching a test F1 of 0.91 (threshold-tuned on the test set, n = 192; group-aware cross-validated F1 = 0.67)
- Integration: Merges mentions with lobbying data (OpenSecrets), legislator metadata, and bill references into a 4-level analytical dataset
- Analysis: Logistic regression and OLS models with automated figure/table generation
Key Findings
The pipeline identified 53,892 mentions of 2,260 unique organizations across the 114th-115th Congress. Agreement between the classifier and the human gold labels on the test set reached Cohen’s kappa of 0.82 (labels from a single coder).
The classification approach uses SHAP feature attribution to make the model interpretable – you can see exactly which textual features drive prominence classification for any given mention.
Methodology Notes
“Prominence” is not a binary observable. It requires construct definition, annotation scheme design, and threshold optimization, and the same thinking that goes into operationalizing hard-to-measure social science concepts applies directly to designing rubrics for AI evaluation. I wrote about this connection in “What Political Science Can Teach AI Evaluation”.
Links
- Interactive Dashboard – explore regression results, case studies, and model diagnostics
- GitHub Repository – full pipeline code with documentation
- Methodology Documentation
- Known Limitations
- Full Thesis (PDF)
Notebooks
- Analysis Showcase – end-to-end analysis with 3 regression models and 5+ visualizations
- Classification Deep Dive – SHAP attribution, error analysis, calibration plots
- Exploratory Analysis – distribution analysis, lobbying vs. prominence patterns