AIM-PIbd-31-Yakovlev-M-G/lab_1/lab_1.ipynb

199 lines
99 KiB
Plaintext
Raw Normal View History

2024-09-20 20:28:10 +04:00
{
"cells": [
{
"cell_type": "code",
2024-09-20 22:27:29 +04:00
"execution_count": 1,
2024-09-20 20:28:10 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-09-20 22:27:29 +04:00
" date price bedrooms bathrooms sqft_living \\\n",
"id \n",
"7129300520 20141013T000000 221900.0 3 1.00 1180 \n",
"6414100192 20141209T000000 538000.0 3 2.25 2570 \n",
"5631500400 20150225T000000 180000.0 2 1.00 770 \n",
"2487200875 20141209T000000 604000.0 4 3.00 1960 \n",
"1954400510 20150218T000000 510000.0 3 2.00 1680 \n",
"\n",
" sqft_lot floors view condition grade sqft_above \\\n",
"id \n",
"7129300520 5650 1.0 0 3 7 1180 \n",
"6414100192 7242 2.0 0 3 7 2170 \n",
"5631500400 10000 1.0 0 3 6 770 \n",
"2487200875 5000 1.0 0 5 7 1050 \n",
"1954400510 8080 1.0 0 3 8 1680 \n",
2024-09-20 20:28:10 +04:00
"\n",
2024-09-20 22:27:29 +04:00
" sqft_basement yr_built zipcode \n",
"id \n",
"7129300520 0 1955 98178 \n",
"6414100192 400 1951 98125 \n",
"5631500400 0 1933 98028 \n",
"2487200875 910 1965 98136 \n",
"1954400510 0 1987 98074 \n"
2024-09-20 20:28:10 +04:00
]
}
],
"source": [
"import pandas as pd\n",
"\n",
"df = pd.read_csv(\"../data/kc_house_data.csv\", index_col=\"id\")\n",
"\n",
"cleared_dff = df.drop([ \"yr_renovated\", \"waterfront\", \"sqft_living15\", \"sqft_lot15\", \"long\", \"lat\"], axis=1)\n",
"\n",
"print(cleared_dff.head())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2024-09-20 22:30:26 +04:00
"#### График 1 (Точечная диаграмма)\n",
2024-09-20 20:28:10 +04:00
"Отношение площади жилого пространства недвижимости на повышение цены"
]
},
{
"cell_type": "code",
2024-09-20 22:27:29 +04:00
"execution_count": 2,
2024-09-20 20:28:10 +04:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHACAYAAABeV0mSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABp2klEQVR4nO3deXQUZdo28KvSIQ0BkhAwCZAFZJUlEEQguABHZhhEFB0ZXOYVZ8Y5nw74qjgujDou82JUdkfGZfxGxs9BXF6C7IssohiRJQHZwk42EpZsJIROuru+P0J1ujtV1dVr9XL9zslRuqu7n6p0uu6+63nuWxBFUQQRERFRmIjSewBEREREvsTghoiIiMIKgxsiIiIKKwxuiIiIKKwwuCEiIqKwwuCGiIiIwgqDGyIiIgorDG6IiIgorDC4ISIiorDC4IaIiIjCSkQHNzt27MDkyZPRrVs3CIKAlStXuv0coihi3rx56Nu3L4xGI7p37445c+b4frBERESkSbTeA9BTfX09hgwZgt///ve49957PXqOJ598Eps2bcK8efMwePBgVFZWorKy0scjJSIiIq0ENs5sJggCcnNzMWXKFNttJpMJL774Ij777DNUV1dj0KBBeOuttzB27FgAwJEjR5CZmYmDBw+iX79++gyciIiIHET0ZSlXZs6ciby8PCxfvhwHDhzA1KlT8atf/QrHjx8HAKxevRrXX3891qxZg549e6JHjx549NFHmbkhIiLSEYMbBUVFRfj444/x5Zdf4tZbb0WvXr3w5z//Gbfccgs+/vhjAMCpU6dw9uxZfPnll/jkk0+wdOlS7N27F/fdd5/OoyciIopcET3nRs3PP/8Mi8WCvn37OtxuMpnQuXNnAIDVaoXJZMInn3xi2+7//t//ixtvvBGFhYW8VEVERKQDBjcK6urqYDAYsHfvXhgMBof7OnToAADo2rUroqOjHQKgG264AUBz5ofBDRERUeAxuFGQlZUFi8WC8+fP49Zbb5Xd5uabb4bZbMbJkyfRq1cvAMCxY8cA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iorDC4IaIiIjCCoMbIiIiCisMboiIiCisMLghIiKisMLghoiIiMIKgxsiIiIKKwxuiIiIKKwwuCEiIqKwwuCGiIiIwgqDGyIiIgorugY3OTk5uOmmm9CxY0ckJSVhypQpKCwsVH3M0qVLIQiCw0/btm0DNGIiIiIKdroGN99++y1mzJiBH3/8EZs3b0ZTUxN++ctfor6+XvVxcXFxOHfunO3n7NmzARoxERERBbtoPV98w4YNDv9eunQpkpKSsHfvXtx2222KjxMEASkpKf4eHhEREYWgoJpzU1NTAwBITExU3a6urg4ZGRlIS0vD3XffjUOHDiluazKZUFtb6/BDRERE4Stoghur1YqnnnoKN998MwYNGqS4Xb9+/fCvf/0LX3/9NT799FNYrVaMHj0aJSUlstvn5OQgPj7e9pOWluavXSAiIqIgIIiiKOo9CAB4/PHHsX79enz//fdITU3V/LimpibccMMNeOCBB/C3v/2t1f0mkwkmk8n279raWqSlpaGmpgZxcXE+GTsRERH5V21tLeLj4zWdv3WdcyOZOXMm1qxZgx07drgV2ABAmzZtkJWVhRMnTsjebzQaYTQafTFMIiIiCgG6XpYSRREzZ85Ebm4utm7dip49e7r9HBaLBT///DO6du3qhxESERFRqNE1czNjxgwsW7YMX3/9NTp27Ijy8nIAQHx8PNq1awcAePjhh9G9e3fk5OQAAF5//XWMGjUKvXv3RnV1NebOnYuzZ8/i0Ucf1W0/iIiIKHjoGty89957AICxY8c63P7xxx/jkUceAQAUFRUhKqolwVRVVYU//vGPKC8vR6dOnXD
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"data = df[[\"price\", \"sqft_living\"]].copy()\n",
"data = data[0:1000]\n",
"plt.scatter(data[\"sqft_living\"], data[\"price\"], marker=\"^\")\n",
"plt.xlabel(\"Жилплощадь\")\n",
"plt.ylabel(\"Цена\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"На графике выше приведена информация о первой тысяче домов. График отображает зависимость цен недвижимости от жилой площади, исходя из графика можно сделать вывод, что чем больше площадь тем выше цена."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2024-09-20 22:30:26 +04:00
"#### График 2 (Гистограмма)\n",
2024-09-20 20:28:10 +04:00
"Влияние количества этажей на продажу недвижимости"
]
},
{
"cell_type": "code",
2024-09-20 22:27:29 +04:00
"execution_count": 3,
2024-09-20 20:28:10 +04:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAGwCAYAAAC0HlECAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA19ElEQVR4nO3dfVxUZf7/8fegcuMNIBp3SUZLqZhpqatoYSpJeVOWm1lmZmRlaKKm6VaatUaxeZsmuW5iN67mmuZdGmrChqSGkkrqdmNhXwVtEUbxDuH8/mg9PyfUPUPADPZ6Ph7zWOe6rjnnc67H2QfvzrnmjM0wDEMAAAC4LA9XFwAAAFATEJoAAAAsIDQBAABYQGgCAACwgNAEAABgAaEJAADAAkITAACABbVdXcCVoqysTIcOHVKDBg1ks9lcXQ4AALDAMAwdP35coaGh8vC4/LUkQlMlOXTokMLCwlxdBgAAqICDBw+qSZMmlx1DaKokDRo0kPTLpPv6+rq4GgAAYIXdbldYWJj5d/xyCE2V5PwtOV9fX0ITAAA1jJWlNSwEBwAAsIDQBAAAYAGhCQAAwAJCEwAAgAWEJgAAAAsITQAAABYQmgAAACwgNAEAAFhAaAIAALCA0AQAAGABoQkAAMACQhMAAIAFhCYAAAALCE0AAAAWEJoAAAAsqO3qAmDRIpurK3DeQ4arKwAAoNJwpQkAAMACQhMAAIAFhCYAAAALCE0AAAAWEJoAAAAsIDQBAABYQGgCAACwgNAEAABgAaEJAADAAkITAACABYQmAAAACwhNAAAAFhCaAAAALCA0AQAAWEBo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2qbdu2KSMjQ8OHD9eAAQMUGhoqSXrooYfk6empuLg45eTkaMmSJZo5c6ZGjx5t1jFy5EitW7dOU6dO1b59+/TSSy/pyy+/1PDhw6t7SgAAgJty6SMHNm/erK5du5ZrHzx4sFJSUmQYhiZNmqR58+apsLBQt956q9566y3dcMMN5tiCggINHz5cq1atkoeHh/r166dZs2apfv365phdu3YpPj5e27dvV+PGjTVixAg999xzDvtcunSpXnjhBf3www+6/vrrlZSUpJ49e1o+Fme+slghPHIAAIBK58zfb7d5TlNNR2i6CEITAMDNXRHPaQIAAHAnhCYAAAALCE0AAAAWEJoAAAAsIDQBAABYQGgCAACwgNAEAABgAaEJAADAAkITAACABYQmAAAACwhNAAAAFhCaAAAALCA0AQAAWEBoAgAAsIDQBAAAYAGhCQAAwAJCEwAAgAWEJgAAAAsITQAAABYQmgAAACwgNAEAAFhAaAIAALCA0AQAAGABoQkAAMACQhMAAIAFhCYAAAALCE0AAAAWEJoAAAAsIDQBAABYQGgCAACwgNAEAABgAaEJAADAAkITAACABYQmAAAACwhNAAAAFhCaAAAALCA0AQAAWEBoAgAAsIDQBAAAYAGhCQAAwAJCEwAAgAWEJgAAAAsITQAAABYQmgAAACwgNAEAAFhAaAIAALCA0AQAAGABoQkAAMACQhMAAIAFhCYAAAALaru6AAC/Q4tsrq7AeQ8Zrq4AgItxpQkAAMACQhMAAIAFhCYAAAAL3Do0lZaW6sUXX1R4eLh8fHz0hz/8Qa+88ooM4/+vLTAMQxMnTlRISIh8fHwUExOjb775xmE7BQUFGjhwoHx9feXv76+4uDidOHHCYcyuXbt02223ydvbW2FhYUpKSqqWYwQAADWDW4em119/XXPnztXs2bO1d+9evf7660pKStKbb75pjklKStKsWbOUnJysrVu3ql69eoqNjdXp06fNMQMHDlROTo5SU1O1evVqpaen64knnjD77Xa7evTooaZNmyorK0t//etf9dJLL2nevHnVerwAAMB92YwLL9u4md69eysoKEh///vfzbZ+/frJx8dH77//vgzDUGhoqMaMGaNnn31WklRUVKSgoCClpKRowIAB2rt3ryIjI7V9+3a1a9dOkrRu3Tr17NlTP/30k0JDQzV37lw9//zzysvLk6enpyRp/PjxWrFihfbt22epVrvdLj8/PxUVFcnX17eSZ0J82whXFs5nAG7Cmb/fbn2lqVOnTtq4caP+/e9/S5K++uorff7557rrrrskSQcOHFBeXp5iYmLMz/j5+alDhw7KzMyUJGVmZsrf398MTJIUExMjDw8Pbd261RwTHR1tBiZJio2N1f79+3Xs2LGL1nbmzBnZ7XaHFwAAuHK59XOaxo8fL7vdrubNm6tWrVoqLS3VlClTNHDgQElSXl6eJCkoKMjhc0FBQWZfXl6eAgMDHfpr166tgIAAhzHh4eHltnG+r2HDhuVqS0xM1OTJkyvhKAEAQE3g1leaPvzwQ33wwQdatGiRduzYoYULF+qNN97QwoULXV2aJkyYoKKiIvN18OBBV5cEAACqkFtfaRo7dqzGjx+vAQMGSJJatWqlH3/8UYmJiRo8eLCCg4MlSfn5+QoJCTE/l5+frzZt2kiSgoODdeTIEYftnjt3TgUFBebng4ODlZ+f7zDm/PvzY37Ny8tLXl5ev/0gAQBAjeDWV5pOnjwpDw/HEmvVqqWysjJJUnh4uIKDg7Vx40az3263a+vWrYqKipIkRUVFqbCwUFlZWeaYTZs2qaysTB06dDDHpKenq6SkxByTmpqqZs2aXfTWHAAA+P1x69DUp08fTZkyRWvWrNEPP/yg5cuXa9q0abr33nslSTabTQkJCfrLX/6ilStXavfu3XrkkUcUGhqqvn37SpJatGihO++8U0OHDtW2bduUkZGh4cOHa8CAAQoNDZUkPfTQQ/L09FRcXJxycnK0ZMkSzZw5U6NHj3bVoQMAADfj1rfn3nzzTb344ot6+umndeTIEYWGhurJJ5/UxIkTzTHjxo1TcXGxnnjiCRUWFurWW2/VunXr5O3tbY754IMPNHz4cHXv3l0eHh7q16+fZs2aZfb7+fnp008/VXx8vNq2bavGjRt
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = df[\"floors\"]\n",
"plt.hist(data, color=\"orange\")\n",
"plt.xlabel('Кол-во этажей')\n",
"plt.ylabel('Частота покупки')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Данная диаграмма отображает частоту продаж домой, в зависимости от этажей, исходя из диаграммы можно сделать вывод, что одноэтажные дома покупают чаще чем другие, на втором месте по продажам двухэтажные"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2024-09-20 22:30:26 +04:00
"#### График 3 (Круговая диаграмма)\n",
2024-09-20 22:27:29 +04:00
"Круговая диограмма количества спален"
2024-09-20 20:28:10 +04:00
]
},
{
"cell_type": "code",
2024-09-20 22:27:29 +04:00
"execution_count": 43,
2024-09-20 20:28:10 +04:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2024-09-20 22:27:29 +04:00
"Text(0, 0.5, '')"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApEAAAK0CAYAAABbSmZOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB1j0lEQVR4nO3dd5iU5d328XP6bGV36VV6kyIgKBZwVxQVUdFEY1Qs0cSWWJInMY9i1NgeNSa+Yq/EWGMSYu8VQaT3ztJhC7C9TXv/ABZRWHZ2Z/aa+57v5zg8kNnZ2XNQ4Nzrvq/f5YhEIhEBAAAAUXCaDgAAAADroUQCAAAgapRIAAAARI0SCQAAgKhRIgEAABA1SiQAAACiRokEAABA1CiRAAAAiBolEgAAAFGjRAIAACBqlEgAiNJjjz2m7t27y+/365hjjtF3333X4PP/9re/qV+/fkpJSVHXrl110003qaampv7jL7/8srp27ars7GzdfPPNB3zuhg0b1LdvX5WVlcXlvQBAU1EiASAKr7/+um6++Wb96U9/0vz58zV06FCNHz9ehYWFB33+K6+8oltuu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MMPKy0tTZKUkpKiF198Udddd51qa2s1depUde7cueXeLAA0wBE52PUUAAAAoAHcEwkAAICoUSIBAAAQNUokAAAAokaJBAAAQNQokQAAAIgaJRIAAABRo0QCAAAgapRIAAAARI0SCQAAgKhRIgEAABA1SiQAAACiRokEAABA1CiRAAAAiBolEgAAAFGjRAIAACBqlEgAMOCrr77SxIkT1alTJzkcDk2fPv2wn/PFF19o+PDh8vl86t27t1588cUDPv7yyy+ra9euys7O1s0333zAxzZs2KC+ffuqrKwshu8CQDKjRAKAAZWVlRo6dKgee+yxRj0/Pz9fEyZMUG5urhYuXKgbb7xRV155pT788ENJUnFxsa688ko99NBD+uijj/SPf/xD77zzTv3nX3vttbr//vuVmZkZl/cDIPm4TQcAgGR0+umn6/TTT2/085988kn16NFDf/nLXyRJAwYM0IwZM/TXv/5V48eP1/r169WqVStdcMEFkqTc3FytWLFCZ555pl599VV5PB6de+65cXkvAJITK5EAYAGzZs3SuHHjDnhs/PjxmjVrliSpT58+qqqq0oIFC7Rr1y7NmTNHQ4YM0e7duzVlyhRNnTrVRGwANkaJBAAL2LFjh9q3b3/AY+3bt1dZWZmqq6uVnZ2tadOmafLkyRo1apQmT56s8ePH63e/+52uv/565efna9iwYRo0aJDefPNNQ+8CgJ1wORsAbGLSpEmaNGlS/c+//PJLLV68WI8++qh69+6tV199VR06dNCoUaM0ZswYtWvXzmBaAFbHSiQAWECHDh1UUFBwwGMFBQXKzMxUSkrKj55fW1ura6+9Vk899ZTWrl2rYDCosWPHql+/furbt69mz57dUtEB2BQlEgAsYPTo0fr0008PeOzjjz/W6NGjD/r8u+++W6eddpqGDx+uUCikYDBY/7FAIKBQKBTXvADsj8vZAGBARUWF1q5dW//z/Px8LVy4UDk5OerWrZv++Mc/auvWrfr73/8uSbr66qs1depU/f73v9cVV1yhzz77TG+88YbefffdH7328uXL9frrr2vBggWSpP79+8vpdOq5555Thw4dtHLlSo0cObJl3igA26JEAoABc+fOVW5ubv3P9w0Hv/TSS/Xiiy9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qt19dVX1/982rRpysjI0OjRo9WvXz/NmTNHW7Zs0c9+9jPl5+fL5/PF/L0AVkWJBABDuJTdNBs3btQnn3yif//734d8zrp167RhwwZNnDix/rFwOCxJcrvdWrVqlXr
"text/plain": [
"<Figure size 800x800 with 1 Axes>"
2024-09-20 20:28:10 +04:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2024-09-20 22:27:29 +04:00
"explode = (0,0,0,0,0.1,0.2)\n",
"plt.figure(figsize=(8, 8))\n",
"df[\"bedrooms\"][0:500].value_counts().plot.pie(autopct='%1.1f%%', startangle=90, pctdistance=1.25, labeldistance=.8, explode=explode)\n",
"plt.ylabel('')"
2024-09-20 20:28:10 +04:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2024-09-20 22:27:29 +04:00
"Данная диаграмма отображает количество спален в доме, исходя из графика можно сделать вывод, какое количество спален самое популярное среди покупателей"
2024-09-20 20:28:10 +04:00
]
}
],
"metadata": {
"kernelspec": {
"display_name": "kernel",
"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.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}