Data
Original Research
To make the database compatible with other database, we encode country names with the World Bank's country name coder and manually fix mistakes.
target_countries = wb.economy.coder(orig_df['Country'])
orig_df['Country Code'] = target_countries
orig_df.at[11, "Country Code"] = "COG"
orig_df.at[46, "Country Code"] = "SDS"
target_countries.head()
World Bank
wb_final_df = wb_average_df.copy()
wb_final_df[wb_to_scale] = wb_final_df[wb_to_scale].div(wb_final_df.Population, axis = 0)
wb_final_df
UNICEF
Merge
Mapping
"""
Get latitudes of longitudes.
"""
geolocator = GeoNames(username = "sydneydegen1")
def geolocate(country):
# Geolocate the center of the country
loc = geolocator.geocode(query=country)
# And return latitude and longitude
return (loc.latitude, loc.longitude) if loc else (0,0)
final_df[["Latitude", "Longitude"]] = final_df["Country"].apply(geolocate).apply(pd.Series)
options = list(final_df.columns)
map_feature
/shared-libs/python3.7/py/lib/python3.7/site-packages/folium/folium.py:413: FutureWarning: The choropleth method has been deprecated. Instead use the new Choropleth class, which has the same arguments. See the example notebook 'GeoJSON_and_choropleth' for how to do this.
FutureWarning
Analysis
Correlation Matrix
Governance and Prevalence
Observations 27
GDP -1.155604e-04
NMRA Rating -1.324730e-02
Healthcare Expenditure 8.917094e-04
Government Expenditure 5.277955e-12
CPIA Budgeting -1.038497e-01
CPIA Administration 1.533537e-01
CPIA Corruption 3.856467e-02
Urban Population 1.653616e-03
dtype: float64
GDP -1.197479
NMRA Rating -1.691267
Healthcare Expenditure 1.488216
Government Expenditure 0.708842
CPIA Budgeting -1.095660
CPIA Administration 1.506160
CPIA Corruption 0.494997
Urban Population 0.711684
dtype: float64
Mortality and Morbidity
Child Mortality
Observations 35
Weighted Prevalence 55.767585
GDP 0.000219
dtype: float64
Weighted Prevalence 6.802031
GDP 0.323940
dtype: float64
Malaria Incidence
Observations 35
Weighted Prevalence 716.920386
GDP 0.002070
dtype: float64
Weighted Prevalence 4.424998
GDP 0.154744
dtype: float64
HIV Incidence
Observations 32
Weighted Prevalence 10814.277686
GDP 0.466579
dtype: float64
Weighted Prevalence 1.948766
GDP 0.937380
dtype: float64
Infectious Disease
Observations 35
Weighted Prevalence 164.994302
GDP 0.002764
dtype: float64
Weighted Prevalence 7.608140
GDP 1.544055
dtype: float64