Closed alykat closed 7 months ago
Notes from looking at a few examples:
Looking at the county-level data we're generating, for Sullivan County, I see a winner flag for Biden and 0 votes:
Looking at the actual API response for that county, I see a winner flag for Biden:
But the winner timestamp for the county is the same as the winner timestamp for the state overall.
Then I looked at Kansas, where Biden won overall, but "None of the names shown" won 3 counties.
In AP's data, looking at Rawlins County, they mark Biden as the winner (carrying through the overall state call), even though "None of the names shown" had more votes in that particular county.
Our processed county-level data does the same thing:
Yet on the results table itself for the county, we have a checkmark shown for "None of the names shown":
So the logic to designate a county-level winner must be happening within the county-detail
and county-map
components?
Looking at county-detail
, I think the winner assignment is happening here:
If we're at 100% reporting in a county, the top vote-getter is flagged as the winner. So in the case of Sullivan County, MO, the flag happened b/c it was at 100% reporting — but we need to add an additional check for whether that top vote-getter has any results.
Separately, the Rawlins County, KS, example from above reveals a mismatch between EEVP
and reportingPercentage
: We're displaying a winner checkmark based on reportingPercentage
(100%), but since we have EEVP (90%), we should be going based on that. I'll spin that out into a separate ticket.
On the Missouri Dem primary county-level results, there are a few counties that have reported 0 results but Biden is flagged as the winner: https://apps.npr.org/primary-election-results-2024/states/MO.html#date=3%2F23%2F2024&office=P&party=Dem&counties=true&state
Confirming that I see zero results for one of these counties in AP Newsroom as well:
Typically, we'd expect to show no data / no winner flag for counties with no votes reported.