Notebook para el curso de Ciencia de Datos de la UACA (Especialidad Ciencias de la Salud )

elaborada por el Dr. Juan I. Barrios el 5-3-2021

In [1]:
## Aca se importan las librerias necesarias, la mas importante para esta prueba es PANDAS 
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('darkgrid')
%matplotlib inline
In [2]:
##Con este comando leemos los datos de la web 
dataframe=pd.read_csv('https://github.com/owid/covid-19-data/blob/master/public/data/owid-covid-data.csv?raw=true', error_bad_lines=False)
In [3]:
# Listados los primeros registros del set de datos
dataframe.tail(5)
Out[3]:
iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths new_deaths_smoothed ... gdp_per_capita extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index
78452 ZWE Africa Zimbabwe 2021-03-26 36805.0 27.0 21.857 1518.0 0.0 1.143 ... 1899.775 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571
78453 ZWE Africa Zimbabwe 2021-03-27 36818.0 13.0 22.286 1519.0 1.0 1.286 ... 1899.775 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571
78454 ZWE Africa Zimbabwe 2021-03-28 36822.0 4.0 22.429 1520.0 1.0 1.143 ... 1899.775 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571
78455 ZWE Africa Zimbabwe 2021-03-29 36839.0 17.0 22.143 1520.0 0.0 0.857 ... 1899.775 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571
78456 ZWE Africa Zimbabwe 2021-03-30 36839.0 0.0 17.429 1520.0 0.0 0.571 ... 1899.775 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571

5 rows × 59 columns

In [4]:
## Agregamos nuevas variables al dataset
df=dataframe
dataframe_pais=dataframe[['location','continent','total_vaccinations','people_fully_vaccinated','population']]
dataframe_pais.tail(5) 
Out[4]:
location continent total_vaccinations people_fully_vaccinated population
78452 Zimbabwe Africa 61093.0 NaN 14862927.0
78453 Zimbabwe Africa 65466.0 NaN 14862927.0
78454 Zimbabwe Africa 68511.0 NaN 14862927.0
78455 Zimbabwe Africa 69751.0 NaN 14862927.0
78456 Zimbabwe Africa NaN NaN 14862927.0
In [5]:
##  aca agrupamos los registros de acuerdo a las variables location y continente, creamos un nuevo dataset y le decimos al nuevo data set (df_pais) las variables adicionales que vamos a utilizar
dataframe_pais=dataframe_pais.groupby(['location',])['continent', 'total_vaccinations','people_fully_vaccinated','population'].last().reset_index()
C:\Users\Tommy\Anaconda3\envs\geo_env\lib\site-packages\ipykernel_launcher.py:2: FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead.
  
In [6]:
## aca listamos ese nuevo dataset pero solo los primeos 5 registros (heading) 
dataframe_pais.head()
Out[6]:
location continent total_vaccinations people_fully_vaccinated population
0 Afghanistan Asia 54000.0 NaN 3.892834e+07
1 Africa None 10305267.0 3857478.0 1.340598e+09
2 Albania Europe 64075.0 655.0 2.877800e+06
3 Algeria Africa 75000.0 NaN 4.385104e+07
4 Andorra Europe 9288.0 1265.0 7.726500e+04
In [7]:
## ahora ordeno el dataset nuevo por la nueva variable Cobertura en forma descendente  y creamos nuevas variables
df1=dataframe[[ 'location', 'date','total_vaccinations',
       'people_vaccinated', 'people_fully_vaccinated', 'new_vaccinations',
       'population',]]
# df1['new_vaccinations'].fillna(0,inplace=True)
# df1['7-day_average_vaccination']=df1.groupby('location')['new_vaccinations'].transform(lambda x: x.rolling(7).mean())
# df1['Average_daily_doses']=df1['7-day_average_vaccination']/df1['population']
# df1=df1.groupby('location')['Average_daily_doses'].mean().reset_index()
# dataframe_pais['Days_70%_vaccination']=((dataframe_pais['population']*0.7)-(dataframe_pais['total_vaccinations']*0.5))/(df1['Average_daily_doses']*0.5)
dataframe_pais['Cobertura']=(dataframe_pais['total_vaccinations']*0.5)/dataframe_pais['population']*100
dataframe_cobertura=dataframe_pais.sort_values('Cobertura',ascending=False)
In [8]:
## creamos un nuevo dataset "df_cobertura" con las coberturas de los 10 paises con las coberturas de vacunación mas altas
dataframe_cobertura.dropna
dataframe_cobertura_sort=dataframe_cobertura.head(10) 
dataframe_cobertura_sort.plot.bar(y='Cobertura',x='location', rot=25)
dataframe_cobertura.columns
Out[8]:
Index(['location', 'continent', 'total_vaccinations',
       'people_fully_vaccinated', 'population', 'Cobertura'],
      dtype='object')
In [9]:
dataframe_cobertura
Out[9]:
location continent total_vaccinations people_fully_vaccinated population Cobertura
75 Gibraltar Europe 59050.0 27952.0 33691.0 87.634680
96 Israel Asia 10000972.0 4764642.0 8655541.0 57.772079
172 Seychelles Africa 100552.0 36866.0 98340.0 51.124670
202 United Arab Emirates Asia 8220783.0 2187849.0 9890400.0 41.559406
36 Cayman Islands North America 47602.0 17958.0 65720.0 36.215764
... ... ... ... ... ... ...
206 Uzbekistan Asia NaN NaN 33469199.0 NaN
207 Vanuatu Oceania NaN NaN 307150.0 NaN
208 Vatican Europe NaN NaN 809.0 NaN
212 Yemen Asia NaN NaN 29825968.0 NaN
213 Zambia Africa NaN NaN 18383956.0 NaN

215 rows × 6 columns

Países mas avanzados en el proceso de vacunación

In [10]:
plt.figure(figsize=(12,8))
sns.barplot(x = "location", y = "Cobertura", data = dataframe_cobertura.head(10))
plt.xticks(rotation=70)
plt.show()
In [11]:
dataframe_cobertura=dataframe_pais.sort_values('Cobertura',ascending=True)
dataframe_cobertura.dropna()
dataframe_cobertura.head(10) 
Out[11]:
location continent total_vaccinations people_fully_vaccinated population Cobertura
56 Egypt Africa 1315.0 NaN 102334403.0 0.000643
136 Namibia Africa 152.0 NaN 2540916.0 0.002991
14 Bahamas North America 110.0 NaN 393248.0 0.013986
210 Vietnam Asia 44000.0 NaN 97338583.0 0.022602
190 Taiwan Asia 10891.0 NaN 23816775.0 0.022864
209 Venezuela South America 14223.0 NaN 28435943.0 0.025009
93 Iraq Asia 26727.0 NaN 40222503.0 0.033224
196 Trinidad and Tobago North America 991.0 NaN 1399491.0 0.035406
72 Georgia Asia 4924.0 NaN 3989175.0 0.061717
173 Sierra Leone Africa 10673.0 NaN 7976985.0 0.066899

Países mas rezagados con procesos de vacunación activos

In [12]:
plt.figure(figsize=(12,8))
sns.barplot(x = "location", y = "Cobertura", data = dataframe_cobertura.head(10))
plt.xticks(rotation=70)
plt.show()

Listando por Continente y Pais

Listando los datos de un contiente específico

