Created
December 13, 2020 11:57
-
-
Save luispedro/8e8571ab40599f7402ffe9d672866b7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import COVID19Py | |
covid19 = COVID19Py.COVID19() | |
locations = covid19.getLocations(timelines=True) | |
UK = '2020-12-03T00:00:00Z' | |
EU = set(['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LU', 'MT', 'NL', 'PL', 'RO', 'SK', 'SI', 'ES', 'SE']) | |
tot = 0 | |
for loc in locations: | |
if loc['country_code'] in EU: | |
tim = loc['timelines']['deaths']['timeline'] | |
tot += max(tim.values()) - tim[UK] | |
print(f'Since the UK approved a vaccine, {tot} have died on covid in the EU') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment