diff --git a/notebooks/ToRates.ipynb b/notebooks/ToRates.ipynb index 6a200ae19ce750b8e141b32f30a2dc919ecf3eb1..d0aa13c5b9a25a4ed06014e22e57ddf30e6ff5eb 100644 --- a/notebooks/ToRates.ipynb +++ b/notebooks/ToRates.ipynb @@ -132,24 +132,32 @@ "outputs": [], "source": [ "region_wb_jhu_map = {\n", - " 'China': 'Mainland China',\n", - " 'Iran, Islamic Rep.': 'Iran (Islamic Republic of)',\n", - " 'Korea, Rep.': 'Republic of Korea',\n", - " 'United States': 'US',\n", - " 'United Kingdom': 'UK',\n", - " 'Hong Kong SAR, China': 'Hong Kong SAR',\n", + " 'Brunei Darussalam': 'Brunei',\n", + " 'Czech Republic': 'Czechia',\n", " 'Egypt, Arab Rep.': 'Egypt',\n", - " 'Vietnam': 'Viet Nam',\n", + " 'Hong Kong SAR, China': 'Hong Kong SAR',\n", + " 'Iran, Islamic Rep.': 'Iran',\n", + " 'Korea, Rep.': 'Korea, South',\n", " 'Macao SAR, China': 'Macao SAR',\n", + " 'Russian Federation': 'Russia',\n", " 'Slovak Republic': 'Slovakia',\n", - " 'Moldova': 'Republic of Moldova',\n", " 'St. Martin (French part)': 'Saint Martin',\n", - " 'Brunei Darussalam': 'Brunei'\n", + " 'United States': 'US'\n", "}\n", "current_pop_ser = pop_df[['Country Name', '2018']].copy().replace(region_wb_jhu_map).set_index('Country Name')['2018']\n", "data_pop_ser = current_pop_ser[current_pop_ser.index.isin(frames_map['confirmed'].index.levels[0])]" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Use this to find the name in the series\n", + "# current_pop_ser[current_pop_ser.index.str.contains('Czech')]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -157,6 +165,17 @@ "There are some regions that we cannot resolve, but we will just ignore these." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "frames_map['confirmed'].loc[\n", + " frames_map['confirmed'].index.levels[0].isin(data_pop_ser.index) == False\n", + "].iloc[:,-2:]" + ] + }, { "cell_type": "markdown", "metadata": {},