In [13]:
dataframe_continente=dataframe_pais.groupby('continent')['total_vaccinations','population','Cobertura'].last().reset_index()
dataframe=dataframe.groupby('location')['total_cases','total_deaths','population'].last().reset_index()
dataframe_continente.sort_values('Cobertura',ascending=True)
C:\Users\Tommy\Anaconda3\envs\geo_env\lib\site-packages\ipykernel_launcher.py:1: FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead.
  """Entry point for launching an IPython kernel.
C:\Users\Tommy\Anaconda3\envs\geo_env\lib\site-packages\ipykernel_launcher.py:2: FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead.
  
Out[13]:
continent total_vaccinations population Cobertura
1 Asia 44000.0 29825968.0 0.022602
5 South America 14223.0 28435943.0 0.025009
0 Africa 69751.0 14862927.0 0.234648
4 Oceania 41500.0 307150.0 0.430299
3 North America 147602345.0 331002647.0 22.296248
2 Europe 34518958.0 809.0 25.424208

Cobertura de vacunación por Continentes

In [14]:
plt.figure(figsize=(12,8))
sns.barplot(x = "continent", y = "Cobertura", data = dataframe_continente.sort_values('Cobertura',ascending=True))
plt.xticks(rotation=70)
plt.show()
In [15]:
dataframe_continente_america=dataframe_pais[dataframe_pais['continent']=='North America']
dataframe_continente_america=dataframe_continente_america.sort_values('Cobertura',ascending=True                                                                      )
dataframe_continente_america 
Out[15]:
location continent total_vaccinations people_fully_vaccinated population Cobertura
14 Bahamas North America 110.0 NaN 393248.0 0.013986
196 Trinidad and Tobago North America 991.0 NaN 1399491.0 0.035406
85 Honduras North America 43073.0 NaN 9904608.0 0.217439
79 Guatemala North America 98920.0 518.0 17915567.0 0.276073
57 El Salvador North America 70000.0 NaN 6486201.0 0.539607
98 Jamaica North America 33000.0 NaN 2961161.0 0.557214
20 Belize North America 20411.0 NaN 397621.0 2.566640
126 Mexico North America 7404912.0 850939.0 128932753.0 2.871618
44 Costa Rica North America 384355.0 160263.0 5094114.0 3.772540
54 Dominican Republic North America 910869.0 54395.0 10847904.0 4.198364
151 Panama North America 364079.0 116540.0 4314768.0 4.218987
78 Grenada North America 9821.0 NaN 112519.0 4.364152
77 Greenland North America 5130.0 1203.0 56772.0 4.518072
165 Saint Vincent and the Grenadines North America 10519.0 NaN 110947.0 4.740552
164 Saint Lucia North America 22011.0 NaN 183629.0 5.993334
34 Canada North America 5470884.0 679469.0 37742157.0 7.247710
163 Saint Kitts and Nevis North America 8573.0 NaN 53192.0 8.058543
17 Barbados North America 63689.0 NaN 287371.0 11.081320
53 Dominica North America 16058.0 NaN 71991.0 11.152783
132 Montserrat North America 1306.0 194.0 4999.0 13.062613
7 Antigua and Barbuda North America 26424.0 NaN 97928.0 13.491545
199 Turks and Caicos Islands North America 12935.0 NaN 38718.0 16.704117
6 Anguilla North America 5348.0 NaN 15002.0 17.824290
204 United States North America 147602345.0 53423486.0 331002647.0 22.296248
22 Bermuda North America 37788.0 15371.0 62273.0 30.340597
36 Cayman Islands North America 47602.0 17958.0 65720.0 36.215764
47 Cuba North America NaN NaN 11326616.0 NaN
84 Haiti North America NaN NaN 11402533.0 NaN
140 Nicaragua North America NaN NaN 6624554.0 NaN

Graficando países de Norte y Centro America con respecto a Cobertura

In [16]:
## creamos un nuevo dataset para ver los países con las coberturas mas altas en Norte America
dataframe_continente_america[dataframe_continente_america.continent=='North America']
dataframe_continente_america.sort_values('Cobertura',ascending=False,inplace=True)
In [17]:
dataframe_continente_america
Out[17]:
location continent total_vaccinations people_fully_vaccinated population Cobertura
36 Cayman Islands North America 47602.0 17958.0 65720.0 36.215764
22 Bermuda North America 37788.0 15371.0 62273.0 30.340597
204 United States North America 147602345.0 53423486.0 331002647.0 22.296248
6 Anguilla North America 5348.0 NaN 15002.0 17.824290
199 Turks and Caicos Islands North America 12935.0 NaN 38718.0 16.704117
7 Antigua and Barbuda North America 26424.0 NaN 97928.0 13.491545
132 Montserrat North America 1306.0 194.0 4999.0 13.062613
53 Dominica North America 16058.0 NaN 71991.0 11.152783
17 Barbados North America 63689.0 NaN 287371.0 11.081320
163 Saint Kitts and Nevis North America 8573.0 NaN 53192.0 8.058543
34 Canada North America 5470884.0 679469.0 37742157.0 7.247710
164 Saint Lucia North America 22011.0 NaN 183629.0 5.993334
165 Saint Vincent and the Grenadines North America 10519.0 NaN 110947.0 4.740552
77 Greenland North America 5130.0 1203.0 56772.0 4.518072
78 Grenada North America 9821.0 NaN 112519.0 4.364152
151 Panama North America 364079.0 116540.0 4314768.0 4.218987
54 Dominican Republic North America 910869.0 54395.0 10847904.0 4.198364
44 Costa Rica North America 384355.0 160263.0 5094114.0 3.772540
126 Mexico North America 7404912.0 850939.0 128932753.0 2.871618
20 Belize North America 20411.0 NaN 397621.0 2.566640
98 Jamaica North America 33000.0 NaN 2961161.0 0.557214
57 El Salvador North America 70000.0 NaN 6486201.0 0.539607
79 Guatemala North America 98920.0 518.0 17915567.0 0.276073
85 Honduras North America 43073.0 NaN 9904608.0 0.217439
196 Trinidad and Tobago North America 991.0 NaN 1399491.0 0.035406
14 Bahamas North America 110.0 NaN 393248.0 0.013986
47 Cuba North America NaN NaN 11326616.0 NaN
84 Haiti North America NaN NaN 11402533.0 NaN
140 Nicaragua North America NaN NaN 6624554.0 NaN
In [18]:
# Construyendo el grafico
##Quitamos los valores Nan 
plt.figure(figsize=(12,8))
# dataframe_continente_america.dropna(inplace=True)
sns.barplot(x = "location", y = "Cobertura", data = dataframe_continente_america)
plt.xticks(rotation=60)
plt.show()
In [20]:
# dataframe_cobertura[dataframe_cobertura['location']=='Costa Rica']
# dataframe_cobertura.to_excel("vacunas_final.xlsx")

Aplicando el algoritmo Kmeans (K medios) de clusterización

In [21]:
#  Aplicando algoritmo Kmeans a nuestro dataset 
from sklearn.cluster import KMeans
dataframe_clusters = dataframe_pais
dataframe_clusters = df.reset_index()
In [22]:
inertias = [] 
K = range(1,10) 
dataframe_clusters.fillna(0,inplace=True)  
for k in K: 
    #Crear y ajustar el modelo 
    kmeanModel = KMeans(n_clusters=k).fit(dataframe_clusters.drop(['continent','location','iso_code','date','tests_units'],axis=1)) 
    inertias.append(kmeanModel.inertia_) 
    
plt.plot(K, inertias, 'bx-') 
plt.xlabel('VALORES DE K') 
plt.ylabel('Inertia') 
plt.title('EL METODO DEL CODO USANDO INERTIA' ) 
plt.show()
In [23]:
## El numero de clusters o grupos sera de 4 
kmeans = KMeans(n_clusters = 4, init = 'k-means++', random_state = 42)
y_kmeans = kmeans.fit_predict(dataframe_clusters.drop(['continent','location','iso_code','date','tests_units'],axis=1))
y_kmeans1=y_kmeans+1
cluster = pd.DataFrame(y_kmeans1)
today_sub=dataframe_clusters.drop(['continent','location','iso_code','date','tests_units'],axis=1)
# aca añadimos la variable cluster a nuestro nuevo dataset 
today_sub['cluster'] = cluster
# Promedio de los valores del cluster
kmeans_mean_cluster = pd.DataFrame(round(today_sub.groupby('cluster').mean(),1))

## Listando los valores promedios de las variables utilizadas en cada cluster
kmeans_mean_cluster
Out[23]:
index total_cases new_cases new_cases_smoothed total_deaths new_deaths new_deaths_smoothed total_cases_per_million new_cases_per_million new_cases_smoothed_per_million ... gdp_per_capita extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index
cluster
1 39686.3 341277.7 2606.6 2574.8 9286.9 60.7 60.0 8448.4 69.2 68.1 ... 17757.7 8.3 239.2 7.3 7.8 23.3 23.5 2.6 70.6 0.7
2 3876.5 9718148.1 63364.1 62273.1 167582.2 983.0 974.9 2094.5 13.7 13.4 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 77130.5 39710042.8 293523.3 289811.8 999458.7 6459.4 6393.5 5094.4 37.7 37.2 ... 15469.2 10.0 233.1 8.5 6.4 34.6 60.1 2.7 72.6 0.7
4 18179.1 4294077.8 32872.4 32416.9 105067.0 698.5 691.8 4768.1 38.1 37.5 ... 5502.5 5.5 137.2 5.1 1.0 17.5 14.9 1.2 37.0 0.4

4 rows × 55 columns

In [24]:
## Acá podemos ver el grupo de paises en cada cluster o grupo 
dataframe_clusters_2=dataframe_clusters.copy()
dataframe_clusters_2['cluster']= cluster
dataframe_clusters_2
Out[24]:
index iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths ... extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index cluster
0 0 AFG Asia Afghanistan 2020-02-24 1.0 1.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
1 1 AFG Asia Afghanistan 2020-02-25 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
2 2 AFG Asia Afghanistan 2020-02-26 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
3 3 AFG Asia Afghanistan 2020-02-27 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
4 4 AFG Asia Afghanistan 2020-02-28 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
78452 78452 ZWE Africa Zimbabwe 2021-03-26 36805.0 27.0 21.857 1518.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78453 78453 ZWE Africa Zimbabwe 2021-03-27 36818.0 13.0 22.286 1519.0 1.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78454 78454 ZWE Africa Zimbabwe 2021-03-28 36822.0 4.0 22.429 1520.0 1.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78455 78455 ZWE Africa Zimbabwe 2021-03-29 36839.0 17.0 22.143 1520.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78456 78456 ZWE Africa Zimbabwe 2021-03-30 36839.0 0.0 17.429 1520.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1

78457 rows × 61 columns

In [25]:
##Para listar los paises dentro de cada cluster separados
dataframe_clusters_2[dataframe_clusters_2['cluster']==2]        
Out[25]:
index iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths ... extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index cluster
3660 3660 OWID_ASI 0 Asia 2020-01-22 556.0 0.0 0.000 17.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
3661 3661 OWID_ASI 0 Asia 2020-01-23 654.0 98.0 0.000 18.0 1.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
3662 3662 OWID_ASI 0 Asia 2020-01-24 937.0 283.0 0.000 26.0 8.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
3663 3663 OWID_ASI 0 Asia 2020-01-25 1428.0 491.0 0.000 42.0 16.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
3664 3664 OWID_ASI 0 Asia 2020-01-26 2105.0 677.0 0.000 56.0 14.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
4089 4089 OWID_ASI 0 Asia 2021-03-26 27694135.0 156385.0 136856.286 421988.0 1111.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
4090 4090 OWID_ASI 0 Asia 2021-03-27 27846738.0 152603.0 141559.286 423160.0 1172.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
4091 4091 OWID_ASI 0 Asia 2021-03-28 28009737.0 162999.0 146938.714 424218.0 1058.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
4092 4092 OWID_ASI 0 Asia 2021-03-29 28162561.0 152824.0 151536.857 425366.0 1148.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2
4093 4093 OWID_ASI 0 Asia 2021-03-30 28323783.0 161222.0 155385.143 426628.0 1262.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2

434 rows × 61 columns

In [26]:
dataframe_clusters_2[dataframe_clusters_2['cluster']==3] 
Out[26]:
index iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths ... extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index cluster
76914 76914 OWID_WRL 0 World 2020-01-22 557.0 0.0 0.000 17.0 0.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
76915 76915 OWID_WRL 0 World 2020-01-23 655.0 98.0 0.000 18.0 1.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
76916 76916 OWID_WRL 0 World 2020-01-24 941.0 286.0 0.000 26.0 8.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
76917 76917 OWID_WRL 0 World 2020-01-25 1433.0 492.0 0.000 42.0 16.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
76918 76918 OWID_WRL 0 World 2020-01-26 2118.0 685.0 0.000 56.0 14.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
77343 77343 OWID_WRL 0 World 2021-03-26 126131572.0 641198.0 539943.571 2767631.0 12188.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
77344 77344 OWID_WRL 0 World 2021-03-27 126715405.0 583833.0 552113.857 2777421.0 9790.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
77345 77345 OWID_WRL 0 World 2021-03-28 127185829.0 470424.0 558751.000 2783885.0 6464.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
77346 77346 OWID_WRL 0 World 2021-03-29 127644757.0 458928.0 564789.857 2791836.0 7951.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3
77347 77347 OWID_WRL 0 World 2021-03-30 128212879.0 568122.0 572509.000 2803397.0 11561.0 ... 10.0 233.07 8.51 6.434 34.635 60.13 2.705 72.58 0.737 3

434 rows × 61 columns

In [27]:
dataframe_clusters_2[dataframe_clusters_2['cluster']==4] 
Out[27]:
index iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths ... extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index cluster
401 401 OWID_AFR 0 Africa 2020-02-13 0.0 0.0 0.000 0.0 0.0 ... 0.0 0.00 0.00 0.0 0.0 0.00 0.00 0.00 0.000 4
402 402 OWID_AFR 0 Africa 2020-02-14 1.0 1.0 0.000 0.0 0.0 ... 0.0 0.00 0.00 0.0 0.0 0.00 0.00 0.00 0.000 4
403 403 OWID_AFR 0 Africa 2020-02-15 1.0 0.0 0.000 0.0 0.0 ... 0.0 0.00 0.00 0.0 0.0 0.00 0.00 0.00 0.000 4
404 404 OWID_AFR 0 Africa 2020-02-16 1.0 0.0 0.000 0.0 0.0 ... 0.0 0.00 0.00 0.0 0.0 0.00 0.00 0.00 0.000 4
405 405 OWID_AFR 0 Africa 2020-02-17 1.0 0.0 0.000 0.0 0.0 ... 0.0 0.00 0.00 0.0 0.0 0.00 0.00 0.00 0.000 4
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
32615 32615 IND Asia India 2021-03-26 11908910.0 62258.0 50518.000 161240.0 291.0 ... 21.2 282.28 10.39 1.9 20.6 59.55 0.53 69.66 0.645 4
32616 32616 IND Asia India 2021-03-27 11971624.0 62714.0 53213.429 161552.0 312.0 ... 21.2 282.28 10.39 1.9 20.6 59.55 0.53 69.66 0.645 4
32617 32617 IND Asia India 2021-03-28 12039644.0 68020.0 56223.286 161843.0 291.0 ... 21.2 282.28 10.39 1.9 20.6 59.55 0.53 69.66 0.645 4
32618 32618 IND Asia India 2021-03-29 12095855.0 56211.0 58437.000 162114.0 271.0 ... 21.2 282.28 10.39 1.9 20.6 59.55 0.53 69.66 0.645 4
32619 32619 IND Asia India 2021-03-30 12149335.0 53480.0 59325.286 162468.0 354.0 ... 21.2 282.28 10.39 1.9 20.6 59.55 0.53 69.66 0.645 4

1705 rows × 61 columns

In [28]:
dataframe_clusters_2[dataframe_clusters_2['cluster']==1] 
Out[28]:
index iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths ... extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index cluster
0 0 AFG Asia Afghanistan 2020-02-24 1.0 1.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
1 1 AFG Asia Afghanistan 2020-02-25 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
2 2 AFG Asia Afghanistan 2020-02-26 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
3 3 AFG Asia Afghanistan 2020-02-27 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
4 4 AFG Asia Afghanistan 2020-02-28 1.0 0.0 0.000 0.0 0.0 ... 0.0 597.029 9.59 0.0 0.0 37.746 0.5 64.83 0.511 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
78452 78452 ZWE Africa Zimbabwe 2021-03-26 36805.0 27.0 21.857 1518.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78453 78453 ZWE Africa Zimbabwe 2021-03-27 36818.0 13.0 22.286 1519.0 1.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78454 78454 ZWE Africa Zimbabwe 2021-03-28 36822.0 4.0 22.429 1520.0 1.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78455 78455 ZWE Africa Zimbabwe 2021-03-29 36839.0 17.0 22.143 1520.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1
78456 78456 ZWE Africa Zimbabwe 2021-03-30 36839.0 0.0 17.429 1520.0 0.0 ... 21.4 307.846 1.82 1.6 30.7 36.791 1.7 61.49 0.571 1

75884 rows × 61 columns

Tiempo esperado para lograr que los países lleguen al 70% de la población vacunada

In [29]:
## finding percentage of population populated every day
df1=df[[ 'location', 'date','total_vaccinations',
       'people_vaccinated', 'people_fully_vaccinated', 'new_vaccinations',
       'population',]]
df1.dropna(subset=['new_vaccinations'],inplace=True)


##taking average rate of daily vaccination for each country and finding the number of days vaccination has been provided

#Average Doses Administered Daily  = 7-Day Moving Average of Daily Doses Delivered
# df1['new_vaccinations'].fillna(0,inplace=True)
# df1['Average_daily_doses']=df1.groupby('location')['new_vaccinations'].transform(lambda x: x.rolling(7, center=False).mean()).reset_index(drop=True)

df1.dropna(subset=['new_vaccinations'],inplace=True)
cntry=[]
value=[]
for loc in df1.location.unique():
  cntry.append(loc)
  value.append(df1[df1['location']==loc]['new_vaccinations'].rolling(7, center=False).mean().mean())
df1=pd.DataFrame({'location':cntry,'Average_daily_doses':value})
df1

# df1['Average_daily_doses']=df1['7-day_average_vaccination']
# df1=df1.groupby('location')['Average_daily_doses'].mean().reset_index()
C:\Users\Tommy\Anaconda3\envs\geo_env\lib\site-packages\ipykernel_launcher.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  """
C:\Users\Tommy\Anaconda3\envs\geo_env\lib\site-packages\ipykernel_launcher.py:14: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  
Out[29]:
location Average_daily_doses
0 Africa 1.597433e+05
1 Albania 9.734857e+02
2 Algeria NaN
3 Anguilla NaN
4 Argentina 5.506955e+04
... ... ...
107 United States 1.775111e+06
108 Uruguay 1.911654e+04
109 Vietnam 2.720429e+03
110 World 5.312850e+06
111 Zimbabwe 1.684192e+03

