nprapps / elections18-graphics

2018 midterm election front-end; iteration upon 2016 GE work
MIT License
5 stars 1 forks source link

If independent wins a House race, the BoP bar-chart label won't work #197

Closed mileswwatkins closed 6 years ago

mileswwatkins commented 6 years ago
screen shot 2018-10-22 at 13 17 57

Essentially unlikely to happen though

alykat commented 6 years ago

Bringing this back b/c of AK-House

mileswwatkins commented 6 years ago

It looks like the Alaska House race is still a two-person, major-party-only contest, right? (FTE, RCP)

alykat commented 6 years ago

Updated the code so that independent winners in the House go to the D side of the bar, which should cover us for the AK case if that goes that way. Will need to verify footnote language (and when it should be deployed) w/ Arnie.

image

Doesn't solve the problem entirely (what if there's a major third-party GOP-friendly candidate next time around?), but maybe addresses it for now.

mileswwatkins commented 6 years ago

Very good catch. The AP API lists her party as Udl, even though she won the Democratic nomination later on.

Another option would be to override her party value to Dem; maybe that would be editorially clearer?

mileswwatkins commented 6 years ago

I'll also need to update the BoP/chamber-calling logic to handle this individual, if we don't hard-code her to Dem.

mileswwatkins commented 6 years ago

It looks like we could insert a party override via Peewee/SQL, right before finishing results-load:

https://github.com/nprapps/elections18-general/blob/master/fabfile/data.py#L153-L156

mileswwatkins commented 6 years ago

No footnote needed, and Galvin will now be treated like a Democrat, so we're all clear here.

mileswwatkins commented 6 years ago
screen shot 2018-11-05 at 13 32 16