alex / nyt-2020-election-scraper

https://alex.github.io/nyt-2020-election-scraper/battleground-state-changes.html
MIT License
1.76k stars 289 forks source link

Fix notifying all states from battleground states page #381

Closed saleemrashid closed 3 years ago

saleemrashid commented 3 years ago
Motivation

When I implemented #380, I misread the code and didn't realized that the states_updated in html_output was not the same as the global states_updated list, which lead to me introducing a bug where the battleground states page would show notifications intended for the all states page.

Changes

Add a state_abbrev dict, similar to state_formatted_name.