nprapps / elections24-general

Other
0 stars 0 forks source link

County results table + scatterplot: Rework logic for determining which candidates/parties are featured #355

Open alykat opened 3 weeks ago

alykat commented 3 weeks ago

Ideally, this should match the top 2 candidates statewide (and the table at least should have flex to add another if there's a prominent additional candidate?). We found a few edge case examples where the candidates shown appeared to match the top 2 candidates in the first county/township alphabetically. There was odd behavior both with 0 results in (defers to dem/rep candidate, which can be an issue if the independent is the incumbent or otherwise prominent) and with results counting (shows the current top 2 candidates in that jurisdiction, who many not be leading nationally).

Tickets from @abidishajia's quick patches for Maine Senate for examples and more context: