nprapps / elections18-general

2018 midterm election back-end: Associated Press data ETL, database, admin panel, and JSON output; iteration upon 2016 GE work
MIT License
3 stars 1 forks source link

Improve `Other` collating for less-competitive races #19

Closed mileswwatkins closed 6 years ago

mileswwatkins commented 6 years ago

If there is only one major-party candidate in the race, then the second candidate should not be collated into Other; that creates weird key-results big-boards like this, when there's clearly a third-party candidate with a good deal of votes:

screen shot 2018-08-15 at 12 19 20

cc https://github.com/nprapps/elections18-graphics/issues/56

mileswwatkins commented 6 years ago

This is a table of how this ought to break down:

Standard competitive races:
- D,R,O,O,... -> D,R
- D,R -> D,R
- D,O -> D,O
- R,O -> R,O

Less likely, relatively uncontested races:
- D,O,O -> D,O
- R,O,O -> R,O

This won't happen for a top-of-ticket seat, but it's handled:
- O,O,O -> O,O

Top-two general election (eg, California or Louisiana):
- D,D -> D,D
- R,R -> R,R

Uncontested races:
- D -> D
- R -> R
- O -> O
mileswwatkins commented 6 years ago

Bam

screen shot 2018-08-17 at 11 46 41