AIM-PIbd-31-Alekseev-I-S/Lab_1/Lab1.ipynb

199 lines
116 KiB
Plaintext
Raw Permalink Normal View History

2024-09-28 12:28:22 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Начало лабораторной\n",
"\n",
"Выгрузка данных из csv-файла в датафрейм"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['id', 'name', 'est_diameter_min', 'est_diameter_max',\n",
" 'relative_velocity', 'miss_distance', 'orbiting_body', 'sentry_object',\n",
" 'absolute_magnitude', 'hazardous'],\n",
" dtype='object')\n"
]
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\".//static//csv//neo.csv\")\n",
"print(df.columns)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Группированная столбчатая диаграмма: опасные и неопасные объекты\n",
"\n",
"Это столбчатая диаграмма, показывающая распределение объектов, классифицированных как \"опасные\" (hazardous=True) и \"неопасные\" (hazardous=False).\n",
"Исходя из нее, мы можем увидеть долю потенциально опасных объектов среди всех ближайших к Земле объектов\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmwAAAHHCAYAAAACpgSVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABebElEQVR4nO3dd1hTZ/8G8DsgS4QgyFREBBVQXGgVcVaGirW0tlardRTFWlARJ6+7DqrWFrf117paW62zVisWJw6KiOJERMU6wYEQQZk5vz98c15ighIMEuv9ua5cFznnyXO+J+Pk5ownEkEQBBARERGRztKr6gKIiIiI6MUY2IiIiIh0HAMbERERkY5jYCMiIiLScQxsRERERDqOgY2IiIhIxzGwEREREek4BjYiIiIiHcfARkREWpGdnY0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fffhMACIsWLRL7btCggRAQECAuRxAE4cmTJ4Kzs7Pg5+ensqx27doJTZo0Ee/fv39fACBMnz5dnHb9+nVBX19fmDNnjtJjz507J1SrVk1lelpamgBAWLdunTht+vTpQum3zpEjRwQAwoYNG5QeGxMTozLdyclJCAwMVKk9NDRUeP7t+HztEyZMEGxsbAQvLy+l5/Snn34S9PT0hCNHjig9fuXKlQIA4dixYyrLUygsLBRsbGyEJk2aCE+fPhWn79q1SwAgTJs2TZw2aNAgwdTUVKWPzZs3CwCEgwcPitOePHmi0i4qKkqQSCTCP//8I07r2LGjYGZmpjRNEASl11zxfN+
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import pandas as pd\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Загрузка данных\n",
"df = pd.read_csv(\".//static//csv//neo.csv\")\n",
"\n",
"# Отбор первых 15000 записей\n",
"df_subset = df.head(15000)\n",
"\n",
"# Создаем группированную столбчатую диаграмму для опасных и неопасных объектов\n",
"sns.countplot(x='hazardous', data=df_subset)\n",
"\n",
"# Настройка подписей и заголовков\n",
"plt.title('Распределение опасных и неопасных объектов (первые 15000)')\n",
"plt.xlabel('Опасный объект')\n",
"plt.ylabel('Количество объектов')\n",
"\n",
"# Отображение диаграммы\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Коробчатая диаграмма: Сравнение скорости и дистанции (relative_velocity, miss_distance)\n",
"\n",
"Это диаграмма, показывающая медиану, квартилы и выбросы для относительной скорости и минимального расстояния до Земли. Использование relative_velocity и miss_distance в одной диаграмме покажет, как сильно варьируются данные, и выделит потенциальные \"быстрые\" объекты, которые проходят близко к Земле."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA8kAAAIfCAYAAABD3J4fAAAAOXRFWHRTb2Z0d2FyZQBNY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z549NXv2bD377LMqV66cMwstW7ZMdevWdfa3efNmNW7cWBUrVtS4ceP0119/6e2331ZMTIzbCUZPx4nLateu7fyTpPLly6tv375u/fXq1UsvvviiZs2apd69e3v+AcYLUVFRRpLZsGGDS/dTp06Z7Nmzmy5dungzuhtGkhk+fLjXw3399ddGklm2bNl1ff7YsWONJPPss8+alJQUt/c//fRTs379+uv6DADp27Nnj1m3bp1JSEjwdSkAgBskKSkpze4bN240ksyIESNuckU33pw5c4wks2fPHl+XcluIj483J0+eNMZc/Ti/QYMGpnLlylcd5/r1640kM3bsWGe38+fPmzJlypjatWu79NuyZUsTGhpq4uLinN0+/vhjI8ksWLDgmsYJV9u3bzcbN240iYmJ6fbTunVrU69ePa/GmynXJOfJk0dBQUHKls31xPTZs2c1ZMgQhYeHy26364477tDbb78tY4wk6fz586pQoYIqVKig8+fPO4c7deqUQkNDVadOHSUnJ0u6/OtKrly59Oeff6p58+bKmTOnwsLCNGrUKOf4MvLbb7+pZcuWCgkJUa5cudS4cWOtW7fO+X50dLQ6duwoSWrUqJGziYXjLFRcXJx27dqluLi4DD/n/PnzioyMVIUKFfT222/LZrO59fP444/r3nvvdX6uzWbTihUr1L9/f+XPn18hISHq3r27/vnnH5fhvvvuO7Vq1UphYWGy2+0qU6aMXnvtNec8ckjdXKRAgQJq1aqVtm3b5tKfzWbT008/7VZf69at3c6kp6SkaPz48apcubICAwNVuHBh9e/f363GkiVLptma4Omnn3abF2ldOz527FjZbDY1bNjQpXtiYqKGDx+usmXLym63Kzw8XM8//7wSExPdPistX3/9tWrWrKmgoCAVKFBA3bp106FDh5zv9+zZM80mNlf+OZrhezONly5d0muvvaYyZcrIbrerZMmSeumll9Kse968eWrQoIGCg4MVEhKie+65R7NmzXK+37BhQ7f5smHDBmd9DlebjivH4c18Tetyi9Tjc/SzcePGNL8HB8f6nNrs2bPTbAp1te/PMU7HclumTBnVqlVLp06dUlBQkMv3l5Fdu3apU6dOKliwoIKCgnTHHXfo5Zdfdr4/YsQI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pVq5bq16+vgQMHauLEiXrppZdUsWJFSXL+O3fuXPXq1UtRUVFuC8OVHF/As88+61UzmKefflp58uTRiBEjtHv3bk2aNEn79+93blCkywfUuXLl0uDBg5UrVy4tXbpUw4YNU3x8vMaOHesyvgoVKujll1+WMUZ79+7VuHHj9OCDD+rAgQMe13Sl/v37Kzo6Wr169dLAgQMVGxur999/X7/99ptWr16d7o7KG6dPn3Zr4iJdXqnatGmjVatWqV+/fqpYsaK2bt2qd999V3/88YfLRftpcdR9zz33KDIyUseOHdOECRO0evVq/fbbb8qTJ4/69+/vchD3+OOPq3379urQoYOzW8GCBb2epieeeELTp0/XI488oiFDhmj9+vWKjIzUzp07NXfuXJcae/furcqVKysiIkJ58uTRb7/9pvnz56tLly7pjv+FF15w6zZjxgzn/1euXKkpU6bo3XffVYECBSRJhQsXlnTt8/XKcY0ZM8breeItT76/9AwbNszja1B+//131atXT9mzZ1e/fv1UsmRJ7d27V//73//Snc4tW7aoXbt2evDBB/XBBx84u3uyzbmSJ+v/iBEjNHLkSDVp0kRPPvmks78NGza4rIOLFi1S69a
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Импорт библиотек\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Загрузка данных\n",
"df = pd.read_csv(\".//static//csv//neo.csv\")\n",
"\n",
"# Отбор первых 15000 записей\n",
"df_subset = df[['relative_velocity', 'miss_distance']].head(15000)\n",
"\n",
"# Создание боксплота для сравнения relative_velocity и miss_distance\n",
"plt.figure(figsize=(10, 6))\n",
"sns.boxplot(data=df_subset)\n",
"plt.title(\"Boxplot: Сравнение относительной скорости и минимального расстояния до Земли (первые 15000 записей)\")\n",
"plt.ylabel(\"Значение\")\n",
"plt.xticks([0, 1], ['Relative Velocity', 'Miss Distance'])\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Точечная диаграмма: Взаимосвязь между абсолютной магнитудой и минимальным диаметром (absolute_magnitude vs. est_diameter_min)\n",
"\n",
"Это диаграмма, показывающая взаимосвязь между абсолютной магнитудой объектов (которая часто связана с их яркостью) и их минимальными размерами.\n",
"С помощью нее можно сделать вывод, что большинство объектов — это небольшие тела с относительно высокой абсолютной магнитудой (менее яркие), но встречаются и исключения — более крупные объекты с малой абсолютной магнитудой (яркие)."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0kAAAIjCAYAAADWYVDIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACEUElEQVR4nOzdd3xT9f7H8Xe60r1bSqVAocheggMZgqCAioCoVxxM9bJUBBcqslRQ770O3MrwKiiiDMfPgcoWBwiyuRRR9mihezfn90dJTJqOBFpS4PV8PPKAnJXPSU6SvnO+5/s1GYZhCAAAAAAgSfLydAEAAAAAUJMQkgAAAADADiEJAAAAAOwQkgAAAADADiEJAAAAAOwQkgAAAADADiEJAAAAAOwQkgAAAADAjo+nCwCAs62goEAnTpyQxWJRfHy8p8sBAAA1DGeSAFwQ1q9fr9tvv13R0dEym82qXbu2BgwY4OmyzmnPPvusLBaLJMlisWj69Okergiu+OKLL7Rp0ybb/SVLlmjbtm2eKwgAaiBC0gVi7ty5MplMDrfY2Fh169ZNX331lafLA6rV0qVL1alTJ23fvl3PPPOMli1bpmXLlumtt97ydGnntPfee0//+te/dODAAf373//We++95+mS4IItW7bogQce0O7du/XTTz9pxIgRyszM9HRZAFCjmAzDMDxdBKrf3LlzNXToUE2dOlWJiYkyDENHjx7V3LlztW3bNn3++ee64YYbPF0mUOVOnDihxo0b68orr9TChQvl5+fn6ZLOGwsWLNCgQYNUUFAgs9msDz74QDfffLOny0Iljh8/riuvvFLJycmSp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qywTSv9eSZJv/76a7nvT3dqdvWzyb7u8o6ZyvatNHePbfu6SyvruT+d753yuPI9If393WwvKytLcXFxTq+ru58Tbdq0capr+vTpMplMZT7fH3zwge3vjcjISN12223av3+/bX7Xrl0r/Sywsj7/8+bNU+PGjeXv76927dpp1apVTo/rzueyu39DoXz0bneBSU9PV0pKigzD0LFjxzRz5kxlZWXpzjvvtC2TnZ2tOnXqqE+fPgoNDdXWrVv12muv6eDBg/r8888lSRkZGXr33Xc1cOBA3XPPPcrMzNSsWbPUs2dP/fLLL2V+8FglJyc7/MFXmre3tz744AM9+OCDtmlz5syRv7+/8vLyHJa1niG79NJLNX36dB09elQvv/yy1q5dq40bNyo8PFyStHnzZnXu3Fm+vr669957Vb9+fe3Zs0eff/65nnnmGYdtvv/++5JK/oh8/fXXdcstt2jr1q1q3LixpJImRqNGjVLXrl113333KSgoSDt27NCzzz7rsJ2CggLdeeedqlOnjk6cOKG33npLvXr10o4dO1S3bt1y998d/v7+mjdvnl544QX5+vpKkg4cOKDvv/9e/v7+DstaLBbdeOONWrNmje699141bdpUW7Zs0Ysvvqj//e9/tjBYr149LV26VF27dtUjjzyif/3rX2U+9sMPP6xly5ZpxYoVqlevXpnL3H///br00kslSf/973+1bNky27yuXbsqISFB8+bNU//+/R3Wmzdvnho2bKgOHTqUu+9//PGHlixZoltuuUWJiYk6evSo3nrrLV111VXavn27rde61NRUrVmzRmvWrNGwYcPUrl07ff/995owYYL+/PNPvfnmm7ZtTpkyRZMnT9aVV16pqVOnys/PTz///LN++OEHXXvttZJKvrCnTJmiHj16aOTIkdq1a5feeOMN/frrr1q7dq3tdbB37733qnPnzpKkRYsWlflHslVBQYF69OihnTt3auTIkWrcuLGWLFmie++9V6mpqXrssccUExNjO07tt2k/rWHDhuU+Rnm2bdumzp07KzQ0VI888oh8fX311ltvqWvXrlq5cqUuv/zyctd9//33tWXLFrcez533+sKFC5WTk6ORI0cqKipKv/zyi2bOnKkDBw5o4cKFDsuazWa9++67DtNCQkLcqq08aWlpTh1UNG3a1OG5f/vtt7Vjxw69+OKLtmmtWrVSy5YtT+uYb9OmjcaPHy9J2rt3r5566imH+YZh6MYbb9Ty5cs1fPhwtWnTRt98840efvhhHTx40KEOV/bHHaezvr+/v+bMmePwh/aPP/7o9GNLeU7nWHPFo48+Wu48d2p29bPJXnR0tMPrdNddd53ZzlQjd753XFHR90R5/v3vf+vo0aNO0935nPDx8dG2bdu0ceNGtW3b1jZ97ty5Ze7HM888o4kTJ+rWW2/V3XffrePHj2vmzJnq0qWL7e+NJ554Qnfffbekkr8hHnzwQYfP/9JWrlypBQsW6P7775fZbNbrr7+uXr166ZdfflGLFi0kuf+57M7nKiph4IIwZ84cQ5LTzWw2G3Pnzq10/VGjRhnBwcG2+0VFRUZ+fr7DMidPnjRq1aplDBs2zDZt7969hiRjzpw5tmm33nqr0aJFCyMhIcEYPHiwU40DBw40WrZsaZuenZ1thIaGGrfffrshyfj1118NwzCMgoICIzY21mjRooWRm5trW/6LL74wJBlPPfWUbVqXLl2MkJAQ46+//nKo2WKx2P4/adIko/Rb4ttvvzUkGR9//LFt2sCBA43w8HCHx1y+fLkhyVi4cGHZT6BhGL/88oshyfjkk09s0+rVq2dcf/315a5TkXr16hnXXHONER0d7bDNadOmGVdeeaXTtt9//33Dy8vLWL16tcN23nzzTUOSsXbtWofpCxYsMEwmk/Huu+8ahmEYV111lXHVVVcZhmEY77zzjmEymRyeF3vW582+rtGjRzs9vxMmTDDMZrORlpZmm3bs2DHDx8fHmDRpUoX7n5eXZxQXFztM27t3r2E2m42pU6fapl111VWGJGPy5MkOyw4ZMsSQZGzZssUwDMPYvXu34eXlZfTv399pu9bj5NixY4afn59x7bXXOizz6quvGpKM2bN
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import pandas as pd\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt \n",
"\n",
"# Загрузка данных\n",
"df = pd.read_csv(\".//static//csv//neo.csv\")\n",
"\n",
"# Создаем точечную диаграмму для взаимосвязи абсолютной магнитуды и минимального диаметра\n",
"plt.figure(figsize=(10, 6))\n",
"sns.scatterplot(x='absolute_magnitude', y='est_diameter_min', data=df)\n",
"\n",
"# Настройка подписей и заголовков\n",
"plt.title('Взаимосвязь между абсолютной магнитудой и минимальным диаметром')\n",
"plt.xlabel('Абсолютная магнитуда')\n",
"plt.ylabel('Минимальный диаметр (км)')\n",
"\n",
"# Отображение диаграммы\n",
"plt.show()\n"
]
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}