112 rows × 2 columns

In [30]:
df_full=pd.merge(dataframe_cobertura,df1,on='location',how='outer')
df_full['Cobertura']=(df_full['people_fully_vaccinated']/df_full['population'])*100
In [31]:
##Days = [(Population * 0.7) - (Vaccine Doses Delivered * 0.5)] / (Average Daily Vaccine Doses Given * 0.5)
##Percent Vaccinated = (Total Vaccine Doses Administered * 0.5) / Population *100
df_full['Days_70%_vaccination']=(((df_full['population']*0.7)-(df_full['total_vaccinations']*0.5))/(df_full['Average_daily_doses']*0.5))
df_full['Percent Vaccinated']=((df_full['total_vaccinations']*0.5)/df_full['population'])*100
df_full.sort_values('Days_70%_vaccination',ascending=True,inplace=True)
df_full.dropna()
df_full.sort_values('Days_70%_vaccination') 
pd.reset_option('display.max_rows')
pd.set_option("display.max_rows",215)
# (df_full)[['location', 'Days_70%_vaccination']]
print(df_full) 
                             location      continent  total_vaccinations  \
163                         Gibraltar         Europe             59050.0   
161                        Seychelles         Africa            100552.0   
162                            Israel           Asia          10000972.0   
160              United Arab Emirates           Asia           8220783.0   
141                        San Marino         Europe             11269.0   
146                          Maldives           Asia            235682.0   
156                       Isle of Man         Europe             49787.0   
152                    United Kingdom         Europe          34518958.0   
138                             Qatar           Asia            790676.0   
154                             Chile  South America          10181661.0   
149                     United States  North America         147602345.0   
145                             Malta         Europe            186111.0   
132                    Faeroe Islands         Europe             10770.0   
133                          Barbados  North America             63689.0   
143                            Serbia         Europe           2420995.0   
125                           Uruguay  South America            616374.0   
148                           Bahrain           Asia            755549.0   
91                           Mongolia           Asia            290108.0   
131                           Morocco         Africa           7882300.0   
97                       Saudi Arabia           Asia           4319023.0   
87                 Dominican Republic  North America            910869.0   
140                           Hungary         Europe           2764216.0   
73                             Belize  North America             20411.0   
130                           Iceland         Europe             66156.0   
84                              China           Asia         114690000.0   
139                     North America           None         162671153.0   
122                           Finland         Europe            951354.0   
126                            Turkey           Asia          15301462.0   
121                             Spain         Europe           7736611.0   
116                           Ireland         Europe            802502.0   
101                        Luxembourg         Europe             89684.0   
120                       Switzerland         Europe           1431525.0   
127                         Lithuania         Europe            495383.0   
124                          Slovakia         Europe            958434.0   
128                           Denmark         Europe           1082909.0   
77                          Hong Kong           Asia            490200.0   
110                            Greece         Europe           1668956.0   
123                           Austria         Europe           1569086.0   
129                           Estonia         Europe            255219.0   
65                         Montenegro         Europe             20373.0   
118                            Norway         Europe            892792.0   
105                           Belgium         Europe           1772750.0   
119                            Europe           None         123369807.0   
117                             Italy         Europe           9928663.0   
115                    European Union           None          72218844.0   
113                          Portugal         Europe           1641946.0   
112                           Germany         Europe          13481171.0   
106                           Romania         Europe           2965613.0   
107                           Czechia         Europe           1657364.0   
100                          Slovenia         Europe            295780.0   
108                            France         Europe          10714250.0   
80                              Macao           Asia             47483.0   
111                            Poland         Europe           6081824.0   
103                            Canada  North America           5470884.0   
94                            Croatia         Europe            430396.0   
89                             Brazil  South America          18222559.0   
85                          Argentina  South America           3744566.0   
88                             Panama  North America            364079.0   
83                             Russia         Europe          11183108.0   
64                         Bangladesh           Asia           5319679.0   
79                             Latvia         Europe            133230.0   
66                           Colombia  South America           1965054.0   
86                      South America           None          36143923.0   
60                             Rwanda         Africa            348926.0   
78                           Bulgaria         Europe            458731.0   
69                          Sri Lanka           Asia            903467.0   
53                           Cambodia           Asia            296149.0   
58                            Bolivia  South America            275810.0   
81                              World           None         577923364.0   
62                            Lebanon           Asia            207647.0   
76                             Mexico  North America           7404912.0   
71                              India           Asia          63054353.0   
54                           Malaysia           Asia            621417.0   
67                          Indonesia           Asia          10766490.0   
42                            Moldova         Europe             33885.0   
47                            Ecuador  South America            235000.0   
59                               Peru  South America            805224.0   
74                               Asia           None         244892160.0   
57                          Australia        Oceania            597523.0   
52                        South Korea           Asia            860387.0   
38                             Malawi         Africa            123097.0   
56                            Albania         Europe             64075.0   
50                            Oceania           None            639023.0   
61                               Oman           Asia            139897.0   
49                            Senegal         Africa            247750.0   
29                            Tunisia         Africa             53089.0   
40                              Japan           Asia            949731.0   
34                          Guatemala  North America             98920.0   
36                           Paraguay  South America             41213.0   
27                       South Africa         Africa            251707.0   
41                             Africa           None          10305267.0   
33                            Ukraine         Europe            231566.0   
31                           Zimbabwe         Africa             69751.0   
16                             Uganda         Africa             69701.0   
4                              Taiwan           Asia             10891.0   
12                      Cote d'Ivoire         Africa             37367.0   
3                             Vietnam           Asia             44000.0   
0                               Egypt         Africa              1315.0   
1                             Namibia         Africa               152.0   
2                             Bahamas  North America               110.0   
5                           Venezuela  South America             14223.0   
6                                Iraq           Asia             26727.0   
7                 Trinidad and Tobago  North America               991.0   
8                             Georgia           Asia              4924.0   
9                        Sierra Leone         Africa             10673.0   
10                            Nigeria         Africa            277458.0   
11                        Afghanistan           Asia             54000.0   
13                           Thailand           Asia            102050.0   
14                               Iran           Asia            124193.0   
15                         Mozambique         Africa             46439.0   
17                           Pakistan           Asia            350000.0   
18                              Kenya         Africa             90340.0   
19                            Algeria         Africa             75000.0   
20                             Gambia         Africa              5345.0   
21                    North Macedonia         Europe              5300.0   
22                             Guinea         Africa             34178.0   
23                             Angola         Africa             87022.0   
24                          Mauritius         Africa              3843.0   
25                            Belarus         Europe             30000.0   
26                         Cape Verde         Africa              2184.0   
28                           Honduras  North America             43073.0   
30                        Philippines           Asia            508332.0   
32                               Togo         Africa             42092.0   
35                               Laos           Asia             40732.0   
37                         Kazakhstan           Asia            109995.0   
39                            Myanmar           Asia            380000.0   
43                        New Zealand        Oceania             41500.0   
44                  Equatorial Guinea         Africa             12155.0   
45                        El Salvador  North America             70000.0   
46                            Jamaica  North America             33000.0   
48                              Ghana         Africa            420000.0   
51                          Palestine           Asia             81942.0   
55                             Guyana  South America             15524.0   
63                             Jordan           Asia            320140.0   
68                           Suriname  South America             24528.0   
70              Sao Tome and Principe         Africa              9724.0   
72                         Azerbaijan           Asia            510420.0   
75                              Nepal           Asia           1600000.0   
82                         Costa Rica  North America            384355.0   
90                            Grenada  North America              9821.0   
92                          Greenland  North America              5130.0   
93   Saint Vincent and the Grenadines  North America             10519.0   
95                        Saint Lucia  North America             22011.0   
96                            Andorra         Europe              9288.0   
98                        Netherlands         Europe           2378552.0   
99                             Kuwait           Asia            604861.0   
102                     Liechtenstein         Europe              5471.0   
104                            Cyprus         Europe            129438.0   
109                            Sweden         Europe           1588671.0   
114             Saint Kitts and Nevis  North America              8573.0   
134                          Dominica  North America             16058.0   
135                         Singapore           Asia           1318912.0   
136                        Montserrat  North America              1306.0   
137               Antigua and Barbuda  North America             26424.0   
142          Turks and Caicos Islands  North America             12935.0   
144                          Anguilla  North America              5348.0   
147                            Bhutan           Asia            340917.0   
150                            Monaco         Europe             18081.0   
151                          Guernsey         Europe             33400.0   
153                      Saint Helena         Africa              3107.0   
155                            Jersey         Europe             55114.0   
157                           Bermuda  North America             37788.0   
158                  Falkland Islands  South America              2187.0   
159                    Cayman Islands  North America             47602.0   
164                           Armenia           Asia                 NaN   
165                             Benin         Africa                 NaN   
166            Bosnia and Herzegovina         Europe                 NaN   
167                          Botswana         Africa                 NaN   
168                            Brunei           Asia                 NaN   
169                      Burkina Faso         Africa                 NaN   
170                           Burundi         Africa                 NaN   
171                          Cameroon         Africa                 NaN   
172          Central African Republic         Africa                 NaN   
173                              Chad         Africa                 NaN   
174                           Comoros         Africa                 NaN   
175                             Congo         Africa                 NaN   
176                              Cuba  North America                 NaN   
177      Democratic Republic of Congo         Africa                 NaN   
178                          Djibouti         Africa                 NaN   
179                           Eritrea         Africa                 NaN   
180                          Eswatini         Africa                 NaN   
181                          Ethiopia         Africa                 NaN   
182                              Fiji        Oceania                 NaN   
183                             Gabon         Africa                 NaN   
184                     Guinea-Bissau         Africa                 NaN   
185                             Haiti  North America                 NaN   
186                     International           None                 NaN   
187                            Kosovo         Europe                 NaN   
188                        Kyrgyzstan           Asia                 NaN   
189                           Lesotho         Africa                 NaN   
190                           Liberia         Africa                 NaN   
191                             Libya         Africa                 NaN   
192                        Madagascar         Africa                 NaN   
193                              Mali         Africa                 NaN   
194                  Marshall Islands        Oceania                 NaN   
195                        Mauritania         Africa                 NaN   
196              Micronesia (country)        Oceania                 NaN   
197                         Nicaragua  North America                 NaN   
198                             Niger         Africa                 NaN   
199                   Northern Cyprus           Asia             97969.0   
200                  Papua New Guinea        Oceania                 NaN   
201                             Samoa        Oceania                 NaN   
202                   Solomon Islands        Oceania                 NaN   
203                           Somalia         Africa                 NaN   
204                       South Sudan         Africa                 NaN   
205                             Sudan         Africa                 NaN   
206                             Syria           Asia                 NaN   
207                        Tajikistan           Asia                 NaN   
208                          Tanzania         Africa                 NaN   
209                             Timor           Asia                 NaN   
210                        Uzbekistan           Asia                 NaN   
211                           Vanuatu        Oceania                 NaN   
212                           Vatican         Europe                 NaN   
213                             Yemen           Asia                 NaN   
214                            Zambia         Africa                 NaN   

     people_fully_vaccinated    population  Cobertura  Average_daily_doses  \
