openelections / openelections-data-wi

Pre-processed election results for Wisconsin elections
9 stars 9 forks source link

Parser should check that district is present if and only if required by office #46

Closed davipo closed 5 years ago

davipo commented 5 years ago

These offices require a district: House, State Senate, State Assembly, Court Of Appeals. Parser should check that a district is present in records with these offices, and not present for others.

davipo commented 5 years ago

Revised cleaner.py to do this check. It found district missing for one election on 2018-05-15, for office "STATE SENATOR DISTRICT 1-Democratic".

Revised parse_office() to separate district from party for this case. No similar problems found. Fixed in commit c73a218.

Note that code added for issue #42 has a similar check that is performed on the test data.