nprapps / elections24-primaries

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

Allow for custom footnotes by race ID #90

Closed alykat closed 10 months ago

alykat commented 10 months ago

A request from Wash Desk.

Specific to NH Dem presidential primary, we need a footnote to the effect that "Biden isn’t on the ballot in NH but his allies are mounting a write-in campaign there."

I wonder if there's a way to handle this similar to the calls sheet? Race id as key, footnote as value? (This may actually be implemented in the general election rig. For the primaries rig we can have a footnote that appears above both primaries that are happening for a particular seat (specified in the races sheet), but since it'd also follow the GOP result table around, it's not quite appropriate to this situation.

Would be good to have ahead of New Hampshire.

alykat commented 10 months ago

Started on this in the https://github.com/nprapps/elections24-primaries/tree/90-footnotes branch. I have it successfully working on presidential result tables. Not sure how to best test this for non-presidential results tables b/c we haven't had any of those yet.

brentajones commented 10 months ago

Footnotes are only added on elections that fall within the 3-day window run by the elex task. They should be added to any matching results page/embed.

brentajones commented 10 months ago

Footnotes are added to the JSON file for the race and won't display until then. This happens either when the race is within the window or if alwaysRun is set to TRUE in the spreadsheet.