163                  27952.0  3.369100e+04  82.965777         7.466162e+02   
161                  36866.0  9.834000e+04  37.488306         2.191209e+03   
162                4764642.0  8.655541e+06  55.047304         1.034725e+05   
160                2187849.0  9.890400e+06  22.120935         8.932830e+04   
141                   2623.0  3.393800e+04   7.728800         4.550000e+02   
146                      NaN  5.405420e+05        NaN         4.492826e+03   
156                  15307.0  8.503200e+04  18.001458         5.888132e+02   
152                3838010.0  6.788600e+07   5.653610         4.100137e+05   
138                      NaN  2.881060e+06        NaN         2.135076e+04   
154                3513361.0  1.911621e+07  18.378963         1.073435e+05   
149               53423486.0  3.310026e+08  16.139897         1.775111e+06   
145                  52340.0  4.415390e+05  11.853993         2.394941e+03   
132                   4129.0  4.886500e+04   8.449811         2.874286e+02   
133                      NaN  2.873710e+05        NaN         1.617069e+03   
143                1006012.0  6.804596e+06  14.784302         3.287406e+04   
125                  31380.0  3.473727e+06   0.903353         1.911654e+04   
148                 253008.0  1.701583e+06  14.868978         7.012545e+03   
91                       NaN  3.278292e+06        NaN         1.605196e+04   
131                3566498.0  3.691056e+07   9.662542         1.584368e+05   
97                       NaN  3.481387e+07        NaN         1.282917e+05   
87                   54395.0  1.084790e+07   0.501433         4.040200e+04   
140                 753187.0  9.660350e+06   7.796684         3.005439e+04   
73                       NaN  3.976210e+05        NaN         1.406952e+03   
130                  20734.0  3.412500e+05   6.075897         1.045746e+03   
84                       NaN  1.439324e+09        NaN         4.453286e+06   
139               55320336.0  5.920722e+08   9.343512         1.532268e+06   
122                  88715.0  5.540718e+06   1.601146         1.379434e+04   
126                6687094.0  8.433907e+07   7.928821         1.998711e+05   
121                2644076.0  4.675478e+07   5.655199         1.083073e+05   
116                 224861.0  4.937796e+06   4.553874         1.123361e+04   
101                  21071.0  6.259760e+05   3.366103         1.438083e+03   
120                 533515.0  8.654618e+06   6.164512         1.939306e+04   
127                 158925.0  2.722291e+06   5.837914         5.880429e+03   
124                 259983.0  5.459643e+06   4.761905         1.135297e+04   
128                 373611.0  5.792203e+06   6.450240         1.169661e+04   
77                   34300.0  7.496988e+06   0.457517         1.606978e+04   
110                 588298.0  1.042306e+07   5.644199         2.044337e+04   
123                 417321.0  9.006400e+06   4.633605         1.717243e+04   
129                  60861.0  1.326539e+06   4.587954         2.444810e+03   
65                    2467.0  6.280620e+05   0.392796         1.305449e+03   
118                 271536.0  5.421242e+06   5.008742         1.001831e+04   
105                 512447.0  1.158962e+07   4.421605         2.069843e+04   
119               31587445.0  7.486801e+08   4.219085         1.314883e+06   
117                3112079.0  6.046183e+07   5.147180         1.060699e+05   
115               21528920.0  4.449191e+08   4.838840         7.789274e+05   
113                 472270.0  1.019671e+07   4.631593         1.766508e+04   
112                4059469.0  8.378394e+07   4.845163         1.439461e+05   
106                1003466.0  1.923768e+07   5.216148         3.247152e+04   
107                 486702.0  1.070898e+07   4.544802         1.787792e+04   
100                 104563.0  2.078932e+06   5.029650         3.462595e+03   
108                2709292.0  6.814769e+07   3.975618         1.109920e+05   
80                       NaN  6.493420e+05        NaN         1.127269e+03   
111                2019040.0  3.784660e+07   5.334798         5.598163e+04   
103                 679469.0  3.774216e+07   1.800292         4.940793e+04   
94                   81748.0  4.105268e+06   1.991295         5.502429e+03   
89                 4110050.0  2.125594e+08   1.933601         2.709063e+05   
85                  670936.0  4.519578e+07   1.484510         5.506955e+04   
88                  116540.0  4.314768e+06   2.700956         5.190560e+03   
83                 4296849.0  1.459345e+08   2.944369         1.714090e+05   
64                       NaN  1.646894e+08        NaN         1.899116e+05   
79                   22950.0  1.886202e+06   1.216731         1.772335e+03   
66                  228486.0  5.088288e+07   0.449043         4.651790e+04   
86                 8972366.0  4.307598e+08   2.082916         3.785986e+05   
60                       NaN  1.295221e+07        NaN         1.069487e+04   
78                   93081.0  6.948445e+06   1.339595         5.470022e+03   
69                       NaN  2.141325e+07        NaN         1.585648e+04   
53                       NaN  1.671897e+07        NaN         1.249961e+04   
58                   95326.0  1.167303e+07   0.816635         8.461190e+03   
81               126779833.0  7.794799e+09   1.626467         5.312850e+06   
62                   79734.0  6.825442e+06   1.168188         4.738849e+03   
76                  850939.0  1.289328e+08   0.659987         8.284271e+04   
71                 9065318.0  1.380004e+09   0.656905         8.768036e+05   
54                       NaN  3.236600e+07        NaN         2.084963e+04   
67                 3330639.0  2.735236e+08   1.217679         1.694161e+05   
42                       NaN  4.033963e+06        NaN         2.332857e+03   
47                   60358.0  1.764306e+07   0.342106         9.902571e+03   
59                  262469.0  3.297185e+07   0.796040         1.741662e+04   
74                27086291.0  4.639847e+09   0.583775         2.343224e+06   
57                       NaN  2.549988e+07        NaN         1.305439e+04   
52                    8185.0  5.126918e+07   0.015965         2.622990e+04   
38                       NaN  1.912996e+07        NaN         8.783000e+03   
56                     655.0  2.877800e+06   0.022760         9.734857e+02   
50                       NaN  4.267781e+07        NaN         1.417513e+04   
61                   19019.0  5.106622e+06   0.372438         1.625818e+03   
49                       NaN  1.674393e+07        NaN         5.317989e+03   
29                       NaN  1.181862e+07        NaN         3.483429e+03   
40                   96785.0  1.264765e+08   0.076524         3.682799e+04   
34                     518.0  1.791557e+07   0.002891         4.401464e+03   
36                       NaN  7.132530e+06        NaN         1.475762e+03   
27                  251707.0  5.930869e+07   0.424402         7.092566e+03   
41                 3857478.0  1.340598e+09   0.287743         1.597433e+05   
33                       2.0  4.373376e+07   0.000005         5.213496e+03   
31                       NaN  1.486293e+07        NaN         1.684192e+03   
16                       NaN  4.574100e+07        NaN         4.229729e+03   
4                        NaN  2.381678e+07        NaN         1.337500e+03   
12                       NaN  2.637828e+07        NaN         1.458557e+03   
3                        NaN  9.733858e+07        NaN         2.720429e+03   
0                        NaN  1.023344e+08        NaN                  NaN   
1                        NaN  2.540916e+06        NaN                  NaN   
2                        NaN  3.932480e+05        NaN                  NaN   
5                        NaN  2.843594e+07        NaN                  NaN   
6                        NaN  4.022250e+07        NaN                  NaN   
7                        NaN  1.399491e+06        NaN                  NaN   
8                        NaN  3.989175e+06        NaN                  NaN   
9                        NaN  7.976985e+06        NaN                  NaN   
10                       NaN  2.061396e+08        NaN                  NaN   
11                       NaN  3.892834e+07        NaN                  NaN   
13                    5862.0  6.979998e+07   0.008398                  NaN   
14                       NaN  8.399295e+07        NaN                  NaN   
15                       NaN  3.125544e+07        NaN                  NaN   
17                       NaN  2.208923e+08        NaN                  NaN   
18                       NaN  5.377130e+07        NaN                  NaN   
19                       NaN  4.385104e+07        NaN                  NaN   
20                       NaN  2.416664e+06        NaN                  NaN   
21                       NaN  2.083380e+06        NaN                  NaN   
22                       NaN  1.313279e+07        NaN                  NaN   
23                       NaN  3.286627e+07        NaN                  NaN   
24                       NaN  1.271767e+06        NaN                  NaN   
25                   10000.0  9.449321e+06   0.105828                  NaN   
26                       NaN  5.559880e+05        NaN                  NaN   
28                       NaN  9.904608e+06        NaN                  NaN   
30                       NaN  1.095811e+08        NaN                  NaN   
32                       NaN  8.278737e+06        NaN                  NaN   
35                       NaN  7.275556e+06        NaN                  NaN   
37                   19247.0  1.877671e+07   0.102505                  NaN   
39                       NaN  5.440979e+07        NaN                  NaN   
43                       NaN  4.822233e+06        NaN                  NaN   
44                    2407.0  1.402985e+06   0.171563                  NaN   
45                       NaN  6.486201e+06        NaN                  NaN   
46                       NaN  2.961161e+06        NaN                  NaN   
48                       NaN  3.107294e+07        NaN                  NaN   
51                    7978.0  5.101416e+06   0.156388                  NaN   
55                       NaN  7.865590e+05        NaN                  NaN   
63                   68943.0  1.020314e+07   0.675704                  NaN   
68                       NaN  5.866340e+05        NaN                  NaN   
70                       NaN  2.191610e+05        NaN                  NaN   
72                       NaN  1.013918e+07        NaN                  NaN   
75                       NaN  2.913681e+07        NaN                  NaN   
82                  160263.0  5.094114e+06   3.146043                  NaN   
90                       NaN  1.125190e+05        NaN                  NaN   
92                    1203.0  5.677200e+04   2.119002                  NaN   
93                       NaN  1.109470e+05        NaN                  NaN   
95                       NaN  1.836290e+05        NaN                  NaN   
96                    1265.0  7.726500e+04   1.637223                  NaN   
98                  690062.0  1.713487e+07   4.027237                  NaN   
99                   38000.0  4.270563e+06   0.889812                  NaN   
102                      NaN  3.813700e+04        NaN                  NaN   
104                  35963.0  8.758990e+05   4.105839                  NaN   
109                 482539.0  1.009927e+07   4.777959                  NaN   
114                      NaN  5.319200e+04        NaN                  NaN   
134                      NaN  7.199100e+04        NaN                  NaN   
135                 375605.0  5.850343e+06   6.420222                  NaN   
136                    194.0  4.999000e+03   3.880776                  NaN   
137                      NaN  9.792800e+04        NaN                  NaN   
142                      NaN  3.871800e+04        NaN                  NaN   
144                      NaN  1.500200e+04        NaN                  NaN   
147                      NaN  7.716120e+05        NaN                  NaN   
150                   8331.0  3.924400e+04  21.228723                  NaN   
151                   7654.0  6.705200e+04  11.415021                  NaN   
153                      NaN  6.071000e+03        NaN                  NaN   
155                  11484.0  1.010730e+05  11.362085                  NaN   
157                  15371.0  6.227300e+04  24.683250                  NaN   
158                      NaN  3.483000e+03        NaN                  NaN   
159                  17958.0  6.572000e+04  27.325015                  NaN   
164                      NaN  2.963234e+06        NaN                  NaN   
165                      NaN  1.212320e+07        NaN                  NaN   
166                      NaN  3.280815e+06        NaN                  NaN   
167                      NaN  2.351625e+06        NaN                  NaN   
168                      NaN  4.374830e+05        NaN                  NaN   
169                      NaN  2.090328e+07        NaN                  NaN   
170                      NaN  1.189078e+07        NaN                  NaN   
171                      NaN  2.654586e+07        NaN                  NaN   
172                      NaN  4.829764e+06        NaN                  NaN   
173                      NaN  1.642586e+07        NaN                  NaN   
174                      NaN  8.695950e+05        NaN                  NaN   
175                      NaN  5.518092e+06        NaN                  NaN   
176                      NaN  1.132662e+07        NaN                  NaN   
177                      NaN  8.956140e+07        NaN                  NaN   
178                      NaN  9.880020e+05        NaN                  NaN   
179                      NaN  3.546427e+06        NaN                  NaN   
180                      NaN  1.160164e+06        NaN                  NaN   
181                      NaN  1.149636e+08        NaN                  NaN   
182                      NaN  8.964440e+05        NaN                  NaN   
183                      NaN  2.225728e+06        NaN                  NaN   
184                      NaN  1.967998e+06        NaN                  NaN   
185                      NaN  1.140253e+07        NaN                  NaN   
186                      NaN           NaN        NaN                  NaN   
187                      NaN  1.932774e+06        NaN                  NaN   
188                      NaN  6.524191e+06        NaN                  NaN   
189                      NaN  2.142252e+06        NaN                  NaN   
190                      NaN  5.057677e+06        NaN                  NaN   
191                      NaN  6.871287e+06        NaN                  NaN   
192                      NaN  2.769102e+07        NaN                  NaN   
193                      NaN  2.025083e+07        NaN                  NaN   
194                      NaN  5.919400e+04        NaN                  NaN   
195                      NaN  4.649660e+06        NaN                  NaN   
196                      NaN  1.150210e+05        NaN                  NaN   
197                      NaN  6.624554e+06        NaN                  NaN   
198                      NaN  2.420664e+07        NaN                  NaN   
199                  44083.0           NaN        NaN                  NaN   
200                      NaN  8.947027e+06        NaN                  NaN   
201                      NaN  1.984100e+05        NaN                  NaN   
202                      NaN  6.868780e+05        NaN                  NaN   
203                      NaN  1.589322e+07        NaN                  NaN   
204                      NaN  1.119373e+07        NaN                  NaN   
205                      NaN  4.384927e+07        NaN                  NaN   
206                      NaN  1.750066e+07        NaN                  NaN   
207                      NaN  9.537642e+06        NaN                  NaN   
208                      NaN  5.973421e+07        NaN                  NaN   
209                      NaN  1.318442e+06        NaN                  NaN   
210                      NaN  3.346920e+07        NaN                  NaN   
211                      NaN  3.071500e+05        NaN                  NaN   
212                      NaN  8.090000e+02        NaN                  NaN   
213                      NaN  2.982597e+07        NaN                  NaN   
214                      NaN  1.838396e+07        NaN                  NaN   

     Days_70%_vaccination  Percent Vaccinated  
