Skip to content

Edilberto Lima Jr.Rio Branco,

← back to the work

Personal project · public data 2026

Vizu Eleições

Acre's election results, from the whole state down to a single polling section. Maps, rankings and candidate comparison on electoral court data, built on a Python ETL that always produces the same output.

Role
Author
Stack
Python, Next.js, TypeScript, Convex, MapLibre, Vitest, Playwright.
Municipal map of Acre colored by the leading candidate for governor, with a vote summary alongside

Context

A Python pipeline prepares the electoral court's results, loads them into Convex and shows them as maps, rankings and comparisons, from the whole state down to a single section, with CSV export.

1 An automatic sequence of steps that takes data from the source to where it's used: download, clean, check, publish.

Decisions

Running the ETL twice must never give different results.
Deterministic preparation with SHA-256 hashes: a second run produces exactly the same files.2 Same input, same output, every time.3 A file's fingerprint. If a single byte changes, the fingerprint changes.
Long imports fail halfway.
Batched imports with resume points that can be repeated without duplicates.4 A mark of how far the import got. If it fails, it restarts from there instead of from zero.
A wrong total on an election map is worse than no map.
Totals are checked automatically between Python and the database, and the map uses IBGE's 2025 municipal boundaries in MapLibre.

Results

  • Searchable from the whole state down to the polling section, in every municipality in Acre.