CoolFace
Apppublic

dunevox/tn-election-survey-leaderboard

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

TN Election Survey Leaderboard 2026

A dashboard for the 2026 Tamil Nadu Legislative Assembly election: official-style results tables from the ECI portal, plus opinion/exit poll ranges scraped from Wikipedia and normalized to bloc seat bands.

What is in the repo

PieceRole
src/streamlit_app.pyDashboard: one tab per CSV under src/data/.
src/extract_results.pyFetches ECI party-wise results HTML → results_totals.csv, results_by_party.csv.
src/extract_survey.pyFetches the Wikipedia render → opinion_surveys.csv, exit_surveys.csv.

Blocs in the UI and scripts: DMK+, AIADMK+, TVK, Others (234 assembly seats).

Hugging Face Space

This Space runs the Docker image: Streamlit on port 8501, entrypoint streamlit run src/streamlit_app.py. CSVs shipped under src/data/ power the app; refresh them locally (or in CI) by running the extract scripts, then redeploy.

Local run

bash
pip install -r requirements.txt
streamlit run src/streamlit_app.py --server.port 8501

Regenerate data (from repo root, with network):

bash
python src/extract_results.py
python src/extract_survey.py

For day-to-day development you can also use Poetry (pyproject.toml) instead of requirements.txt.

Links