{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "28760cc1",
"metadata": {
"_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
"_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
"execution": {
"iopub.execute_input": "2024-01-31T15:10:31.978480Z",
"iopub.status.busy": "2024-01-31T15:10:31.978100Z",
"iopub.status.idle": "2024-01-31T15:10:34.577099Z",
"shell.execute_reply": "2024-01-31T15:10:34.575489Z"
},
"papermill": {
"duration": 2.606611,
"end_time": "2024-01-31T15:10:34.579742",
"exception": false,
"start_time": "2024-01-31T15:10:31.973131",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "75220ebe",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:34.587350Z",
"iopub.status.busy": "2024-01-31T15:10:34.586841Z",
"iopub.status.idle": "2024-01-31T15:10:34.942653Z",
"shell.execute_reply": "2024-01-31T15:10:34.941253Z"
},
"papermill": {
"duration": 0.361849,
"end_time": "2024-01-31T15:10:34.944713",
"exception": false,
"start_time": "2024-01-31T15:10:34.582864",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" country | \n",
" iso_code | \n",
" date | \n",
" total_vaccinations | \n",
" people_vaccinated | \n",
" people_fully_vaccinated | \n",
" daily_vaccinations_raw | \n",
" daily_vaccinations | \n",
" total_vaccinations_per_hundred | \n",
" people_vaccinated_per_hundred | \n",
" people_fully_vaccinated_per_hundred | \n",
" daily_vaccinations_per_million | \n",
" vaccines | \n",
" source_name | \n",
" source_website | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Afghanistan | \n",
" AFG | \n",
" 2021-02-22 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" World Health Organization | \n",
" https://covid19.who.int/ | \n",
"
\n",
" \n",
" 1 | \n",
" Afghanistan | \n",
" AFG | \n",
" 2021-02-23 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1367.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 34.0 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" World Health Organization | \n",
" https://covid19.who.int/ | \n",
"
\n",
" \n",
" 2 | \n",
" Afghanistan | \n",
" AFG | \n",
" 2021-02-24 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1367.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 34.0 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" World Health Organization | \n",
" https://covid19.who.int/ | \n",
"
\n",
" \n",
" 3 | \n",
" Afghanistan | \n",
" AFG | \n",
" 2021-02-25 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1367.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 34.0 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" World Health Organization | \n",
" https://covid19.who.int/ | \n",
"
\n",
" \n",
" 4 | \n",
" Afghanistan | \n",
" AFG | \n",
" 2021-02-26 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1367.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 34.0 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" World Health Organization | \n",
" https://covid19.who.int/ | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" country iso_code date total_vaccinations people_vaccinated \\\n",
"0 Afghanistan AFG 2021-02-22 0.0 0.0 \n",
"1 Afghanistan AFG 2021-02-23 NaN NaN \n",
"2 Afghanistan AFG 2021-02-24 NaN NaN \n",
"3 Afghanistan AFG 2021-02-25 NaN NaN \n",
"4 Afghanistan AFG 2021-02-26 NaN NaN \n",
"\n",
" people_fully_vaccinated daily_vaccinations_raw daily_vaccinations \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN 1367.0 \n",
"2 NaN NaN 1367.0 \n",
"3 NaN NaN 1367.0 \n",
"4 NaN NaN 1367.0 \n",
"\n",
" total_vaccinations_per_hundred people_vaccinated_per_hundred \\\n",
"0 0.0 0.0 \n",
"1 NaN NaN \n",
"2 NaN NaN \n",
"3 NaN NaN \n",
"4 NaN NaN \n",
"\n",
" people_fully_vaccinated_per_hundred daily_vaccinations_per_million \\\n",
"0 NaN NaN \n",
"1 NaN 34.0 \n",
"2 NaN 34.0 \n",
"3 NaN 34.0 \n",
"4 NaN 34.0 \n",
"\n",
" vaccines \\\n",
"0 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... \n",
"1 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... \n",
"2 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... \n",
"3 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... \n",
"4 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... \n",
"\n",
" source_name source_website \n",
"0 World Health Organization https://covid19.who.int/ \n",
"1 World Health Organization https://covid19.who.int/ \n",
"2 World Health Organization https://covid19.who.int/ \n",
"3 World Health Organization https://covid19.who.int/ \n",
"4 World Health Organization https://covid19.who.int/ "
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = pd.read_csv(\"/kaggle/input/country-vaccine/country_vaccinations.csv\")\n",
"data.head()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "7e2c060d",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:34.951934Z",
"iopub.status.busy": "2024-01-31T15:10:34.951548Z",
"iopub.status.idle": "2024-01-31T15:10:35.017800Z",
"shell.execute_reply": "2024-01-31T15:10:35.017093Z"
},
"papermill": {
"duration": 0.072132,
"end_time": "2024-01-31T15:10:35.019772",
"exception": false,
"start_time": "2024-01-31T15:10:34.947640",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_vaccinations | \n",
" people_vaccinated | \n",
" people_fully_vaccinated | \n",
" daily_vaccinations_raw | \n",
" daily_vaccinations | \n",
" total_vaccinations_per_hundred | \n",
" people_vaccinated_per_hundred | \n",
" people_fully_vaccinated_per_hundred | \n",
" daily_vaccinations_per_million | \n",
"
\n",
" \n",
" \n",
" \n",
" count | \n",
" 4.360700e+04 | \n",
" 4.129400e+04 | \n",
" 3.880200e+04 | \n",
" 3.536200e+04 | \n",
" 8.621300e+04 | \n",
" 43607.000000 | \n",
" 41294.000000 | \n",
" 38802.000000 | \n",
" 86213.000000 | \n",
"
\n",
" \n",
" mean | \n",
" 4.592964e+07 | \n",
" 1.770508e+07 | \n",
" 1.413830e+07 | \n",
" 2.705996e+05 | \n",
" 1.313055e+05 | \n",
" 80.188543 | \n",
" 40.927317 | \n",
" 35.523243 | \n",
" 3257.049157 | \n",
"
\n",
" \n",
" std | \n",
" 2.246004e+08 | \n",
" 7.078731e+07 | \n",
" 5.713920e+07 | \n",
" 1.212427e+06 | \n",
" 7.682388e+05 | \n",
" 67.913577 | \n",
" 29.290759 | \n",
" 28.376252 | \n",
" 3934.312440 | \n",
"
\n",
" \n",
" min | \n",
" 0.000000e+00 | \n",
" 0.000000e+00 | \n",
" 1.000000e+00 | \n",
" 0.000000e+00 | \n",
" 0.000000e+00 | \n",
" 0.000000 | \n",
" 0.000000 | \n",
" 0.000000 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" 25% | \n",
" 5.264100e+05 | \n",
" 3.494642e+05 | \n",
" 2.439622e+05 | \n",
" 4.668000e+03 | \n",
" 9.000000e+02 | \n",
" 16.050000 | \n",
" 11.370000 | \n",
" 7.020000 | \n",
" 636.000000 | \n",
"
\n",
" \n",
" 50% | \n",
" 3.590096e+06 | \n",
" 2.187310e+06 | \n",
" 1.722140e+06 | \n",
" 2.530900e+04 | \n",
" 7.343000e+03 | \n",
" 67.520000 | \n",
" 41.435000 | \n",
" 31.750000 | \n",
" 2050.000000 | \n",
"
\n",
" \n",
" 75% | \n",
" 1.701230e+07 | \n",
" 9.152520e+06 | \n",
" 7.559870e+06 | \n",
" 1.234925e+05 | \n",
" 4.409800e+04 | \n",
" 132.735000 | \n",
" 67.910000 | \n",
" 62.080000 | \n",
" 4682.000000 | \n",
"
\n",
" \n",
" max | \n",
" 3.263129e+09 | \n",
" 1.275541e+09 | \n",
" 1.240777e+09 | \n",
" 2.474100e+07 | \n",
" 2.242429e+07 | \n",
" 345.370000 | \n",
" 124.760000 | \n",
" 122.370000 | \n",
" 117497.000000 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_vaccinations people_vaccinated people_fully_vaccinated \\\n",
"count 4.360700e+04 4.129400e+04 3.880200e+04 \n",
"mean 4.592964e+07 1.770508e+07 1.413830e+07 \n",
"std 2.246004e+08 7.078731e+07 5.713920e+07 \n",
"min 0.000000e+00 0.000000e+00 1.000000e+00 \n",
"25% 5.264100e+05 3.494642e+05 2.439622e+05 \n",
"50% 3.590096e+06 2.187310e+06 1.722140e+06 \n",
"75% 1.701230e+07 9.152520e+06 7.559870e+06 \n",
"max 3.263129e+09 1.275541e+09 1.240777e+09 \n",
"\n",
" daily_vaccinations_raw daily_vaccinations \\\n",
"count 3.536200e+04 8.621300e+04 \n",
"mean 2.705996e+05 1.313055e+05 \n",
"std 1.212427e+06 7.682388e+05 \n",
"min 0.000000e+00 0.000000e+00 \n",
"25% 4.668000e+03 9.000000e+02 \n",
"50% 2.530900e+04 7.343000e+03 \n",
"75% 1.234925e+05 4.409800e+04 \n",
"max 2.474100e+07 2.242429e+07 \n",
"\n",
" total_vaccinations_per_hundred people_vaccinated_per_hundred \\\n",
"count 43607.000000 41294.000000 \n",
"mean 80.188543 40.927317 \n",
"std 67.913577 29.290759 \n",
"min 0.000000 0.000000 \n",
"25% 16.050000 11.370000 \n",
"50% 67.520000 41.435000 \n",
"75% 132.735000 67.910000 \n",
"max 345.370000 124.760000 \n",
"\n",
" people_fully_vaccinated_per_hundred daily_vaccinations_per_million \n",
"count 38802.000000 86213.000000 \n",
"mean 35.523243 3257.049157 \n",
"std 28.376252 3934.312440 \n",
"min 0.000000 0.000000 \n",
"25% 7.020000 636.000000 \n",
"50% 31.750000 2050.000000 \n",
"75% 62.080000 4682.000000 \n",
"max 122.370000 117497.000000 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data.describe()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "194f6330",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:35.027756Z",
"iopub.status.busy": "2024-01-31T15:10:35.027189Z",
"iopub.status.idle": "2024-01-31T15:10:35.061206Z",
"shell.execute_reply": "2024-01-31T15:10:35.059758Z"
},
"papermill": {
"duration": 0.040673,
"end_time": "2024-01-31T15:10:35.063658",
"exception": false,
"start_time": "2024-01-31T15:10:35.022985",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"country\n",
"Norway 482\n",
"Latvia 480\n",
"Denmark 476\n",
"United States 471\n",
"Russia 470\n",
" ... \n",
"Bonaire Sint Eustatius and Saba 146\n",
"Tokelau 114\n",
"Saint Helena 92\n",
"Pitcairn 85\n",
"Falkland Islands 67\n",
"Name: count, Length: 223, dtype: int64"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.to_datetime(data.date)\n",
"data.country.value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "585931cf",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:35.071989Z",
"iopub.status.busy": "2024-01-31T15:10:35.071598Z",
"iopub.status.idle": "2024-01-31T15:10:35.115815Z",
"shell.execute_reply": "2024-01-31T15:10:35.114602Z"
},
"papermill": {
"duration": 0.050549,
"end_time": "2024-01-31T15:10:35.117786",
"exception": false,
"start_time": "2024-01-31T15:10:35.067237",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"country\n",
"Norway 482\n",
"Latvia 480\n",
"Denmark 476\n",
"United States 471\n",
"Canada 470\n",
" ... \n",
"Bonaire Sint Eustatius and Saba 146\n",
"Tokelau 114\n",
"Saint Helena 92\n",
"Pitcairn 85\n",
"Falkland Islands 67\n",
"Name: count, Length: 219, dtype: int64"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = data[data.country.apply(lambda x: x not in [\"England\", \"Scotland\", \"Wales\", \"Northern Ireland\"])]\n",
"data.country.value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "bc03595c",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:35.126382Z",
"iopub.status.busy": "2024-01-31T15:10:35.126046Z",
"iopub.status.idle": "2024-01-31T15:10:35.138430Z",
"shell.execute_reply": "2024-01-31T15:10:35.137199Z"
},
"papermill": {
"duration": 0.018974,
"end_time": "2024-01-31T15:10:35.140257",
"exception": false,
"start_time": "2024-01-31T15:10:35.121283",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"vaccines\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech 7608\n",
"Oxford/AstraZeneca 6022\n",
"Oxford/AstraZeneca, Pfizer/BioNTech 4629\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech 4491\n",
"Johnson&Johnson, Moderna, Novavax, Oxford/AstraZeneca, Pfizer/BioNTech 3564\n",
" ... \n",
"Johnson&Johnson, Oxford/AstraZeneca, Sinovac 312\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik V 311\n",
"Johnson&Johnson, Moderna 251\n",
"Johnson&Johnson, Pfizer/BioNTech, Sinopharm/Beijing 228\n",
"EpiVacCorona, Oxford/AstraZeneca, QazVac, Sinopharm/Beijing, Sputnik V, ZF2001 190\n",
"Name: count, Length: 84, dtype: int64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data.vaccines.value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "73355b02",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:35.149005Z",
"iopub.status.busy": "2024-01-31T15:10:35.148618Z",
"iopub.status.idle": "2024-01-31T15:10:35.164812Z",
"shell.execute_reply": "2024-01-31T15:10:35.163711Z"
},
"papermill": {
"duration": 0.022601,
"end_time": "2024-01-31T15:10:35.166653",
"exception": false,
"start_time": "2024-01-31T15:10:35.144052",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" vaccines | \n",
" country | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" Afghanistan | \n",
"
\n",
" \n",
" 1 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" Afghanistan | \n",
"
\n",
" \n",
" 2 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" Afghanistan | \n",
"
\n",
" \n",
" 3 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" Afghanistan | \n",
"
\n",
" \n",
" 4 | \n",
" Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... | \n",
" Afghanistan | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" vaccines country\n",
"0 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... Afghanistan\n",
"1 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... Afghanistan\n",
"2 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... Afghanistan\n",
"3 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... Afghanistan\n",
"4 Johnson&Johnson, Oxford/AstraZeneca, Pfizer/Bi... Afghanistan"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = data[[\"vaccines\", \"country\"]]\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "20b98ef7",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:35.175667Z",
"iopub.status.busy": "2024-01-31T15:10:35.175291Z",
"iopub.status.idle": "2024-01-31T15:10:36.222529Z",
"shell.execute_reply": "2024-01-31T15:10:36.221632Z"
},
"papermill": {
"duration": 1.054463,
"end_time": "2024-01-31T15:10:36.224927",
"exception": false,
"start_time": "2024-01-31T15:10:35.170464",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing:>>{'Trinidad and Tobago', 'Belize', 'Cameroon', 'Afghanistan', 'Namibia'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik V:>>{'Albania', 'Azerbaijan', 'Oman', 'Bosnia and Herzegovina'}\n",
"Oxford/AstraZeneca, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Algeria', 'Zimbabwe'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech:>>{'Sweden', 'United Kingdom', 'Fiji', 'Sint Maarten (Dutch part)', 'Japan', 'Guernsey', 'Australia', 'Isle of Man', 'Andorra', 'Jersey', 'Finland'}\n",
"Oxford/AstraZeneca:>>{'Montserrat', 'Papua New Guinea', 'Vanuatu', 'Togo', 'Nigeria', 'Democratic Republic of Congo', 'Saint Vincent and the Grenadines', 'Nauru', 'Solomon Islands', 'Sao Tome and Principe', 'Pitcairn', 'Mali', 'Saint Helena', 'Tuvalu', 'Angola', 'Kiribati', 'Samoa', 'Tonga', 'Falkland Islands', 'Liberia'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech:>>{'New Zealand', 'Gibraltar', 'Costa Rica', 'Bermuda', 'Anguilla', 'Panama', 'Saint Lucia', 'Saudi Arabia', 'Kosovo', 'Cayman Islands', 'Saint Kitts and Nevis'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sputnik V:>>{'Antigua and Barbuda'}\n",
"CanSino, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Argentina'}\n",
"Moderna, Oxford/AstraZeneca, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Armenia'}\n",
"Pfizer/BioNTech:>>{'Turks and Caicos Islands', 'Monaco', 'New Caledonia', 'Niue', 'Aruba', 'Cook Islands', 'Tokelau'}\n",
"Johnson&Johnson, Moderna, Novavax, Oxford/AstraZeneca, Pfizer/BioNTech:>>{'Germany', 'Slovenia', 'Austria', 'Netherlands', 'South Korea', 'Lithuania', 'Italy', 'Czechia'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech:>>{'Bahamas', 'Grenada', 'Eswatini'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik Light, Sputnik V:>>{'Bahrain'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Bangladesh'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing:>>{'Maldives', 'Suriname', 'Barbados', 'Dominica', 'Peru'}\n",
"Sinopharm/Beijing, Sputnik V:>>{'Kyrgyzstan', 'Belarus'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech:>>{'Luxembourg', 'Canada', 'Belgium', 'Croatia', 'Bulgaria', 'Jamaica', 'Poland', 'Malta', 'Spain', 'Romania', 'France', 'Ireland', 'Estonia', 'Iceland', 'Portugal', 'Cyprus', 'Greece'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac:>>{'Brazil', 'Benin'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing:>>{'Bhutan', 'Cape Verde'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Bolivia', 'Morocco', 'Moldova', \"Cote d'Ivoire\"}\n",
"Moderna, Pfizer/BioNTech:>>{'Norway', 'Qatar', 'Faeroe Islands', 'Israel', 'Bonaire Sint Eustatius and Saba', 'Curacao'}\n",
"Covaxin, Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac:>>{'Botswana'}\n",
"Johnson&Johnson, Oxford/AstraZeneca:>>{'Malawi', 'British Virgin Islands', 'South Sudan'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing:>>{'Kuwait', 'Nepal', 'Kenya', 'Brunei'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Sinopharm/Beijing:>>{'Burkina Faso', 'Lesotho', 'Mozambique', 'Senegal', 'Gambia', 'Zambia', 'Madagascar'}\n",
"Sinopharm/Beijing:>>{'Burundi', 'Equatorial Guinea', 'Chad'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Sinopharm/Beijing, Sinovac:>>{'Cambodia', 'Somalia'}\n",
"Covaxin, Oxford/AstraZeneca:>>{'Central African Republic'}\n",
"CanSino, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac:>>{'Chile', 'Ecuador'}\n",
"CanSino, Sinopharm/Beijing, Sinopharm/Wuhan, Sinovac, ZF2001:>>{'China'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac:>>{'Uganda', 'Ukraine', 'Colombia'}\n",
"Covaxin, Oxford/AstraZeneca, Sinopharm/Beijing:>>{'Comoros', 'Mauritius'}\n",
"Moderna, Oxford/AstraZeneca, Sinopharm/Beijing, Sputnik V:>>{'Congo'}\n",
"Abdala, Soberana Plus, Soberana02:>>{'Cuba'}\n",
"Johnson&Johnson, Moderna, Pfizer/BioNTech:>>{'Liechtenstein', 'Denmark', 'Switzerland', 'United States'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Djibouti', 'Guinea', 'Egypt'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'El Salvador', 'Dominican Republic', 'Georgia'}\n",
"Covaxin, Johnson&Johnson, Oxford/AstraZeneca, Sinopharm/Beijing, Sinovac:>>{'Ethiopia'}\n",
"Johnson&Johnson, Pfizer/BioNTech:>>{'South Africa', 'French Polynesia'}\n",
"Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Gabon'}\n",
"Oxford/AstraZeneca, Sputnik V:>>{'Ghana'}\n",
"Moderna:>>{'Greenland', 'Wallis and Futuna'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sputnik V:>>{'Guatemala'}\n",
"Oxford/AstraZeneca, Sinopharm/Beijing:>>{'Myanmar', 'Guinea-Bissau', 'Sierra Leone', 'Niger', 'Mauritania'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Guyana', 'Sri Lanka'}\n",
"Johnson&Johnson, Moderna:>>{'Haiti'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sputnik V:>>{'Honduras'}\n",
"Pfizer/BioNTech, Sinovac:>>{'Hong Kong'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Jordan', 'Hungary'}\n",
"Covaxin, Oxford/AstraZeneca, Sputnik V:>>{'India'}\n",
"Johnson&Johnson, Moderna, Novavax, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Indonesia'}\n",
"COVIran Barekat, Covaxin, FAKHRAVAC, Oxford/AstraZeneca, Razi Cov Pars, Sinopharm/Beijing, Soberana02, SpikoGen, Sputnik V:>>{'Iran'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Mongolia', 'Montenegro', 'Serbia', 'Lebanon', 'Iraq'}\n",
"QazVac, Sinopharm/Beijing, Sputnik V:>>{'Kazakhstan'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik Light, Sputnik V:>>{'Laos'}\n",
"Johnson&Johnson, Moderna, Novavax, Pfizer/BioNTech:>>{'Latvia'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'North Macedonia', 'Libya'}\n",
"Pfizer/BioNTech, Sinopharm/Beijing:>>{'Macao'}\n",
"CanSino, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Malaysia'}\n",
"CanSino, Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik V:>>{'Mexico'}\n",
"Abdala, Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Soberana02, Sputnik Light, Sputnik V:>>{'Nicaragua'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac:>>{'Timor', 'Northern Cyprus', 'Uruguay'}\n",
"CanSino, Covaxin, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Pakistan'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik Light, Sputnik V:>>{'Palestine', 'Philippines'}\n",
"Covaxin, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Paraguay'}\n",
"EpiVacCorona, Sputnik V:>>{'Russia'}\n",
"Johnson&Johnson, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac, Sputnik V:>>{'Rwanda', 'Tunisia'}\n",
"Pfizer/BioNTech, Sputnik V:>>{'San Marino'}\n",
"Oxford/AstraZeneca, Sinopharm/Beijing, Sputnik V:>>{'Seychelles'}\n",
"Moderna, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Singapore'}\n",
"Johnson&Johnson, Moderna, Novavax, Oxford/AstraZeneca, Pfizer/BioNTech, Sputnik V:>>{'Slovakia'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Sudan'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Sinopharm/Beijing, Sinovac, Sputnik Light, Sputnik V:>>{'Syria'}\n",
"Medigen, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech:>>{'Taiwan'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik V:>>{'Tajikistan'}\n",
"Johnson&Johnson, Pfizer/BioNTech, Sinopharm/Beijing:>>{'Tanzania'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinovac:>>{'Thailand'}\n",
"Pfizer/BioNTech, Sinovac, Turkovac:>>{'Turkey'}\n",
"EpiVacCorona, Oxford/AstraZeneca, QazVac, Sinopharm/Beijing, Sputnik V, ZF2001:>>{'Turkmenistan'}\n",
"Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sinopharm/Wuhan, Sputnik V:>>{'United Arab Emirates'}\n",
"Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinovac, Sputnik Light, Sputnik V, ZF2001:>>{'Uzbekistan'}\n",
"Abdala, Sinopharm/Beijing, Sinovac, Soberana02, Sputnik Light, Sputnik V:>>{'Venezuela'}\n",
"Abdala, Moderna, Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm/Beijing, Sputnik V:>>{'Vietnam'}\n",
"Johnson&Johnson, Oxford/AstraZeneca, Sinovac:>>{'Yemen'}\n"
]
}
],
"source": [
"dict_ = {}\n",
"for i in df.vaccines.unique():\n",
" dict_[i] = [df[\"country\"][j] for j in df[df[\"vaccines\"]==i].index]\n",
"\n",
"vaccines = {}\n",
"for key, value in dict_.items():\n",
" vaccines[key] = set(value)\n",
"for i, j in vaccines.items():\n",
" print(f\"{i}:>>{j}\")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "fc8aa83c",
"metadata": {
"execution": {
"iopub.execute_input": "2024-01-31T15:10:36.234927Z",
"iopub.status.busy": "2024-01-31T15:10:36.234343Z",
"iopub.status.idle": "2024-01-31T15:10:39.946073Z",
"shell.execute_reply": "2024-01-31T15:10:39.945049Z"
},
"papermill": {
"duration": 3.725745,
"end_time": "2024-01-31T15:10:39.954773",
"exception": false,
"start_time": "2024-01-31T15:10:36.229028",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.10/site-packages/plotly/express/_core.py:2065: FutureWarning:\n",
"\n",
"When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.\n",
"\n"
]
},
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly.express as px\n",
"import plotly.offline as py\n",
"\n",
"vaccine_map = px.choropleth(data, locations = 'iso_code', color = 'vaccines')\n",
"vaccine_map.update_layout(height=300, margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\n",
"vaccine_map.show()"
]
}
],
"metadata": {
"kaggle": {
"accelerator": "none",
"dataSources": [
{
"datasetId": 4381737,
"sourceId": 7521807,
"sourceType": "datasetVersion"
}
],
"dockerImageVersionId": 30646,
"isGpuEnabled": false,
"isInternetEnabled": true,
"language": "python",
"sourceType": "notebook"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
},
"papermill": {
"default_parameters": {},
"duration": 11.346998,
"end_time": "2024-01-31T15:10:40.685764",
"environment_variables": {},
"exception": null,
"input_path": "__notebook__.ipynb",
"output_path": "__notebook__.ipynb",
"parameters": {},
"start_time": "2024-01-31T15:10:29.338766",
"version": "2.5.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}