ium_434804/Zadanie_1.ipynb

1252 lines
780 KiB
Plaintext
Raw Normal View History

2021-03-20 18:07:33 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 95,
"id": "blocked-battle",
"metadata": {},
"outputs": [],
"source": [
"# !pip install kaggle\n",
"# !pip install pandas"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "civic-martin",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading covid-world-vaccination-progress.zip to E:\\Na studia\\Magisterka\\Inżynieria uczenia maszynowego\\IUM_434804\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
" 0%| | 0.00/160k [00:00<?, ?B/s]\n",
"100%|##########| 160k/160k [00:00<00:00, 1.20MB/s]\n",
"100%|##########| 160k/160k [00:00<00:00, 1.19MB/s]\n"
]
}
],
"source": [
"# !kaggle datasets download -d gpreda/covid-world-vaccination-progress"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "minus-belly",
"metadata": {},
"outputs": [],
"source": [
"import zipfile\n",
"with zipfile.ZipFile('covid-world-vaccination-progress.zip', 'r') as zip_ref:\n",
" zip_ref.extractall(\".\") "
]
},
{
"cell_type": "code",
"execution_count": 108,
"id": "norman-british",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"df = pd.read_csv('country_vaccinations.csv')\n",
"# podział danych na train/validate/test (6:2:2) za pomocą biblioteki numpy i pandas\n",
"train, validate, test = np.split(df.sample(frac=1), [int(.6*len(df)), int(.8*len(df))])"
]
},
{
"cell_type": "code",
"execution_count": 99,
"id": "twenty-wednesday",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Whole set size 110055\n",
"Train set size: 66030\n",
"Validate set size: 22005\n",
"Test set size: 22020\n"
]
}
],
"source": [
"# Wypisanie ilości elementów w poszczególnych ramkach danych\n",
"print(\"Whole set size\".ljust(20), df.size)\n",
"print(\"Train set size: \".ljust(20), train.size)\n",
"print(\"Validate set size: \".ljust(20), validate.size)\n",
"print(\"Test set size: \".ljust(20), test.size)"
]
},
{
"cell_type": "code",
"execution_count": 100,
"id": "sustained-active",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>country</th>\n",
" <th>iso_code</th>\n",
" <th>date</th>\n",
" <th>total_vaccinations</th>\n",
" <th>people_vaccinated</th>\n",
" <th>people_fully_vaccinated</th>\n",
" <th>daily_vaccinations_raw</th>\n",
" <th>daily_vaccinations</th>\n",
" <th>total_vaccinations_per_hundred</th>\n",
" <th>people_vaccinated_per_hundred</th>\n",
" <th>people_fully_vaccinated_per_hundred</th>\n",
" <th>daily_vaccinations_per_million</th>\n",
" <th>vaccines</th>\n",
" <th>source_name</th>\n",
" <th>source_website</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>7337</td>\n",
" <td>7337</td>\n",
" <td>7337</td>\n",
" <td>4.552000e+03</td>\n",
" <td>4.053000e+03</td>\n",
" <td>2.749000e+03</td>\n",
" <td>3.830000e+03</td>\n",
" <td>7.150000e+03</td>\n",
" <td>4552.000000</td>\n",
" <td>4053.000000</td>\n",
" <td>2749.000000</td>\n",
" <td>7150.000000</td>\n",
" <td>7337</td>\n",
" <td>7337</td>\n",
" <td>7337</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>150</td>\n",
" <td>150</td>\n",
" <td>97</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>25</td>\n",
" <td>91</td>\n",
" <td>145</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>Canada</td>\n",
" <td>GBR</td>\n",
" <td>2021-03-09</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Moderna, Oxford/AstraZeneca, Pfizer/BioNTech</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://coronavirus.data.gov.uk/details/health...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>96</td>\n",
" <td>96</td>\n",
" <td>129</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1798</td>\n",
" <td>2329</td>\n",
" <td>480</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2.361121e+06</td>\n",
" <td>1.918598e+06</td>\n",
" <td>7.999520e+05</td>\n",
" <td>8.744129e+04</td>\n",
" <td>5.825144e+04</td>\n",
" <td>9.398541</td>\n",
" <td>7.237774</td>\n",
" <td>3.361342</td>\n",
" <td>2675.625594</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>8.421579e+06</td>\n",
" <td>6.249484e+06</td>\n",
" <td>3.230805e+06</td>\n",
" <td>2.693155e+05</td>\n",
" <td>1.992295e+05</td>\n",
" <td>16.995766</td>\n",
" <td>11.614673</td>\n",
" <td>7.262965</td>\n",
" <td>4229.243670</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000000e+00</td>\n",
" <td>0.000000e+00</td>\n",
" <td>1.000000e+00</td>\n",
" <td>0.000000e+00</td>\n",
" <td>1.000000e+00</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>3.741475e+04</td>\n",
" <td>3.457400e+04</td>\n",
" <td>1.799500e+04</td>\n",
" <td>2.732000e+03</td>\n",
" <td>9.882500e+02</td>\n",
" <td>0.717500</td>\n",
" <td>0.720000</td>\n",
" <td>0.370000</td>\n",
" <td>355.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2.536690e+05</td>\n",
" <td>2.334230e+05</td>\n",
" <td>9.966600e+04</td>\n",
" <td>1.365700e+04</td>\n",
" <td>5.952500e+03</td>\n",
" <td>3.465000</td>\n",
" <td>3.050000</td>\n",
" <td>1.360000</td>\n",
" <td>1247.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.195748e+06</td>\n",
" <td>9.467810e+05</td>\n",
" <td>4.625030e+05</td>\n",
" <td>5.718200e+04</td>\n",
" <td>2.680500e+04</td>\n",
" <td>10.080000</td>\n",
" <td>7.890000</td>\n",
" <td>3.000000</td>\n",
" <td>3026.750000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.183138e+08</td>\n",
" <td>7.723006e+07</td>\n",
" <td>4.193463e+07</td>\n",
" <td>4.575496e+06</td>\n",
" <td>2.541597e+06</td>\n",
" <td>151.860000</td>\n",
" <td>88.790000</td>\n",
" <td>63.070000</td>\n",
" <td>54264.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" country iso_code date total_vaccinations people_vaccinated \\\n",
"count 7337 7337 7337 4.552000e+03 4.053000e+03 \n",
"unique 150 150 97 NaN NaN \n",
"top Canada GBR 2021-03-09 NaN NaN \n",
"freq 96 96 129 NaN NaN \n",
"mean NaN NaN NaN 2.361121e+06 1.918598e+06 \n",
"std NaN NaN NaN 8.421579e+06 6.249484e+06 \n",
"min NaN NaN NaN 0.000000e+00 0.000000e+00 \n",
"25% NaN NaN NaN 3.741475e+04 3.457400e+04 \n",
"50% NaN NaN NaN 2.536690e+05 2.334230e+05 \n",
"75% NaN NaN NaN 1.195748e+06 9.467810e+05 \n",
"max NaN NaN NaN 1.183138e+08 7.723006e+07 \n",
"\n",
" people_fully_vaccinated daily_vaccinations_raw daily_vaccinations \\\n",
"count 2.749000e+03 3.830000e+03 7.150000e+03 \n",
"unique NaN NaN NaN \n",
"top NaN NaN NaN \n",
"freq NaN NaN NaN \n",
"mean 7.999520e+05 8.744129e+04 5.825144e+04 \n",
"std 3.230805e+06 2.693155e+05 1.992295e+05 \n",
"min 1.000000e+00 0.000000e+00 1.000000e+00 \n",
"25% 1.799500e+04 2.732000e+03 9.882500e+02 \n",
"50% 9.966600e+04 1.365700e+04 5.952500e+03 \n",
"75% 4.625030e+05 5.718200e+04 2.680500e+04 \n",
"max 4.193463e+07 4.575496e+06 2.541597e+06 \n",
"\n",
" total_vaccinations_per_hundred people_vaccinated_per_hundred \\\n",
"count 4552.000000 4053.000000 \n",
"unique NaN NaN \n",
"top NaN NaN \n",
"freq NaN NaN \n",
"mean 9.398541 7.237774 \n",
"std 16.995766 11.614673 \n",
"min 0.000000 0.000000 \n",
"25% 0.717500 0.720000 \n",
"50% 3.465000 3.050000 \n",
"75% 10.080000 7.890000 \n",
"max 151.860000 88.790000 \n",
"\n",
" people_fully_vaccinated_per_hundred daily_vaccinations_per_million \\\n",
"count 2749.000000 7150.000000 \n",
"unique NaN NaN \n",
"top NaN NaN \n",
"freq NaN NaN \n",
"mean 3.361342 2675.625594 \n",
"std 7.262965 4229.243670 \n",
"min 0.000000 0.000000 \n",
"25% 0.370000 355.000000 \n",
"50% 1.360000 1247.000000 \n",
"75% 3.000000 3026.750000 \n",
"max 63.070000 54264.000000 \n",
"\n",
" vaccines source_name \\\n",
"count 7337 7337 \n",
"unique 25 91 \n",
"top Moderna, Oxford/AstraZeneca, Pfizer/BioNTech Ministry of Health \n",
"freq 1798 2329 \n",
"mean NaN NaN \n",
"std NaN NaN \n",
"min NaN NaN \n",
"25% NaN NaN \n",
"50% NaN NaN \n",
"75% NaN NaN \n",
"max NaN NaN \n",
"\n",
" source_website \n",
"count 7337 \n",
"unique 145 \n",
"top https://coronavirus.data.gov.uk/details/health... \n",
"freq 480 \n",
"mean NaN \n",
"std NaN \n",
"min NaN \n",
"25% NaN \n",
"50% NaN \n",
"75% NaN \n",
"max NaN "
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.describe(include='all')"
]
},
{
"cell_type": "code",
"execution_count": 101,
"id": "occupational-armor",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" country\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" iso_code\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" date\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" total_vaccinations\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" people_vaccinated\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" people_fully_vaccinated\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" daily_vaccinations_raw\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" daily_vaccinations\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" total_vaccinations_per_hundred\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" people_vaccinated_per_hundred\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" people_fully_vaccinated_per_hundred\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" daily_vaccinations_per_million\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" vaccines\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" source_name\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n",
"\n",
" source_website\n",
"AxesSubplot(0.125,0.125;0.775x0.755)\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABrgAAAhyCAYAAAA7Gp8xAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOzdd7w0V10/8M9JoYaQAKGXAKKISDM0QQERAekdLESk+qNJk2AhSq9KkWKAUKT3TqiB0EIKT0gIEIiAFBFQqqCgcH5/nNk8c+fO7N29z5My4f1+vfZ1786emZ3dnTlz5nznfKfUWg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gVAS4AAAAAAABmRYALAAAAAACAWRHgAgAAAAAAYFYEuAAAAAAAAJgVAS4AAAAAAABmRYALAAAAAACAWRHgAgAAAAAAYFYEuAAAAAAAAJgVAS4AAAAAAABmRYALAAAAAACAWRHgAgAAAAAAYFYEuAAAAAAAAJgVAS4AAAAAAABmZcsAVynl8FLKt0opn+5N+9tSytdLKSd0j9/vvfaoUsqppZRTSik37U2/WTft1FLKIbv/owAAAAAAAPCLYJURXC9JcrOR6f9Qa71a93hnkpRSrpTkrkl+rZvnuaWUPUspeyZ5TpKbJ7lSkrt1ZQEAAAAAAGAte21VoNZ6VCnlwBWXd5skr661/iTJl0oppya5VvfaqbXWLyZJKeXVXdnPrL/KAAAAAAAA/CLblXtwPaCUcmKXwnD/btolkny1V+Zr3bSp6QAAAAAAALCW7Qa4npfk8kmuluQbSZ6+u1aolHKfUspxpZTjvv3tb++uxQI
"text/plain": [
"<Figure size 2160x720 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"for col in df.columns:\n",
" column = df[col].value_counts().plot(kind=\"bar\",figsize=(30,10))\n",
" print(\"\\n\", col)\n",
" print(column)"
]
},
{
"cell_type": "code",
"execution_count": 105,
"id": "occupational-option",
"metadata": {},
"outputs": [],
"source": [
"# !pip install sklearn"
]
},
{
"cell_type": "code",
"execution_count": 111,
"id": "hispanic-script",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>country</th>\n",
" <th>iso_code</th>\n",
" <th>date</th>\n",
" <th>total_vaccinations</th>\n",
" <th>people_vaccinated</th>\n",
" <th>people_fully_vaccinated</th>\n",
" <th>daily_vaccinations_raw</th>\n",
" <th>daily_vaccinations</th>\n",
" <th>total_vaccinations_per_hundred</th>\n",
" <th>people_vaccinated_per_hundred</th>\n",
" <th>people_fully_vaccinated_per_hundred</th>\n",
" <th>daily_vaccinations_per_million</th>\n",
" <th>vaccines</th>\n",
" <th>source_name</th>\n",
" <th>source_website</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Afghanistan</td>\n",
" <td>AFG</td>\n",
" <td>2021-02-22</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Government of Afghanistan</td>\n",
" <td>http://www.xinhuanet.com/english/asiapacific/2...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Afghanistan</td>\n",
" <td>AFG</td>\n",
" <td>2021-02-23</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000537</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000645</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Government of Afghanistan</td>\n",
" <td>http://www.xinhuanet.com/english/asiapacific/2...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Afghanistan</td>\n",
" <td>AFG</td>\n",
" <td>2021-02-24</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000537</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000645</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Government of Afghanistan</td>\n",
" <td>http://www.xinhuanet.com/english/asiapacific/2...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Afghanistan</td>\n",
" <td>AFG</td>\n",
" <td>2021-02-25</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000537</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000645</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Government of Afghanistan</td>\n",
" <td>http://www.xinhuanet.com/english/asiapacific/2...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Afghanistan</td>\n",
" <td>AFG</td>\n",
" <td>2021-02-26</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000537</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000645</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Government of Afghanistan</td>\n",
" <td>http://www.xinhuanet.com/english/asiapacific/2...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7332</th>\n",
" <td>Zimbabwe</td>\n",
" <td>ZWE</td>\n",
" <td>2021-03-15</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Sinopharm/Beijing</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://twitter.com/MoHCCZim/status/1373023610...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7333</th>\n",
" <td>Zimbabwe</td>\n",
" <td>ZWE</td>\n",
" <td>2021-03-16</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Sinopharm/Beijing</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://twitter.com/MoHCCZim/status/1373023610...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7334</th>\n",
" <td>Zimbabwe</td>\n",
" <td>ZWE</td>\n",
" <td>2021-03-17</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Sinopharm/Beijing</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://twitter.com/MoHCCZim/status/1373023610...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7335</th>\n",
" <td>Zimbabwe</td>\n",
" <td>ZWE</td>\n",
" <td>2021-03-18</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Sinopharm/Beijing</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://twitter.com/MoHCCZim/status/1373023610...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7336</th>\n",
" <td>Zimbabwe</td>\n",
" <td>ZWE</td>\n",
" <td>2021-03-19</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Sinopharm/Beijing</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://twitter.com/MoHCCZim/status/1373023610...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>7337 rows × 15 columns</p>\n",
"</div>"
],
"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",
"7332 Zimbabwe ZWE 2021-03-15 NaN NaN \n",
"7333 Zimbabwe ZWE 2021-03-16 NaN NaN \n",
"7334 Zimbabwe ZWE 2021-03-17 NaN NaN \n",
"7335 Zimbabwe ZWE 2021-03-18 NaN NaN \n",
"7336 Zimbabwe ZWE 2021-03-19 NaN NaN \n",
"\n",
" people_fully_vaccinated daily_vaccinations_raw daily_vaccinations \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN 0.000537 \n",
"2 NaN NaN 0.000537 \n",
"3 NaN NaN 0.000537 \n",
"4 NaN NaN 0.000537 \n",
"... ... ... ... \n",
"7332 NaN NaN NaN \n",
"7333 NaN NaN NaN \n",
"7334 NaN NaN NaN \n",
"7335 NaN NaN NaN \n",
"7336 NaN NaN NaN \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",
"7332 NaN NaN \n",
"7333 NaN NaN \n",
"7334 NaN NaN \n",
"7335 NaN NaN \n",
"7336 NaN NaN \n",
"\n",
" people_fully_vaccinated_per_hundred daily_vaccinations_per_million \\\n",
"0 NaN NaN \n",
"1 NaN 0.000645 \n",
"2 NaN 0.000645 \n",
"3 NaN 0.000645 \n",
"4 NaN 0.000645 \n",
"... ... ... \n",
"7332 NaN NaN \n",
"7333 NaN NaN \n",
"7334 NaN NaN \n",
"7335 NaN NaN \n",
"7336 NaN NaN \n",
"\n",
" vaccines source_name \\\n",
"0 Oxford/AstraZeneca Government of Afghanistan \n",
"1 Oxford/AstraZeneca Government of Afghanistan \n",
"2 Oxford/AstraZeneca Government of Afghanistan \n",
"3 Oxford/AstraZeneca Government of Afghanistan \n",
"4 Oxford/AstraZeneca Government of Afghanistan \n",
"... ... ... \n",
"7332 Sinopharm/Beijing Ministry of Health \n",
"7333 Sinopharm/Beijing Ministry of Health \n",
"7334 Sinopharm/Beijing Ministry of Health \n",
"7335 Sinopharm/Beijing Ministry of Health \n",
"7336 Sinopharm/Beijing Ministry of Health \n",
"\n",
" source_website \n",
"0 http://www.xinhuanet.com/english/asiapacific/2... \n",
"1 http://www.xinhuanet.com/english/asiapacific/2... \n",
"2 http://www.xinhuanet.com/english/asiapacific/2... \n",
"3 http://www.xinhuanet.com/english/asiapacific/2... \n",
"4 http://www.xinhuanet.com/english/asiapacific/2... \n",
"... ... \n",
"7332 https://twitter.com/MoHCCZim/status/1373023610... \n",
"7333 https://twitter.com/MoHCCZim/status/1373023610... \n",
"7334 https://twitter.com/MoHCCZim/status/1373023610... \n",
"7335 https://twitter.com/MoHCCZim/status/1373023610... \n",
"7336 https://twitter.com/MoHCCZim/status/1373023610... \n",
"\n",
"[7337 rows x 15 columns]"
]
},
"execution_count": 111,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn import preprocessing\n",
"# normalizacja wartości numerycznych\n",
"numeric_values = df.select_dtypes(include='float64').values # tylko wartości numeryczne\n",
"min_max_scaler = preprocessing.MinMaxScaler()\n",
"x_scaled = min_max_scaler.fit_transform(values)\n",
"numeric_columns = df.select_dtypes(include='float64').columns\n",
"df_normalized = pd.DataFrame(x_scaled, columns=numeric_columns)\n",
"for col in df.columns: # usunięcie nieznormalizowanych danych i wstawienie nowych już znormalizowanych do oryginalnej ramki danych\n",
" if col in numeric_columns: df[col] = df_normalized[col]"
]
},
{
"cell_type": "code",
"execution_count": 112,
"id": "creative-deficit",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>country</th>\n",
" <th>iso_code</th>\n",
" <th>date</th>\n",
" <th>total_vaccinations</th>\n",
" <th>people_vaccinated</th>\n",
" <th>people_fully_vaccinated</th>\n",
" <th>daily_vaccinations_raw</th>\n",
" <th>daily_vaccinations</th>\n",
" <th>total_vaccinations_per_hundred</th>\n",
" <th>people_vaccinated_per_hundred</th>\n",
" <th>people_fully_vaccinated_per_hundred</th>\n",
" <th>daily_vaccinations_per_million</th>\n",
" <th>vaccines</th>\n",
" <th>source_name</th>\n",
" <th>source_website</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>46</th>\n",
" <td>Albania</td>\n",
" <td>ALB</td>\n",
" <td>2021-02-02</td>\n",
" <td>0.000027</td>\n",
" <td>0.000033</td>\n",
" <td>0.000015</td>\n",
" <td>0.000295</td>\n",
" <td>0.000100</td>\n",
" <td>0.000751</td>\n",
" <td>0.000906</td>\n",
" <td>0.000344</td>\n",
" <td>0.001622</td>\n",
" <td>Pfizer/BioNTech</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://shendetesia.gov.al/covid19-ministria-e...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>234</th>\n",
" <td>Antigua and Barbuda</td>\n",
" <td>ATG</td>\n",
" <td>2021-03-13</td>\n",
" <td>0.002351</td>\n",
" <td>0.003385</td>\n",
" <td>0.000409</td>\n",
" <td>0.003888</td>\n",
" <td>0.004605</td>\n",
" <td>0.004030</td>\n",
" <td>0.006229</td>\n",
" <td>0.000688</td>\n",
" <td>0.004773</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://www.facebook.com/investingforwellness/...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>235</th>\n",
" <td>Antigua and Barbuda</td>\n",
" <td>ATG</td>\n",
" <td>2021-03-14</td>\n",
" <td>0.002474</td>\n",
" <td>0.003454</td>\n",
" <td>0.000629</td>\n",
" <td>0.003033</td>\n",
" <td>0.004431</td>\n",
" <td>0.004235</td>\n",
" <td>0.006342</td>\n",
" <td>0.001033</td>\n",
" <td>0.004589</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://www.facebook.com/investingforwellness/...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>236</th>\n",
" <td>Antigua and Barbuda</td>\n",
" <td>ATG</td>\n",
" <td>2021-03-15</td>\n",
" <td>0.002548</td>\n",
" <td>0.003514</td>\n",
" <td>0.000730</td>\n",
" <td>0.001849</td>\n",
" <td>0.004376</td>\n",
" <td>0.004371</td>\n",
" <td>0.006455</td>\n",
" <td>0.001033</td>\n",
" <td>0.004533</td>\n",
" <td>Oxford/AstraZeneca</td>\n",
" <td>Ministry of Health</td>\n",
" <td>https://www.facebook.com/investingforwellness/...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>237</th>\n",
" <td>Argentina</td>\n",
" <td>ARG</td>\n",
" <td>2020-12-29</td>\n",
" <td>0.002583</td>\n",
" <td>0.003530</td>\n",
" <td>0.000800</td>\n",
" <td>0.000865</td>\n",
" <td>0.004069</td>\n",
" <td>0.004440</td>\n",
" <td>0.006569</td>\n",
" <td>0.001205</td>\n",
" <td>0.004220</td>\n",
" <td>Oxford/AstraZeneca, Sinopharm/Beijing, Sputnik V</td>\n",
" <td>Ministry of Health</td>\n",
" <td>http://datos.salud.gob.ar/dataset/vacunas-cont...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6965</th>\n",
" <td>United Arab Emirates</td>\n",
" <td>ARE</td>\n",
" <td>2021-03-10</td>\n",
" <td>0.011805</td>\n",
" <td>0.014719</td>\n",
" <td>0.006252</td>\n",
" <td>0.008788</td>\n",
" <td>0.010273</td>\n",
" <td>0.289051</td>\n",
" <td>0.389468</td>\n",
" <td>0.136465</td>\n",
" <td>0.152606</td>\n",
" <td>Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm...</td>\n",
" <td>National Emergency Crisis and Disaster Managem...</td>\n",
" <td>http://covid19.ncema.gov.ae/en</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6966</th>\n",
" <td>United Arab Emirates</td>\n",
" <td>ARE</td>\n",
" <td>2021-03-11</td>\n",
" <td>0.012128</td>\n",
" <td>0.015115</td>\n",
" <td>0.006437</td>\n",
" <td>0.007986</td>\n",
" <td>0.011229</td>\n",
" <td>0.296974</td>\n",
" <td>0.400000</td>\n",
" <td>0.140423</td>\n",
" <td>0.166814</td>\n",
" <td>Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm...</td>\n",
" <td>National Emergency Crisis and Disaster Managem...</td>\n",
" <td>http://covid19.ncema.gov.ae/en</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6967</th>\n",
" <td>United Arab Emirates</td>\n",
" <td>ARE</td>\n",
" <td>2021-03-12</td>\n",
" <td>0.012272</td>\n",
" <td>0.015243</td>\n",
" <td>0.006608</td>\n",
" <td>0.003560</td>\n",
" <td>0.011531</td>\n",
" <td>0.300526</td>\n",
" <td>0.403398</td>\n",
" <td>0.144209</td>\n",
" <td>0.171292</td>\n",
" <td>Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm...</td>\n",
" <td>National Emergency Crisis and Disaster Managem...</td>\n",
" <td>http://covid19.ncema.gov.ae/en</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6968</th>\n",
" <td>United Arab Emirates</td>\n",
" <td>ARE</td>\n",
" <td>2021-03-13</td>\n",
" <td>0.012499</td>\n",
" <td>0.015473</td>\n",
" <td>0.006826</td>\n",
" <td>0.005609</td>\n",
" <td>0.011996</td>\n",
" <td>0.306058</td>\n",
" <td>0.409400</td>\n",
" <td>0.149028</td>\n",
" <td>0.178221</td>\n",
" <td>Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm...</td>\n",
" <td>National Emergency Crisis and Disaster Managem...</td>\n",
" <td>http://covid19.ncema.gov.ae/en</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6969</th>\n",
" <td>United Arab Emirates</td>\n",
" <td>ARE</td>\n",
" <td>2021-03-14</td>\n",
" <td>0.012796</td>\n",
" <td>0.015709</td>\n",
" <td>0.007232</td>\n",
" <td>0.007341</td>\n",
" <td>0.012412</td>\n",
" <td>0.313367</td>\n",
" <td>0.415629</td>\n",
" <td>0.157804</td>\n",
" <td>0.184395</td>\n",
" <td>Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm...</td>\n",
" <td>National Emergency Crisis and Disaster Managem...</td>\n",
" <td>http://covid19.ncema.gov.ae/en</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2367 rows × 15 columns</p>\n",
"</div>"
],
"text/plain": [
" country iso_code date total_vaccinations \\\n",
"46 Albania ALB 2021-02-02 0.000027 \n",
"234 Antigua and Barbuda ATG 2021-03-13 0.002351 \n",
"235 Antigua and Barbuda ATG 2021-03-14 0.002474 \n",
"236 Antigua and Barbuda ATG 2021-03-15 0.002548 \n",
"237 Argentina ARG 2020-12-29 0.002583 \n",
"... ... ... ... ... \n",
"6965 United Arab Emirates ARE 2021-03-10 0.011805 \n",
"6966 United Arab Emirates ARE 2021-03-11 0.012128 \n",
"6967 United Arab Emirates ARE 2021-03-12 0.012272 \n",
"6968 United Arab Emirates ARE 2021-03-13 0.012499 \n",
"6969 United Arab Emirates ARE 2021-03-14 0.012796 \n",
"\n",
" people_vaccinated people_fully_vaccinated daily_vaccinations_raw \\\n",
"46 0.000033 0.000015 0.000295 \n",
"234 0.003385 0.000409 0.003888 \n",
"235 0.003454 0.000629 0.003033 \n",
"236 0.003514 0.000730 0.001849 \n",
"237 0.003530 0.000800 0.000865 \n",
"... ... ... ... \n",
"6965 0.014719 0.006252 0.008788 \n",
"6966 0.015115 0.006437 0.007986 \n",
"6967 0.015243 0.006608 0.003560 \n",
"6968 0.015473 0.006826 0.005609 \n",
"6969 0.015709 0.007232 0.007341 \n",
"\n",
" daily_vaccinations total_vaccinations_per_hundred \\\n",
"46 0.000100 0.000751 \n",
"234 0.004605 0.004030 \n",
"235 0.004431 0.004235 \n",
"236 0.004376 0.004371 \n",
"237 0.004069 0.004440 \n",
"... ... ... \n",
"6965 0.010273 0.289051 \n",
"6966 0.011229 0.296974 \n",
"6967 0.011531 0.300526 \n",
"6968 0.011996 0.306058 \n",
"6969 0.012412 0.313367 \n",
"\n",
" people_vaccinated_per_hundred people_fully_vaccinated_per_hundred \\\n",
"46 0.000906 0.000344 \n",
"234 0.006229 0.000688 \n",
"235 0.006342 0.001033 \n",
"236 0.006455 0.001033 \n",
"237 0.006569 0.001205 \n",
"... ... ... \n",
"6965 0.389468 0.136465 \n",
"6966 0.400000 0.140423 \n",
"6967 0.403398 0.144209 \n",
"6968 0.409400 0.149028 \n",
"6969 0.415629 0.157804 \n",
"\n",
" daily_vaccinations_per_million \\\n",
"46 0.001622 \n",
"234 0.004773 \n",
"235 0.004589 \n",
"236 0.004533 \n",
"237 0.004220 \n",
"... ... \n",
"6965 0.152606 \n",
"6966 0.166814 \n",
"6967 0.171292 \n",
"6968 0.178221 \n",
"6969 0.184395 \n",
"\n",
" vaccines \\\n",
"46 Pfizer/BioNTech \n",
"234 Oxford/AstraZeneca \n",
"235 Oxford/AstraZeneca \n",
"236 Oxford/AstraZeneca \n",
"237 Oxford/AstraZeneca, Sinopharm/Beijing, Sputnik V \n",
"... ... \n",
"6965 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm... \n",
"6966 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm... \n",
"6967 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm... \n",
"6968 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm... \n",
"6969 Oxford/AstraZeneca, Pfizer/BioNTech, Sinopharm... \n",
"\n",
" source_name \\\n",
"46 Ministry of Health \n",
"234 Ministry of Health \n",
"235 Ministry of Health \n",
"236 Ministry of Health \n",
"237 Ministry of Health \n",
"... ... \n",
"6965 National Emergency Crisis and Disaster Managem... \n",
"6966 National Emergency Crisis and Disaster Managem... \n",
"6967 National Emergency Crisis and Disaster Managem... \n",
"6968 National Emergency Crisis and Disaster Managem... \n",
"6969 National Emergency Crisis and Disaster Managem... \n",
"\n",
" source_website \n",
"46 https://shendetesia.gov.al/covid19-ministria-e... \n",
"234 https://www.facebook.com/investingforwellness/... \n",
"235 https://www.facebook.com/investingforwellness/... \n",
"236 https://www.facebook.com/investingforwellness/... \n",
"237 http://datos.salud.gob.ar/dataset/vacunas-cont... \n",
"... ... \n",
"6965 http://covid19.ncema.gov.ae/en \n",
"6966 http://covid19.ncema.gov.ae/en \n",
"6967 http://covid19.ncema.gov.ae/en \n",
"6968 http://covid19.ncema.gov.ae/en \n",
"6969 http://covid19.ncema.gov.ae/en \n",
"\n",
"[2367 rows x 15 columns]"
]
},
"execution_count": 112,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.dropna() # usunięcie wierszy z polami NaN"
]
}
],
"metadata": {
"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.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}