Skip to content

Instantly share code, notes, and snippets.

@luispedro
Created December 13, 2020 11:57
Show Gist options
  • Save luispedro/8e8571ab40599f7402ffe9d672866b7f to your computer and use it in GitHub Desktop.
Save luispedro/8e8571ab40599f7402ffe9d672866b7f to your computer and use it in GitHub Desktop.
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