Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wisconsin results files don't have total votes/winner/write-in columns filled in #274

Open
nbdavies opened this issue Feb 16, 2019 · 3 comments

Comments

@nbdavies
Copy link
Contributor

nbdavies commented Feb 16, 2019

Total votes is present in the openelections-data-wi repo data, so all we should have to do is make sure that gets into the Mongo data and then output in the raw data.

The write-on column should be possible to fill based on candidate name (which ought to have (Write-In) or (Write In) if the candidate is one).

Marking the winner might be a little trickier, but maybe I can base that off of another state's logic.

@nbdavies
Copy link
Contributor Author

nbdavies commented Mar 13, 2019

There are some descriptions of these fields as defined on classes in the repo:

class RawResult(TimestampMixin, DynamicDocument):
    total_votes = IntField(help_text="Total candidate votes contest-wide, if provided in raw results.")
    winner = StringField(help_text="Winner flag, if provided in raw results.")
    write_in = StringField(help_text="Write-in flag, if provided in raw results.")

class Result(TimestampMixin, DynamicDocument):
    total_votes = IntField(help_text="Total candidate votes contest-wide, either from raw results or calculated by OpenElex."
            "Requires validation if migrated from raw results.")
    winner = BooleanField(help_text="Winner of jurisdiction, *not* contest winner. Some data flags lower-level results "
        "as winner if candidate won contest-wide. In such case, this field should blank")
    write_in = BooleanField()

Where a Contest is a match-up of candidates (specific to a date, an office, possibly a district, possibly a party).

It sounds like these are all optional at the Raw stage that we're currently at.

Write-In

There could be a case for removing (Write-In) from the candidate name (since it doesn't really belong there) and filling in the write-in column when that happens.

Here's an example of another state's results with the write-in column filled in:
https://raw.githubusercontent.com/openelections/openelections-results-va/master/raw/20181106__va__general__precinct__raw.csv

Total Votes

Total votes, as I understand it, would be a little more challenging. It sounds like the value for that column is supposed to be the the candidate's total votes for the entire contest. This West Virginia column has that filled in:
https://github.com/openelections/openelections-results-wv/blob/master/raw/20000509__wv__primary__county__raw.csv

The total votes in the CSVs from the openelections-data-wi repo is total across candidates per ward, so it's a different total.

Winner

It sounds like winner is meant to be the winner at the micro scale: whichever candidate for that race has the most votes in a given ward. So for example:

county,ward,office,district,total votes,party,candidate,votes
Brown,Town Of Lawrence Wards 1 - 3,State Senate,2,1331,REP,Robert L. Cowles,892
Brown,Town Of Lawrence Wards 1 - 3,State Senate,2,1331,DEM,Nancy J. Nusbaum,434
Brown,Town Of Lawrence Wards 1 - 3,State Senate,2,1331,,Scattering,5

For that reporting unit, Cowles would be the winner regardless of whether he won overall. Determining that would also take some further processing of the results. For non-partisan primary elections where the top two vote-getters proceed to the general election, we may need to clarify that winner at the micro level is still the top one candidate for the ward.

@psa
Copy link

psa commented May 8, 2020

Poking around for ways to contribute, is this fixed by #275?

@nbdavies
Copy link
Contributor Author

I would say it's 1/3rd fixed? #275 filled in the write-in column, but not the winner or total votes columns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants