nprapps / elections24-primaries

2024 primary/caucus election results
https://apps.npr.org/primary-election-results-2024/
Other
5 stars 1 forks source link

CA Senate primaries (March 3) are open primaries, not split up by party, so results are not displaying as expected #136

Closed alykat closed 7 months ago

alykat commented 7 months ago

Looks like we didn't have to account for this in 2020: https://apps.npr.org/elections20-primaries/states/CA.html#date=3%2F3%2F2020&office=P

Not sure if this can be handled in the config, or if special code will have to be written to handle this.

image
alykat commented 7 months ago

Setting open to TRUE in the config spreadsheet seemed to address the partisan split in the nav.

image

We still have three races showing, two with the same candidates. Need to check if one is a special election, or if we need to specify the race ids to whittle it down to two.

alykat commented 7 months ago

Verified the correct race IDs with AP and loaded in the special primary as a separate event:

Image

Then I noticed that, for both Senate races, if i clicked through to see full results, I'd see ALL Senate results and maps (the regular primary AND the special primary). I also saw that the special=true URL param does not carry through to the county view of results.

I think I've sorted this out here: https://github.com/nprapps/elections24-primaries/commit/4fd392336aba68cd23519f7c75c672baf150d96b

Have verified against CA and TX (has a regular set of Senate primaries) on both standalone pages and the embedded versions, and everything appears to be working as hoped.

alykat commented 7 months ago

Addressed in b13d15f0885eed99f735d02781d43caa236e233f. Spin-off issue: #142