# Electoral Studio: research review and product decisions

Research date: 18 October 2026. This is a purposive review of influential research
programmes and published methods, not a numerical ranking of the world's institutions.
It uses institutional documentation, original papers and the supplied ECI archive.
No external election-result dataset has been merged into the archive.

## Review of the existing application

The app already has a valuable evidence base: 47 original reports, 20 cycles,
9,353 PC-cycle records, candidate results and file/page provenance. The compiler
preserves conflicting values and does not invent missing Surat results. These
are the foundation for the upgrade.

The main usability problem is that the interface exposes the archive before it
helps a researcher form a question. Repeated nested dark cards and long candidate
tables make it difficult to see the mandate, identify a close contest, or follow
an analytical thread. Existing “smart” indices are a table rather than an
explanation. Cross-cycle comparisons lack a specific boundary-change check.
There is no reproducible URL state, shortlist, scoped data export, printable brief,
keyboard command search, or central methods/source workspace. Party categories
and electorate columns are easy to overinterpret when their coverage is uneven.

The redesign starts with an election overview, then provides progressively deeper
constituency detail, longitudinal evidence, comparison and methods. The existing
archive and compiler remain independent of the frontend.

## Lessons from major research approaches

| Programme or method | What it contributes | Product implication |
| --- | --- | --- |
| [MIT Election Data + Science Lab](https://electionlab.mit.edu/data) | Official returns at explicit geographic and electoral grains, alongside research tools. | State, cycle and PC are always visible. Data download includes identifiers, denominators and source references. Granularity is never silently changed. |
| [International IDEA turnout database](https://www.idea.int/data-tools/data/voter-turnout-database) | Registration-based and voting-age-population turnout answer different questions. | Label registered-elector turnout; do not claim VAP turnout without population data. Prefer source-reported historical turnout, preserve missingness, and show the covered PC count. |
| [CSES](https://cses.org/about/) | Shared survey modules combined with district, demographic and electoral-system context enable comparison. | Keep a consistent codebook, units and outcome definitions. The ECI returns are not respondent-level survey evidence. |
| [ANES Data Center](https://electionstudies.org/data-center/) | Time-series, panel and cumulative study designs make different longitudinal questions possible. | Separate repeated election outcomes from individual voter transitions. A party's aggregate gain does not identify who switched to it. |
| [British Election Study panel documentation](https://www.britishelectionstudy.com/wp-content/uploads/2024/11/besip_teaching_documentation_v29.1.pdf) | Repeated interviews and survey weights support voter-behaviour analysis. | Do not fabricate survey estimates, individual transitions, sampling intervals or demographic voting preferences from constituency totals. |
| [Lokniti–CSDS NES 2024 method note](https://lokniti.org/media/PDF-upload/1727067413_79394600_method_pdf_file.pdf) | Multi-stage sampling, fieldwork and weighting underpin Indian post-poll research. | Provide a clear path to survey methodology, while restricting the loaded app's claims to election returns and recorded electorate composition. |
| [TCPD / Lok Dhaba documentation](https://lokdhaba.ashoka.edu.in/docs) | Cleaned ECI returns, explicit codebooks and a separate individual-incumbency dataset support Indian electoral research. | Preserve official source identities. A name search is not a verified person identifier; party labels are not automatically harmonized coalitions. |
| [Laakso & Taagepera, 1979](https://journals.sagepub.com/doi/10.1177/001041407901200101) | Effective party numbers summarize concentration rather than merely counting labels. | Implement ENP on votes and seats separately; retain independent units and exact denominators. |
| [Gallagher's original paper](https://www.sciencedirect.com/science/article/pii/026137949190004C) and [author's indices documentation](https://www.tcd.ie/Political_Science/about/people/michael_gallagher/ElSystems/Docts/ElectionIndices.pdf) | Vote–seat disproportionality and effective party numbers distinguish fragmentation from representation. | Implement electoral ENP, parliamentary ENP and the least-squares index with all individual party units retained. The author's legacy PDF URLs are search-indexed but returned 404 during direct retrieval; this retrieval limit is recorded. |
| [Pedersen's original study](https://onlinelibrary.wiley.com/doi/10.1111/j.1475-6765.1979.tb01267.x) | Aggregate changes in party vote shares measure net electoral volatility. | Show an explicitly labelled raw-label change index; party splits, mergers and alliance shifts prevent interpreting it as validated party-system volatility or individual switching. |
| [ECI Assam delimitation notice](https://www.pib.gov.in/PressReleaseIframePage.aspx?PRID=1947865&lang=1&reg=3) | The 2023 delimitation retained 14 PCs but changed their territorial composition. | Comparisons crossing 2019/2024 in Assam receive a specific warning. No automatic PC swing or “seat gained” claim is made from matching names or IDs. |
| [Deckert, Myagkov & Ordeshook, 2011](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/3B1D64E822371C461AF3C61CE91AAF6D/S1047198700012808a.pdf/div-class-title-benford-s-law-and-the-detection-of-election-fraud-div.pdf) | Their analysis finds that Benford conformity and deviations do not reliably diagnose election fraud. | Source disagreements and outliers are described as data-review questions. The product does not assign fraud scores or infer malpractice from a turnout scatterplot. |
| [UK Commons Library constituency dashboard](https://commonslibrary.parliament.uk/constituency-dashboard/) | Constituency-centred exploration with clearly identified geographic sources makes local evidence approachable. | A constituency drawer becomes the reusable destination from charts, seat tiles, tables and search. A seat grid is explicitly non-geographic until verified historical boundaries are available. |

These lessons are design inferences from the cited work, not endorsements of this
application by those institutions. External links are research references;
local electoral values continue to come from the supplied ECI reports.

## Implemented analytical contract

1. **Competition.** Margin is `(winning votes − runner-up votes) / candidate votes × 100`
   for an eligible single-member contest. A configurable close-contest threshold
   is a descriptive choice. It is not a prediction of the next election.
2. **Effective parties.** Electoral ENP is `1 / Σ(vᵢ / V)²`; parliamentary ENP is
   `1 / Σ(sᵢ / S)²`. Use shares as fractions, count each independent as a separate
   unit for these indices, and exclude NOTA. Multi-member constituency ENP is
   retained from the archive; vote-seat metrics require single-member contests.
3. **Vote–seat gap.** Gallagher's index is `sqrt(0.5 × Σ(Vᵢ − Sᵢ)²)` with percentage
   shares. Calculate on the selected observed electoral scope, before collapsing
   small parties into a visual “Others” row. Withhold if candidate votes or party
   identity are incomplete. Label national 2024 as partial because Surat is absent.
4. **Net label change.** `0.5 × Σ|Vᵢ,t − Vᵢ,t−1|` using exact source party labels;
   independents form a pooled IND label in this diagnostic because individual
   candidate identities are not linked. Label it descriptive, not harmonized
   Pedersen volatility. Show the party-level contribution table and caveats.
5. **Participation.** Reported state turnout takes precedence for full state-cycle
   selections. Filtered subsets use voter/elector ratios with a derived label.
   A missing cycle is not a zero and does not get interpolated in the timeline.
6. **Electorate composition.** Display only recorded male/female/third-gender
   totals and coverage. Do not infer religion, caste composition, or how any
   demographic group voted. Early male-column-only reports remain explicitly flagged.
7. **NOTA.** `NOTA / (candidate votes + NOTA) × 100` is labelled the share of counted
   candidate-plus-NOTA votes, not turnout and not necessarily all ballots polled.
8. **Evidence quality.** Source-reported, derived, inferred and unavailable fields
   remain distinguishable. Quality status is not an institutional certification.
   Missing source data never receives an invented value.

No claim of causal effects, demographic vote choice, election fraud, candidate
incumbency, confidence intervals, winning probability, or predictive AI is made.
Those require additional data, identifiers or research designs. “Smart” features
are deterministic and inspectable: query shortcuts, connected selection, a
shortlist, research lenses, factual computed observations, and exportable briefs.

## Visual and engineering contract

Use an editorial light workspace with a forest navigation rail, large serif
headlines, readable sans-serif controls, quiet borders and stable party colors.
Desktop and mobile portrait are sibling layouts. All charts use live data;
generated concepts are design references only and are never rasterized data UI.

| Visual | Analytical job and encoding | Interaction / fallback | Local specialist pass and QA |
| --- | --- | --- | --- |
| Party mandate | Paired vote and seat shares; common 0–100% scale, direct values | Party filter, full tabular values | SVG/DOM + statistical pass; share sums and independent units tested |
| Constituency seat grid | One equal tile per observed PC, winning-party color and label | Click/tap/keyboard opens record; no geographic claim | SVG/DOM pass; tile count equals filtered PC count |
| Competition scatter | Turnout on x, margin on y, one dot per eligible PC | Click/focus/tap record, accessible table equivalent | SVG + statistical pass; bounds, missing-value exclusions, keyboard QA |
| Turnout timeline | Discrete election observations on a fixed year axis, explicit missing cycles | Select cycle; no gap interpolation | SVG + missingness pass; delayed elections and absence checked |
| Party-change table | Diverging percentage-point bars with signed values | Baseline/current selectors; raw-label warning | SVG/DOM + statistical pass; contributions and units tested |
| Candidate results | Sorted candidate rows, source share plus derived valid-candidate share | Drawer, source links, comparison and shortlist | Native table; no null-to-zero conversions, export parity |

The app remains offline and requires no backend, API key, CDN or package install
to open. `studio/` holds maintainable source modules; `build_studio.py` embeds
those UI modules and CSS into `index.html`. Only `eci_data.js` is a companion
runtime file. The compiler's originals and generated master data are preserved.

At most a few SVG charts are mounted per active view, with up to roughly 550
marks in national-cycle views and 20 observations in a historical chart. Use SVG
for selectable labels and downloadable vectors; use native tables for lookup.
A Canvas/WebGL renderer adds no analytical value at this scale. Scoped filters,
view and selected PC are URL-fragment backed; a local shortlist stores IDs only.
Search is debounced; tables paginate; aggregate summaries are cached by scope.
Reduced-motion, focus rings, touch targets, dialog focus management, print layout
and SVG/CSV/JSON exports are part of the interface contract.
