AIM-PIbd-32-Nikiforova-M-V/lab_1/lab1.ipynb

174 lines
219 KiB
Plaintext
Raw Normal View History

2024-10-11 17:10:41 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Начало лабораторной\n",
"\n",
"Выгрузка данных из cvs файла в датафрейм"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['no', 'Country (or dependency)', 'Population 2020', 'Yearly Change',\n",
" 'Net Change', 'Density (P/Km²)', 'Land Area (Km²)', 'Migrants (net)',\n",
" 'Fert. Rate', 'Med. Age', 'Urban Pop %', 'World Share'],\n",
" dtype='object')\n"
]
}
],
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"df = pd.read_csv(\".//static//csv//world-population-by-country-2020.csv\")\n",
"print(df.columns)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Данная диаграмма отображает топ 10 стран с самым молодым населением, что позволяет сделать вывод о том, что в Африке плохо с медициной"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoYAAAJ8CAYAAABjg2AGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC6z0lEQVR4nOzdd3hT1RsH8G920qZN926BtpRNy57KHjJkyhZQ4KfgwIECihtRVJw4QcEtouICQUFRQfYepXvvlbZJs+/9/VGsFChdSU7G+3kenscmN/d+izR5e8497xHwPM+DEEIIIYS4PSHrAIQQQgghxDFQYUgIIYQQQgBQYUgIIYQQQi6jwpAQQgghhACgwpAQQgghhFxGhSEhhBBCCAFAhSEhhBBCCLmMCkNCCCGEEAKACkNC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VS3H333Xj66afrznfp0iUsXrwYx48fR3R0NN58802MGjUKO3bswOTJkwEA586dw/Lly3Ho0CF4eHhg2rRpePXVV6FUKlv2l+jieJ6H/tw5aA8ehPbwEehOnQJvNDb59VXDemJx/7M2TEjsKUYVg/5h/dE/tD/6hPSBp8STdSRCiI3RsjWC4cOHIz4+Ht999911p4o5jsOOHTtQUVEBqVTa4Hn27NmD0tJSPProo9d9/t+iMC8vD+PGjcPChQvxySef4NKlS1iyZAnkcnm9wu/jjz/GQw89hCNHjuDQoUNYuHAhBg0ahFGjRsFisWDy5MmIiorCkSNHUF1djYcffrje9bRaLcaMGYMBAwbg2LFjKC4uxuLFi3Hvvfdi69atzf57clWcTgf
"text/plain": [
"<Figure size 800x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"srez = df.sort_values(\"Med. Age\").head(10)\n",
"# Диаграмма цен:\n",
"plt.figure(figsize=(8, 8))\n",
"plt.pie(\n",
" srez[\"Med. Age\"],\n",
" labels=srez[\"Country (or dependency)\"],\n",
" autopct=\"%1.1f%%\",\n",
"\n",
")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Данная диаграмма отображает среднее количество детей, которое женщина рожает за свою жизнь, что позволяет сделать вывод о том, что в среднем человечетво умножает себя"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABYsAAAGJCAYAAADL8WwCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA6qUlEQVR4nO3deZhWdd0/8M/MAMOIzAgqCIjDooALioUVopELpohZPuaSG2j56wlTKzX5yU/A0lTsQUWxVAQf19JSyzA1BS3sUVBckgREXCFcAgRFtvn+/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OOipdeeql2m4kTJ9ZeTT1w4MDada1+/+pCzhsAgM3DlcUAAFu4hQsXxocffhgppXj//fdj1KhRsXjx4jj11FNrt0kpxde+9rWYMGFCnHXWWdGjR4949NFH48ILL4z33nsvRo4cGRUVFXH77bdH796945JLLon/+q//ioiIQYMGxcKFC2PcuHFRVlaWeX2rCsUdd9xxvdv86U9/iqOOOio6deoUw4YNiyVLlsSoUaOid+/e8cILL0SHDh3iuOOOixkzZsQ999wTI0eOrL3Sdeeddy5oHX379o3TTz89IiImT54c119//Xq33WmnnWLkyJG175922ml1Pv7Xv/41TjjhhNhvv/3iyiuvjKqqqvjwww/jBz/4QUFriYhYtGhRfPjhh3Uea9myZZSWlsaTTz4ZRx11VHz+85+PoUOHRmlpaYwdOzYOPfTQ+POf/7zW1bzf/OY3Y4899ogrrrgiUkqx//77x5w5c+Lxxx+PO+64o+A1FWpVQd+iRYvax95444148MEH45vf/GZ07Ngx5s2bF7/85S+jT58+MW3atGjbtm3sueeecdlll8Wll14aZ599dm3pfOCBB0ZEZD5vAAAaWAIAYIs0duzYFBFrvZWXl6dx48bV2fbBBx9MEZF++tOf1nn8+OOPTyUlJen111+vfWzw4MGptLQ0Pf300+m+++5LEZGuvfbaja5nwoQJKSLSbbfdlj744IM0Z86c9Ic//CF16NAhlZSUpMmTJ6eUUpo9e3aKiDR27NjafXv06JFatWqVPvroo9rHXnrppVRaWppOP/302sdGjBiRIiLNnj274Odp2bJlKSLSOeecU/vYqvOaMGHCWtufcsopqWPHjnUei4g0dOjQ2vcHDx6cIiLNnTu39rFV5zVixIgNrmfV87Sut9mzZ6eampq0xx57pK9+9auppqamdr9PP/00dezYMfXt27f2saFDh6aISCeffPJaOYMGDUr1/XZ+1fGnT5+ePvjgg/Tmm2+m2267LVVUVKSdd945ffLJJ7XbfvbZZ2nlypV19p89e3YqLy9Pl112We1jkydPXuvzn1LKdN4AAGweriwGANjC3XjjjdGlS5eIiJg3b17ceeed8e1vfzuaN28exx13XET864+dlZWVxbnnnltn3x/96Edx//33xyOPPBLnnHNORPzr1gYPP/xwnHHGGbF48eLo06fPWvttyJlnnlnn/Z133jluv/32OvdVXt3cuXPjxRdfjIsuuihatmxZ+/i+++4bffv2jfHjxxecvS6fffZZREQ0bdq0oO2XLVsW5eXlG9xm0aJFUVpaWq8/snfppZfWXlm7yi677BIvvvhizJw5M4YMGRIfffRRnY8fdthhcccdd0RNTU2Ulv7vHeO++93v5l5HIbp27Vrn/e7du8fYsWNju+22q31s9eds5cqVsWDBgth+++2ja9eu8cILL2w0I895AwDQsJTFAABbuC984Qt1itiTTz459t9//zjnnHOif//+0aRJk3jrrbeibdu20bx58zr77rnnnhER8dZbb9U+1qRJk7jtttvigAMOiKZNm8bYsWMz3e92VQlaVlYWO+20U+y5555r3T95dauy1ywkV63v0UcfrdcfbVt1q4eqqqqCtl9Vcm5Ir1694oYbbojzzjsvLrrooqiqqor58+dnWlf37t3j8MMPX+vxmTNnRkTEGWecsd59Fy5cWOcWEB07dsyUndVvfvObqKysjA8++CCuv/76mD17dlRUVNTZpqamJq677roYPXp0zJ49u879rTd0C5JV8pw3AAANS1kMALCVKS0tjUMOOSSuu+66mDlzZuy9996Zj/Hoo49GxL+uyp05c2amMnJ9Jejmsur+uh06dCho+3/84x9RXV29wW1OOumkeOGFF2LUqFFx880313OFddXU1ERExIgRI6JHjx7r3GbNMnvN4rbYvvzlL9feI/qYY46J7t27xymnnBLPP/987ZW+V1xxRfy///f/4swzz4yf/OQntfdfPv/882vPaUPynDcAAA1LWQwAsBVasWJFREQsXrw4IiKqq6vjT3/6UyxatKjO1cWvvfZa7cdXefnll+Oyyy6LgQMHxosvvhjf/va345VXXin4ytysVmVPnz59rY+99tprsdNOO9VeVZzlCudVpkyZEhGx3ttgrG758uXx+uuvx5FHHrnB7UpLS+Oaa66JV155JWbPnh2jR4+OefPm1fmjgnl17tw5IiIqKyvrVbrnea4Ksf3228fQoUNj4MCB8etf/zpOOumkiIi4//7745BDDokxY8bU2X7BggW1RfOG1lWs8wYAYNNxQzAAgK3M8uXL47HHHosmTZrU3maiX79+sXLlyrjhhhvqbDty5MgoKSmJo446qnbfAQMGRNu2beO6666LcePGxbx58+IHP/jBJltvmzZtokePHnH77bfHggULah//29/+Fo899lj069ev9rFVpfHq223M/fffH127do1u3bptdNuHHnoolixZEoceeuhGtx01alQ8+eSTcdddd8Xhhx8evXv3LnhNG/L5z38+OnfuHNdcc01t2b+6Dz74oKDjbOi5mjVrVsyaNSv3Gk855ZTYdddd46qrrqp9rKysLFJKdba777774r333itoXcU6bwAANh1XFgMAbOEeeeSR2iuE33///bj77rtj5syZcfH
"text/plain": [
"<Figure size 1800x400 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(18, 4))\n",
"srez = df.sort_values(\"Fert. Rate\")\n",
"sns.boxplot(x = srez[\"Fert. Rate\"])\n",
"plt.title('Box Plot для Fert. Rate')\n",
"plt.xlabel('Fert. Rate')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Данная диаграмма отображает население по странам, что позволяет сделать вывод о том, что среднестатистический человек - азиат"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABSAAAAK9CAYAAAA0SsICAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeZyN9fvH8feM2QzGPpaxTlF2SiTJkjUJlWJkpwWlRsTPnsgSUURaSCWVLK2WxhoSFRGyN76KFiEjY8x8fn/4zvnOcc6ZOeeYc89Nr+fjcR6cez73fV33Oefervtz33eQMcYIAAAAAAAAAAIgOKcTAAAAAAAAAHDtogAJAAAAAAAAIGAoQAIAAAAAAAAIGAqQAAAAAAAAAAKGAiQAAAAAAACAgKEACQAAA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AAABQwESAAAAAAAAQMBQgAQAAAAAAAAQMBQgAQAAAAAAAAQMBUgAAAAAAAAAAUMBEgAAAAAAAEDAUIAEAAAAAAAAEDAUIAEAAAAAAAAEDAVIAAAAAAAAAAFDARIAAAAAAABAwFCABAAAAAAAABAwFCABAAAAAAAABAwFSAAAAAAAAAABQwESAAAAAAAAQMBQgAQAAAAAAAAQMBQgAQAAAAAAAAQMBUgAAAAAAAAAAUMBEgAAAAAAAEDAUIAEAAAAAAAAEDAUIAEAAAAAAAAEDAVIAAAAAAAAAAFDARIAAAAAAABAwFCABAAAAAAAABAwFCABAAAAAAAABAwFSAAAAAAAAAABQwESAAAAAAAAQMBQgAQAAAAAAAAQMBQgAQAAAAAAAAQMBUgAAAAAAAAAAUM
"text/plain": [
"<Figure size 1600x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"srez = df\n",
"srez['Population 2020'] = srez['Population 2020'].replace({'$': '', ',': ''}, regex=True)\n",
"srez['Population 2020']=srez['Population 2020'].astype(float)\n",
"avg_price_by_manufacturer = srez.groupby('Country (or dependency)')['Population 2020'].mean().sort_values(ascending=False).head(100)\n",
"plt.figure(figsize=(16, 6))\n",
"avg_price_by_manufacturer.plot(kind='bar', color='salmon')\n",
"plt.xlabel('Страна')\n",
"plt.ylabel('Население')\n",
"plt.grid(True)\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "aimenv",
"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.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}