vaccination state corrected (first vs second dose), small cleanup
This commit is contained in:
@@ -224,6 +224,10 @@ def get_data():
|
||||
for n in range(1, len(total_vaccinations)):
|
||||
if np.isnan(total_vaccinations[n]) and not np.isnan(total_vaccinations[n-1]):
|
||||
total_vaccinations[n] = total_vaccinations[n-1]
|
||||
# fix vaccination data: not all countries report fully vaccinated
|
||||
for n in range(1, len(people_fully_vaccinated)):
|
||||
if np.isnan(people_fully_vaccinated[n]) and not np.isnan(people_fully_vaccinated[n-1]):
|
||||
people_fully_vaccinated[n] = people_fully_vaccinated[n-1]
|
||||
|
||||
|
||||
###
|
||||
@@ -254,7 +258,7 @@ def get_data():
|
||||
if loc in vaccines_country_dict:
|
||||
metadata[loc]['vaccines'] = vaccines_country_dict[loc]
|
||||
# cast population to int
|
||||
if loc not in ("International", "Africa", "European Union", "Europe", "Asia", "North America", "South America", "Oceania"):
|
||||
if loc not in ("International", "Africa", "European Union", "Europe", "Asia", "North America", "South America", "Oceania", "Northern Cyprus"):
|
||||
try: metadata[loc]['population'] = int(float(metadata[loc]['population']))
|
||||
except: metadata[loc][loc]['population'] = np.nan
|
||||
|
||||
|
||||
Reference in New Issue
Block a user