Evolution or the void? A story-driven dashboard over the CFPB Consumer Complaint Database, focused on credit cards: where complaints go, fixed calendar study windows, and issuer patterns.
Live demo: consumer-harm.vercel.app/app (Vercel → Railway) · Railway direct
Repository: https://github.com/tedrubin80/consumer-harm
Defaults are set in period.env.example:
| Window | Range |
|---|---|
| Study | 2011-01-01 → 2024-12-31 |
| Early comparison | 2011–2017 |
| Recent comparison | 2018–2024 |
Complaints outside the study window are excluded at build time.
git clone https://github.com/tedrubin80/consumer-harm.git
cd consumer-harm
mkdir -p data
# First time: build summary (~30–60 min, ~8 GB CSV download)
docker compose --profile refresh run --rm refresh
docker compose up -d dashboard
open http://localhost:8502Mount your data directory:
export OPPORTUNITY_HARM_DATA=/path/to/data
docker compose up -dpip install streamlit pandas plotly
source period.env.example # export vars
bash scripts/refresh-all.sh
streamlit run dashboard/app.py --server.port 8502| Script | Purpose |
|---|---|
scripts/download_cfpb_complaints.py |
Bulk CSV/JSON from CFPB |
scripts/build_cfpb_summary.py |
SQLite aggregates for the dashboard |
scripts/refresh-all.sh |
Download + build (+ optional Docker restart) |
- Railway (Streamlit app): connect repo, root directory
., usesrailway.toml+docker/Dockerfile. Mount volume at/datawithindex/cfpb_summary.db. Seerailway.env.example. - Vercel (landing page): import repo, root
webviavercel.json;/apprewrites to your Railway URL (updatevercel.jsonafter deploy). - GitHub Actions: builds container image on push (see
.github/workflows/docker.yml). - GitLab CI: see
.gitlab-ci.ymlfor the same pattern. - Data is not in git — ship a volume, object storage, or run the
refreshprofile once on deploy.
On the original host, data may live directly under ~/opportunity_harm/cfpb and ~/opportunity_harm/index. paths.py detects that automatically.
MIT (data remains subject to CFPB terms of use.)