163            -15.915272           87.634680  
161             16.942247           51.124670  
162             20.457469           57.772079  
160             62.978661           41.559406  
141             79.657582           16.602334  
146            115.979749           21.800526  
156            117.622705           29.275449  
152            147.608358           25.424208  
138            151.882542           13.721963  
154            154.466991           26.630963  
149            177.905103           22.296248  
145            180.398457           21.075262  
132            200.540258           11.020158  
133            209.409972           11.081320  
143            216.141196           17.789410  
125            222.155430            8.871941  
148            231.965310           22.201356  
91             267.849008            4.424682  
131            276.403519           10.677568  
97             346.245204            6.203021  
87             353.353710            4.198364  
140            358.026740           14.307018  
73             381.148934            2.566640  
130            393.588871            9.693187  
84             426.732845            3.984163  
139            434.799873           13.737442  
122            493.365541            8.585115  
126            514.197481            9.071396  
121            532.928853            8.273604  
116            543.940195            8.126115  
101            547.035336            7.163533  
120            550.967137            8.270296  
127            563.874616            9.098642  
124            588.838759            8.777442  
128            600.702034            9.347989  
77             622.633481            3.269313  
110            632.152316            8.006078  
123            642.883800            8.710950  
129            655.239240            9.619732  
65             657.945131            1.621894  
118            668.470668            8.234202  
105            698.251498            7.648010  
119            703.319169            8.239154  
117            704.421459            8.210687  
115            706.956577            8.115953  
113            715.164795            8.051354  
112            721.216794            8.045199  
106            738.097319            7.707823  
107            745.903881            7.738196  
100            755.134536            7.113749  
108            763.050378            7.861052  
80             764.321226            3.656240  
111            837.835915            8.034834  
103            958.715330            7.247710  
94             966.296814            5.241996  
89            1031.207465            4.286463  
85            1080.987971            4.142606  
88            1093.638509            4.218987  
83            1126.692080            3.831552  
64            1186.054412            1.615064  
79            1414.773486            3.531700  
66            1489.125366            1.930958  
86            1497.416602            4.195369  
60            1662.869302            1.346975  
78            1694.525461            3.300962  
69            1833.640539            2.109598  
53            1848.890185            0.885668  
58            1898.838071            1.181399  
81            1945.244932            3.707109  
62            1972.624870            1.521125  
76            2089.513346            2.871618  
71            2131.551329            2.284571  
54            2143.490339            0.959984  
67            2196.759888            1.968110  
42            2406.346748            0.419996  
47            2470.599094            0.665984  
59            2604.142993            1.221078  
74            2667.646934            2.639011  
57            2688.926876            1.171619  
52            2703.649708            0.839088  
38            3035.277240            0.321739  
56            4072.833265            1.113264  
50            4169.973777            0.748660  
61            4311.290081            1.369761  
49            4361.376804            0.739820  
29            4734.696252            0.224599  
40            4782.159111            0.375458  
34            5676.036923            0.276073  
36            6738.437256            0.288909  
27           11671.440177            0.212201  
41           11684.571279            0.384353  
33           11699.577205            0.264745  
31           12313.527997            0.234648  
16           15123.357899            0.076191  
4            24921.565607            0.022864  
12           25293.639115            0.070829  
3            50076.674547            0.022602  
0                     NaN            0.000643  
1                     NaN            0.002991  
2                     NaN            0.013986  
5                     NaN            0.025009  
6                     NaN            0.033224  
7                     NaN            0.035406  
8                     NaN            0.061717  
9                     NaN            0.066899  
10                    NaN            0.067299  
11                    NaN            0.069358  
13                    NaN            0.073102  
14                    NaN            0.073931  
15                    NaN            0.074289  
17                    NaN            0.079224  
18                    NaN            0.084004  
19                    NaN            0.085517  
20                    NaN            0.110586  
21                    NaN            0.127197  
22                    NaN            0.130125  
23                    NaN            0.132388  
24                    NaN            0.151089  
25                    NaN            0.158742  
26                    NaN            0.196407  
28                    NaN            0.217439  
30                    NaN            0.231943  
32                    NaN            0.254218  
35                    NaN            0.279924  
37                    NaN            0.292903  
39                    NaN            0.349202  
43                    NaN            0.430299  
44                    NaN            0.433184  
45                    NaN            0.539607  
46                    NaN            0.557214  
48                    NaN            0.675829  
51                    NaN            0.803130  
55                    NaN            0.986830  
63                    NaN            1.568831  
68                    NaN            2.090571  
70                    NaN            2.218460  
72                    NaN            2.517069  
75                    NaN            2.745668  
82                    NaN            3.772540  
90                    NaN            4.364152  
92                    NaN            4.518072  
93                    NaN            4.740552  
95                    NaN            5.993334  
96                    NaN            6.010483  
98                    NaN            6.940676  
99                    NaN            7.081748  
102                   NaN            7.172824  
104                   NaN            7.388866  
109                   NaN            7.865276  
114                   NaN            8.058543  
134                   NaN           11.152783  
135                   NaN           11.272091  
136                   NaN           13.062613  
137                   NaN           13.491545  
142                   NaN           16.704117  
144                   NaN           17.824290  
147                   NaN           22.091219  
150                   NaN           23.036643  
151                   NaN           24.906043  
153                   NaN           25.588865  
155                   NaN           27.264452  
157                   NaN           30.340597  
158                   NaN           31.395349  
159                   NaN           36.215764  
164                   NaN                 NaN  
165                   NaN                 NaN  
166                   NaN                 NaN  
167                   NaN                 NaN  
168                   NaN                 NaN  
169                   NaN                 NaN  
170                   NaN                 NaN  
171                   NaN                 NaN  
172                   NaN                 NaN  
173                   NaN                 NaN  
174                   NaN                 NaN  
175                   NaN                 NaN  
176                   NaN                 NaN  
177                   NaN                 NaN  
178                   NaN                 NaN  
179                   NaN                 NaN  
180                   NaN                 NaN  
181                   NaN                 NaN  
182                   NaN                 NaN  
183                   NaN                 NaN  
184                   NaN                 NaN  
185                   NaN                 NaN  
186                   NaN                 NaN  
187                   NaN                 NaN  
188                   NaN                 NaN  
189                   NaN                 NaN  
190                   NaN                 NaN  
191                   NaN                 NaN  
192                   NaN                 NaN  
193                   NaN                 NaN  
194                   NaN                 NaN  
195                   NaN                 NaN  
196                   NaN                 NaN  
197                   NaN                 NaN  
198                   NaN                 NaN  
199                   NaN                 NaN  
200                   NaN                 NaN  
201                   NaN                 NaN  
202                   NaN                 NaN  
203                   NaN                 NaN  
204                   NaN                 NaN  
205                   NaN                 NaN  
206                   NaN                 NaN  
207                   NaN                 NaN  
208                   NaN                 NaN  
209                   NaN                 NaN  
210                   NaN                 NaN  
211                   NaN                 NaN  
212                   NaN                 NaN  
213                   NaN                 NaN  
214                   NaN                 NaN