This repository contains CSV files with West Virginia election results. Recent results (2020 and later) are fetched directly from the West Virginia Secretary of State's Clarity Elections system using the scripts described below. Older results were converted from PDFs produced by the state. The filenames are constructed according to the specifications described in the OpenElections documentation.
Older CSV files are converted from original source files from individual counties. You can see county-specific inventories and refer to the below table for overall progress. Elections marked as done have all counties completed for that level. Those marked as working mean that at least one volunteer is working on this election, and this could be a good place to start if you're new. Not started means that this election is wide open and could use a volunteer.
Dependencies are managed with uv. To install:
uv syncDownloads results directly from the West Virginia Clarity Elections system. Accepts a Clarity summary URL and produces CSV output.
County-level results (one row per county per candidate):
uv run python scripts/clarity_parser.py statewide <URL> <output_file>Example:
uv run python scripts/clarity_parser.py statewide \
https://results.enr.clarityelections.com/WV/126209/web.345435/#/summary \
2026/20260513__wv__primary__county.csvPrecinct-level results (one file per county, written into the directory prefix given by filename):
uv run python scripts/clarity_parser.py precincts <URL> <filename_prefix>Example:
uv run python scripts/clarity_parser.py precincts \
https://results.enr.clarityelections.com/WV/126209/web.345435/#/summary \
2026/counties/20260513__wv__primaryThis produces files named <filename_prefix>__<county>__precinct.csv for each county that has XML results available.
Combines per-county precinct CSVs into a single statewide precinct file.
uv run python statewide_generator.py consolidate <year> <election> [election_type]election_type defaults to general. Example:
uv run python statewide_generator.py consolidate 2024 20241105
uv run python statewide_generator.py consolidate 2026 20260513 primaryCounty precinct files must be placed in <year>/counties/ before running. Additional subcommands:
uv run python statewide_generator.py headers <year> <election> # inspect column headers
uv run python statewide_generator.py offices <year> <election> # list unique office names| year | general | primary |
|---|---|---|
| 2024 | done | done |
| 2022 | done | done |
| 2020 | done | done |
| 2018 | done | done |
| 2016 | published | published |
| 2014 | published | published |
| 2012 | done | done |
| 2011 | working | working |
| 2010 | working | working |
| 2008 | working | not started |
| year | general | primary |
|---|---|---|
| 2026 | - | done |
| 2024 | done | done |
| 2022 | done | done |
| 2020 | done | done |
| 2018 | done | done |
| 2016 | published | published |
| 2014 | published | published |
| 2012 | published | published |
| 2010 | published | published |
| 2008 | published | published |
| 2006 | published | published |
| 2004 | published | published |
| 2002 | published | published |
| 2000 | published | published |
To contribute, email openelections@gmail.com and let us know what counties/elections you'd like to work on. You also can leave a comment on one of the issues in this repository. Volunteers can do as much or as little as they like - one county or all of them.