An election data interface can return a perfectly formatted number and still leave the reader with the wrong impression. The missing information may be the jurisdiction, the stage of reporting, the time the source changed, or the fact that a newer file replaced an earlier one. Reliable presentation begins with preserving those distinctions through every step from source publication to the final screen.

This article develops a proposed design for reading and displaying aggregate election information. All numerical examples are invented. It does not describe a live data feed or ballot submission system. Start with the Election Vote API overview if you need to separate the subject’s different use cases before designing a pipeline.

Treat provenance as part of the record

Provenance answers where a value came from and what happened to it along the way. Record the publishing organization, the original dataset or document identifier, the retrieval location, and your import identifier. Preserve the original artifact when permission and operational policy allow it. A normalized record should be traceable to the material that produced it, even after the upstream page changes.

A source URL alone is weak provenance if that address always serves the latest file. Add a content digest or another immutable reference to distinguish two downloads from the same location. Keep the transformation version alongside the imported data. When a reader reports a mismatch, this information lets you inspect whether it originated in the source, the parser, the mapping, or the display.

Choose one source policy for each scope

Decide in advance which publisher supplies each jurisdiction and contest. If you combine sources, describe why and define a precedence rule. Do not select whichever number is newest or largest without considering whether the records cover the same thing. A local release and an aggregated release might overlap completely, partially, or not at all.

Carry result status without inventing certainty

For the United States, the Election Assistance Commission’s explanation of results, canvass, and certification distinguishes election-night reporting from final certified results. It also explains that procedures and certification responsibilities vary by jurisdiction. A media projection is different from official certification. These distinctions support a clear interface requirement: preserve the source’s stated stage and do not upgrade it based on your own interpretation of a lead.

Use two fields if necessary: the original source status and a documented normalized status. If a publisher’s wording does not map cleanly into your categories, preserve the wording and mark the mapping unresolved. A label such as “final” must have a defined meaning in that dataset. It should not merely mean that your importer has stopped running or that a visualization is complete.

Model the reporting geography explicitly

A total is meaningful only within its scope. Store the country, jurisdiction, contest, reporting unit, and reporting level separately where the source supports them. A county total and a precinct total are different kinds of records, even when they contain the same candidate identifier. Include the election edition or cycle in joins so that similarly named contests from different years cannot merge.

Suppose an invented county report contains 900 votes and its included precinct reports contain 400 and 500. Adding all three records produces 1,800, an obvious double count. Your schema should tell the aggregator whether a row is a parent total or a component. Choose one complete, non-overlapping layer for a particular calculation, and document the conditions under which fallback layers may be used.

Preserve three different clocks

A useful design distinguishes source_updated_at, retrieved_at, and published_at. The first belongs to the upstream representation, when supplied. The second records when your system obtained it. The third records when your product made the normalized version visible. These clocks answer different questions and can legitimately have different values.

Consider an invented source file stamped 21:10 that your importer retrieves at 21:16 and publishes at 21:18. A display saying “Updated 21:18” leaves the reader unsure whether votes changed then. A clearer presentation says “Source update: 21:10; page refreshed: 21:18,” with the timezone available. If the source timestamp is unknown, show that absence instead of assigning the retrieval time to it.

Keep timestamps in a consistently defined format and retain the information needed to display local time correctly. Also record an import sequence or snapshot identifier. Clock comparisons alone can become awkward when upstream files arrive late or their declared times are corrected. A snapshot reference gives you an unambiguous handle on the representation readers actually saw.

Explain coverage without a misleading progress meter

“Percent reporting” needs a denominator. It could refer to reporting units, expected ballots, or another measure defined by the source. Those concepts are not interchangeable. Two reporting units can have very different sizes, and one unit might have published only a partial update. If the denominator is unavailable, omit the calculated percentage rather than turning a count of received files into an election completion claim.

Describe coverage in literal terms. For a hypothetical dataset, “18 of 24 expected unit records received” is narrower and clearer than “75% of votes counted.” Store the expected-unit list and its version if you compute that measure. When the source changes its reporting structure, the denominator should change transparently rather than producing an unexplained jump in apparent progress.

Distinguish snapshots from incremental batches

Before combining updates, identify whether each file replaces previous totals or contains additional amounts. Suppose a first snapshot reports Choice A at 420 and a later snapshot reports 460. The latest total is 460. Summing both snapshots would produce 880, which does not describe either publication. Conversely, replacing an accumulated total with one incremental batch would discard earlier information.

Write the update rule into the source adapter and test it with clearly labeled sample files. Record whether the publisher supplies cumulative totals, separate batch identifiers, or a mixture at different levels. If the semantics are uncertain, pause aggregation for that source and retain the raw material for review. A successful parse is not sufficient evidence that addition is appropriate.

Make corrections visible and reproducible

Preserve successive snapshots rather than overwriting the only copy of a record. A revision entry can identify the previous snapshot, the new snapshot, the changed fields, and the supplied explanation. If no explanation accompanies a changed value, say that the source revised the record without inventing a cause. A numerical decrease alone does not identify what happened operationally.

Separate a source correction from your own processing correction. If a parser assigned a row to the wrong contest, document the import issue and the corrected mapping. Rebuild affected aggregates from their inputs, then invalidate the relevant cached pages. The read-only Vote API contract guide explains how versioning and failure states help downstream consumers handle these changes.

Handle gaps and disagreements deliberately

A missing row should remain missing. Do not treat it as zero, infer an outcome from neighboring areas, or copy a number from a differently scoped contest. If two permitted sources disagree, keep their identities and timestamps attached while you investigate. Your interface can display an unresolved source discrepancy without deciding which publisher is correct.

Plan a visible stale-data state for interruptions. Show the last successful source time, explain which coverage is affected, and keep unrelated portions of the page usable when appropriate. Give editorial reviewers a short reconciliation view with source references and transformation notes. For national presidential summaries, the presidential result modeling guide covers additional distinctions between popular totals and electoral allocations.

Conclusion: make every total explainable

A useful election data API preserves meaning while moving information between systems. Source lineage, reporting geography, publication stage, timestamps, and update semantics belong beside the values they describe. Build aggregation rules from documented source behavior, keep revisions reproducible, and present uncertainty plainly. Readers should be able to understand what a displayed figure covers and which publication supports it without mistaking the interface itself for an election authority.