AIM-PIbd-32-Gerimovich-I-M/lab_1/lab1.ipynb

135 lines
243 KiB
Plaintext
Raw Normal View History

2024-09-28 10:08:48 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## начало\n",
"\n",
"выгрузка данных из csv файла в датафрейм"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['id', 'date', 'price', 'bedrooms', 'bathrooms', 'sqft_living',\n",
" 'sqft_lot', 'floors', 'waterfront', 'view', 'condition', 'grade',\n",
" 'sqft_above', 'sqft_basement', 'yr_built', 'yr_renovated', 'zipcode',\n",
" 'lat', 'long', 'sqft_living15', 'sqft_lot15'],\n",
" dtype='object')\n"
]
}
],
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib\n",
"import matplotlib.ticker as ticker\n",
"\n",
"df = pd.read_csv(\".//static//csv//kc_house_data.csv\")\n",
"print(df.columns)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHKCAYAAAD/zGr0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABNDklEQVR4nO3deXhM598G8Hsmy2RPREiCyCJIYhdFUNEKsYdqqaVBFVVqSYuGElqEtohai6K1VGxFSy1NpbbYxVLElkhKErElRCXMPO8f3pyfMZPIRGTiuD/Xda4r85znnPOdM8nknucsoxBCCBARERHJhNLYBRAREREVJ4YbIiIikhWGGyIiIpIVhhsiIiKSFYYbIiIikhWGGyIiIpIVhhsiIiKSFYYbIiIikhWGGyIiIpIVhhsiIiKSFYab18Dly5cxaNAgeHl5wcLCAnZ2dmjatClmz56N//77z9jlERERFStTYxdAL9fWrVvx3nvvQaVSITQ0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VlbP3f758+dRrly55/YLCAjAkiVL8MMPP6BDhw5QqVS4f/9+kfu9qIsXL+LcuXP51v7sPvnxxx/x448/6vRzd3fXevz7779j8uTJiI+P1zp3x5A354yMDAghMGHCBCm4hoSE4N9//4Wjo+Nzl1+1ahX++ecfrF27FqtXr9bb5+7duwCg9xylZwUFBUk/Ozg4oEePHvj2229hbW0N4MlrNnfuXAwfPhyjR4+Gvb097ty589z1GiIjIwMPHjzQe86Gr68
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.groupby('bedrooms')['price'].mean().plot(kind='bar')\n",
"plt.title('Средняя цена жилья по количеству спален')\n",
"plt.xlabel('Количество спален')\n",
"plt.ylabel('Средняя цена')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAHHCAYAAACY6dMIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOy9d5wddb3///xMOXX7JptOeiP0UEMJSBGEi4rCFVFQVLhXrPxURC9iR7+AYkEFL2IXqYJeKdIEEQQCIYGQRnrP7mbrKVM+n98fn5k5c85uCgRJmxePQ/bMmfm0Obuf17zfr/f7LZRSigQJEiRIkCBBgj0Axq4eQIIECRIkSJAgwY4iIS4JEiRIkCBBgj0GCXFJkCBBggQJEuwxSIhLggQJEiRIkGCPQUJcEiRIkCBBggR7DBLikiBBggQJEiTYY5AQlwQJEiRIkCDBHoOEuCRIkCBBggQJ9hgkxCVBggQJEiRIsMcgIS4JEiRIkCBBgj0GCXHZTfDLX/4SIUT0ymQyTJkyhU984hNs3LhxVw8vQYIECRIk2C1g7eoBJKjG17/+dcaPH0+pVOIf//gHP/3pT/nrX//Kyy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x5Mz/60Y844YQTePHFF2lqahpwzSWXXMLxxx8PwN13380999xT9fmll17KL3/5Sz784Q/zqU99iuXLl/PjH/+YF198kaeeegrbtgddh9eDrq6uaG5xSCk5++yz+cc//sEll1zC9OnTmT9/Pt///vdZvHgxf/rTn3a67xCFQoHZs2ezdu1aLr30Uvbbbz/++c9/cuWVV7J+/XpuuOGGN62v14Mf/OAHnH322VxwwQU4jsNtt93Gueeey1/+8hfOPPPMrV6XSqW4++67Ofroo3n3u9/NI488QjqdHnDevffeyxVXXMENN9ww4DteiyuuuGK74/3+97/PkCFDAP19fCN45ZVXOPbYYxk1ahRf/OIXyefz3H777bzrXe/irrvu4t3vfvcbarcWPT09/O///i/nn38+H/vYx+jt7eWWW27h7W9/O88++yyHHHLI62rv6quv5pZbbuGPf/zjAMJWV1fH5ZdfTl1dHY8++ihf+cpX6Onp4dprr61qY8uWLbzjHe/gvPPO4/zzz+f222/nv//7v0mlUlx88cVMnz6d3/zmN9H5N998M6+++irf//73o2MHHXQQABs3buToo4+OiPLQoUO5//77+chHPkJPTw+f+cxnXveaJdhDoBLsFrj11lsVoB5++GG1efNmtXr1anXbbbep1tZWlc1m1Zo1a5RSSpVKJeX7ftW1y5cvV+l0Wn3961+Pjv3iF79QgPre9743oC8pZXQdoK699toB58yYMUPNnj07ev/YY48pQI0aNUr19PREx2+//XYFqB/84AdR25MnT1Zvf/vbo36UUqpQKKjx48erU089dUBfs2bNUgcccED0fvPmzQpQV199dXRsxYoVyjRN9a1vfavq2vnz5yvLsgYcX7JkiQLUr371q+jY1VdfreJf+SeffFIB6ne/+13VtQ888MCA42PHjlVnnnnmgLFfdtllqvbXqHbsX/jCF1RbW5uaOXNm1Zr+5je/UYZhqCeffLLq+p/97GcKUE899dSA/uKYPXu2mjFjxoDj1157rQLU8uXLo2Pf+MY3VD6fV4sXL64694tf/KIyTVOtWrVKKfX6vhNbA6Auu+yyAcfPPPNMNXbs2KpjhUKh6r3jOOqAAw5Qb3vb27bbj1JKLVq0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XR1dQEMIAu1bXZ3d9PW1jbo55s2bap6/9BDDzF06NBtjrMWV199NSNHjuTSSy8doN1YsmQJr7766lbbrO1/Z7BkyRLmzZu3w31
"text/plain": [
"<Figure size 640x480 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(df['long'], df['lat'], c=df['price'], cmap='viridis', alpha=0.5)\n",
"plt.colorbar(label='Цена')\n",
"plt.title('Распределение цен на жилье на карте')\n",
"plt.xlabel('Долгота')\n",
"plt.ylabel('Широта')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAHHCAYAAAARcURhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC4GElEQVR4nOydd5hU5fXHv9Nn22yv7NJBOggIItgJqBhrjDFqsMYoWCCJxsSImvyCGmsULNGAiRoVSSxIUETAAgrSu5QFFpbtvUy/vz/uvO/cO3Onz+yUPZ/n2Ydl5u6dd8q9c+453/M9KkEQBBAEQRAEQRBxQx3vBRAEQRAEQfR2KCAjCIIgCIKIMxSQEQRBEARBxBkKyAiCIAiCIOIMBWQEQRAEQRBxhgIygiAIgiCIOEMBGUEQBEEQRJyhgIwgCIIgCCLOUEBGEARBEAQRZyggIwiCIIgk4sUXX0RLSwv//3PPPYfOzs74LYiIChSQEXHl8OHDuOOOOzBw4EAYjUaYTCZMnToVzz//PLq7u+O9PIIgiITj448/xiOPPIKqqiq89dZb+OMf/4i0tLR4L4uIEBXNsiTixSeffIJrrrkGBoMBv/jFLzBq1ChYrVZ8/fXXWL58OW666Sa8+uqr8V4mQRBEQrF+/XpcdtllaGtrg1qtxtNPP4377rsv3ssiIoQCMiIuVFZWYsyYMSgvL8cXX3yB0tJS2f2HDh3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oqqqK6DG
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.groupby('yr_built')['price'].mean().plot(kind='line')\n",
"plt.title('Средняя цена жилья по годам постройки')\n",
"plt.xlabel('Год постройки')\n",
"plt.ylabel('Средняя цена')\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.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}