alex / nyt-2020-election-scraper

Home Page:https://alex.github.io/nyt-2020-election-scraper/battleground-state-changes.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Negative vote count - upstream data or display bug?

konklone opened this issue · comments

Seeing this:

image

Yes, this is due to upstream data. The NYT stream gives a tot_exp_vote for each county that we sum up to give the total estimated votes for the State. We then withdraw the number of votes casted. So the number of votes casted probably just went above the expectations

The underlying cause here is that the votes remaining is computed by taking the estimated number of total votes and subtracting the number of computed votes. Clearly the estimate was a bit low for whatever reason. We get both these numbers from NYT (who get them from Edison Research):

  1. Hopefully NYT/Edison revises their estimates
  2. Maybe we can render something better.

Yeah, maybe never let the remaining Votes get negative so the needed Percentage can not be reversed.

image

#290 is an error-handling side-effect of this.

commented

Maybe as a temporary fix, have if the Votes Remaining and Percent Needed columns go to N/A, possibly with a link to this issue if the votes remaining go below zero.

It's made clear in multiple places the total votes remaining is an estimate, and going negative I think is less confusing than being constrained to 0. The hurdle column should just be listed as NA, as the current calculation makes no sense.