Senator Trading Data Platform

A full-stack project: ingest public trading disclosures from US Senators, store clean structured data in PostgreSQL, expose it through an API, and visualize trends on the web.

Open Live App View Code (GitHub)

Architecture

Scraper/ETL → PostgreSQL (Neon) → FastAPI Backend → Frontend UI → Charts & Filters

ETLAPIDatabaseDeployment

Database

Schema designed for fast queries and filtering. Focus on deduplication, constraints, and indexing for the most common user queries (senator, ticker, date range, transaction type).

PostgreSQLIndexesConstraints

Deployment

Backend deployed on Render, DB hosted on Neon. Environment variables, CORS configuration, and API base URL handling for production reliability.

RenderNeonCORSEnv Vars

Engineering Highlights

Data Cleaning

  • Normalize tickers, dates, and transaction categories
  • Handle duplicates across filings
  • Consistent IDs for aggregation

Performance

  • Pagination for large result sets
  • Indexed queries for fast filtering
  • Lightweight endpoints for charts

Future Upgrades

  • Scheduled ingestion jobs (daily/weekly)
  • Anomaly detection on trading volume spikes
  • NLP on disclosure text for richer search
← Back to Projects