Open dwillis opened 7 years ago
I'm going to give this one a shot today =)
I'm on it.
I have a work-in-progress PR for converting the 2016 General CSV. I'd like to get some feedback on it. Could you grant me permission to add to this repo? Thanks!
Hey @devinbrady: sure thing!
Alabama has precinct-level results for general elections since 2010 and primaries in 2012 and 2016 here. Inside each zipped folder are county-specific Excel files, but the layout is different from what we want. Instead of having each column be a different precinct, we want a file with the following headers:
county
,precinct
,office
,district
,party
,candidate
,votes
The ideal outcome is a Python script that downloads the zip file, extracts its contents, iterates over each county file and writes the output to a single CSV file for each election. For offices that have a district or seat component (U.S. House, state supreme court), put the district or seat in the
district
column. You do not have to include local (county) races, but if it's easier to include all of them, please do.The following elections can be done:
20161108__al__general__precinct.csv
)20160303__al__primary__precinct.csv
)20141104__al__general__precinct.csv
)20121106__al__general__precinct.csv
)20120313__al__primary__precinct.csv
)20101102__al__general__precinct.csv
)