Coder Social home page Coder Social logo

Comments (2)

davipo avatar davipo commented on August 17, 2024 1

As recommended, I revised parse_sheet() to skip the sheet if a general election office header includes a party. It prints a warning with sheet name, election date & id, office, district, and party.

20121106__wi__general__ward.csv, id 409 is the only file affected. Primary results (for 4 parties) for State Senate district 33 no longer appear in this file.

This avoids editing the input file Ward%20by%20Ward%20Report_1.xlsx manually.

from openelections-data-wi.

nbdavies avatar nbdavies commented on August 17, 2024

Good catch. My reasoning would be...

The two elections can't be conflated (an election can either be general or primary), so as far as the elections API, they need to be separate records.

For election 410, we have a source file that just has that one election included, so that one is okay. But using a source file for election 409 that includes results for election 410 is problematic.

Long story short, the Elections Commission website doesn't have another file available that would replace what we're using now without including the district 33 primary results. Maybe we can add a safeguard that would prevent us from parsing those tabs of the spreadsheet (Sheet198-Sheet201) for the general election results.

Perhaps if we're parsing a general election and the race/office name in the header includes the party, we skip that sheet. We could initially make it throw an error or a message, to make sure it only applies when appropriate, and to see if there are other instances like this we haven't noticed.

from openelections-data-wi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.