Skip to content

feat: add statewide election probabilities - #6

Merged
dlworrell merged 1 commit into
mainfrom
feat/add-statewide-election-results
Aug 7, 2026
Merged

feat: add statewide election probabilities#6
dlworrell merged 1 commit into
mainfrom
feat/add-statewide-election-results

Conversation

@dlworrell

Copy link
Copy Markdown
Owner

Summary

Adds the supplied Washington All Results workbook as the dated statewide snapshot, extends the standard-library importer for native XLSX, and regenerates the EDT election reports.

The report now gives every modeled decision boundary:

  • a conditional tempered beta-binomial probability of change before certification;
  • a separate 0–100 evidence-reliability score and grade;
  • a probability-sorted at-a-glance table; and
  • machine-readable model, forecast, threshold, and reliability fields.

The statewide remaining-ballot forecast is explicitly documented as a historical proxy (40.43% official 2022 primary turnout applied to about 5.1 million current voters), with forecast evidence set to 45/100. King County retains its official 45% turnout forecast with evidence 75/100.

Source workbook SHA-256: fd4d2a14a01d3945095e92cbb0d0a85b1c0fadc025882c73ed9348da1fbdf43a.

AES-DEV-001

  • Governing architecture, specification, or ADR is linked or updated.
  • Documentation is updated in this change series.
  • Tests are included.
  • Interface and versioning impact is addressed: tool version 0.2.0 and analysis schema version 2.
  • Failure modes, recovery, observability, and diagnostics are documented.
  • The change is one logical, reviewable unit suitable for revert and git bisect.

Governing design: docs/engineering/ADR-001-election-result-reporting.md.

AES-SEC-001

  • The uploaded workbook is treated as untrusted external input.
  • XLSX archive size, relationships, shared-string indices, schemas, numeric values, and normalized contest uniqueness are validated.
  • No banned unsafe interface or custom cryptography is introduced.
  • Unsafe operations are not introduced.
  • Parser regression and publication evidence is supplied.
  • No waiver is required.

The XLSX reader uses only Python's standard library and rejects archives above a 50 MiB uncompressed limit. Source hashes remain in the generated evidence.

Evidence

  • 11 unit and integration tests pass on Python 3.12.
  • 208 races generated from 2 immutable snapshots.
  • 153 modeled boundaries have numeric probabilities; 60 races without a modeled boundary are explicitly marked not applicable.
  • 213 at-a-glance rows cover all races and separate judicial boundaries.
  • No race has valid votes exceeding its reconciled ballot denominator.
  • Seven source denominator discrepancies are disclosed and reconciled from valid votes + overvotes + undervotes.
  • EDT overall quality: 100/100, publication ready.
  • EDT validation: 0 findings, 0 errors, 0 warnings.

@dlworrell
dlworrell merged commit 33c9a09 into main Aug 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant