fix to covid visualiser, sometimes deaths are null (#139)

This commit is contained in:
joec237 2020-07-05 14:36:17 -04:00 committed by GitHub
parent eff5756354
commit 31e7288881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ for i in range(1,len(statewise_covid_data)):
mp = folium.Map(location = [city_data[1]['lat'],city_data[1]['lng']],zoom_start= 5)
for i in range(len(city_data)):
if "deaths" in city_data[i]:
if float(city_data[i]['deaths']) > 50:
folium.Marker(location = [city_data[i]['lat'],city_data[i]['lng']],
popup = city_data[i]['state'],