openelections / openelections-data-ia

Election results for Iowa
4 stars 6 forks source link

Fix incorrect office entries in 2012 results #41

Closed warwickmm closed 3 years ago

warwickmm commented 3 years ago

This fixes several incorrect office entries by:

  1. Finding candidates that were associated with 2 offices, "foo" and "bar".
  2. If "foo" is obviously incorrect, replace all instances of "foo" in the office column with "bar".
  3. Spot check some of the changes with internet search results.

This might not fix all of the problematic entries (for example, if a candidate is only associated with a bad value, or is associated with more than 2 offices). However, this should hopefully still be an incremental improvement.

This fixes issue #35.

warwickmm commented 3 years ago

There are many files with this type of issue. To facilitate more careful review of the changes, I think I'll submit a separate pull request for each file.

warwickmm commented 3 years ago

I was able to semi-automate the fixes. In total, there are around 126 files that required fixes. Let me know if it's preferred to review these one at a time, or if I should include them all in a single pull request.

Correction: There are 63 files that required fixes.

dwillis commented 3 years ago

@warwickmm you can aggregate them into a single PR.

warwickmm commented 3 years ago

Thanks @dwillis. I've amended this pull request to include all the fixes.