openelections / openelections-data-wi

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

Election source files that include more than one election #40

Open nbdavies opened 6 years ago

nbdavies commented 6 years ago

For election 1573 on 2015-02-17, WEC has only one portal page and one ward-level Excel results file:

http://elections.wi.gov/sites/default/files/Spring%20Primary%202.17.15%20Results%20by%20Ward%20Report.xlsx

This file includes results for a partisan primary for state senate, and the non-partisan primary for judicial offices. These two things should be defined as two separate elections, but there's only the one source file.

So one the following would be needed:

davipo commented 6 years ago

To clarify: The reason these elections should be in separate results files is not because one is partisan and the other non-partisan, or because one is legislative and one judicial. They should be separate because the state senate district 20 election is a special primary, and the circuit court election is a regular primary. Is that correct? I could not find a reference to check the election types.

I'd prefer we not implement some special kludge for this case. Let's ask WEC if they can provide separate files.

http://elections.wi.gov/elections-voting/results/2015/spring-primary

We can make a new id in the metadata for the regular primary, linking to the same spreadsheet file. (Correct the offices checkboxes in id 1573.) This will generate a new output file, 20150217wiprimaryward.csv, containing the same results as 20150217wispecialprimary__ward.csv. Both will contain the results for both elections. Not correct, but document the problem.

We could split the spreadsheet into two files manually. So far, all our input data comes directly from the WI Election Commission files, so this would break that.

We could implement a check in the parser, for every election, that verifies that all offices processed match the office checkboxes in the metadata, producing errors if not. This is probably worth doing anyway, it may reveal other discrepancies.

We could filter output results by offices specified in metadata. This would remove the state senate data from 20150217wiprimaryward.csv, but the circuit court results would remain in 20150217wispecialprimary__ward.csv because we have no metadata checkbox for judicial offices. Can we add such a field to the metadata database?

nbdavies commented 6 years ago

Election 413 (2012-04-03) is a similar situation: there is a single source file that contains partisan primary results and non-partisan general results: http://gab.wi.gov/sites/default/files/Results%20by%20Ward_Spring%20Election%20and%20Pres%20Pref%20vote_4.3.12.xls Those should also be split out somehow.

nbdavies commented 4 years ago

Elections 1893/1894 are a similar situation too: The regularly-scheduled non-partisan primary occurred on the same day as a special partisan primary. WEC lists them on a single page: https://elections.wi.gov/node/6697 And the only ward level results file includes both: https://elections.wi.gov/sites/elections.wi.gov/files/Ward%20by%20Ward%20Report_All%20Offices_Spring%20Primary_2_18_20.xlsx Not sure how to best extricate the two elections' results. Maybe some pre- pre- processing, to split certain Excel file sheets out to their own files?

nbdavies commented 4 years ago

This will be fixed for elections 1893/1894 in PR #56.

The solution (for now at least) is to split the Excel source file into two copies (one for the special House results, one for the nonpartisan judicial results), include those in the local_data_cache, and refer to those split source files in the cached copy of the metadata.