{ "cells": [ { "cell_type": "markdown", "id": "f74ee357", "metadata": {}, "source": [ "# Gráficos y Visualizaciones" ] }, { "cell_type": "markdown", "id": "ab18f3d5", "metadata": {}, "source": [ "## 1. Preparación de datos" ] }, { "cell_type": "markdown", "id": "a04ee435", "metadata": {}, "source": [ "### Importación de Librerías" ] }, { "cell_type": "code", "execution_count": 4, "id": "c5e6fe34", "metadata": {}, "outputs": [], "source": [ "# --- Importacion de librerias genéricas\n", "import numpy as np\n", "import pandas as pd\n", "import os\n", "# --- Específicas para los gráficos\n", "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "%matplotlib inline \n", "# --- Estilo de visualizacion de matplotlib\n", "mpl.style.use('bmh') \n", "# bmh es el nombre del estilo que usaremos\n", "#\n", "# El separador presentado abajo es multi OS.\n", "separador = os.path.sep" ] }, { "cell_type": "markdown", "id": "8a2bc9ed", "metadata": {}, "source": [ "### Adquisición del conjunto de datos" ] }, { "cell_type": "code", "execution_count": 6, "id": "0be3a8fa", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tamaño del df: (38, 12)\n", "primeros registros...\n" ] }, { "data": { "text/html": [ "
\n", " | Jan | \n", "Feb | \n", "Mar | \n", "Apr | \n", "May | \n", "Jun | \n", "Jul | \n", "Aug | \n", "Sep | \n", "Oct | \n", "Nov | \n", "Dec | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
Year | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
1965 | \n", "0.029 | \n", "0.069 | \n", "0.000 | \n", "21.667 | \n", "17.859 | \n", "102.111 | \n", "606.071 | \n", "402.521 | \n", "69.511 | \n", "5.249 | \n", "16.232 | \n", "22.075 | \n", "
1966 | \n", "0.905 | \n", "0.000 | \n", "0.000 | \n", "2.981 | \n", "63.008 | \n", "94.088 | \n", "481.942 | \n", "59.386 | \n", "150.624 | \n", "1.308 | \n", "41.214 | \n", "4.132 | \n", "
1967 | \n", "0.248 | \n", "3.390 | \n", "1.320 | \n", "13.482 | \n", "11.116 | \n", "251.314 | \n", "780.006 | \n", "181.069 | \n", "183.757 | \n", "50.404 | \n", "8.393 | \n", "37.685 | \n", "
1968 | \n", "0.318 | \n", "3.035 | \n", "1.704 | \n", "23.307 | \n", "7.441 | \n", "179.872 | \n", "379.354 | \n", "171.979 | \n", "219.884 | \n", "73.997 | \n", "23.326 | \n", "2.020 | \n", "
1969 | \n", "0.248 | \n", "2.524 | \n", "0.334 | \n", "4.569 | \n", "6.213 | \n", "393.682 | \n", "678.354 | \n", "397.335 | \n", "205.413 | \n", "24.014 | \n", "24.385 | \n", "1.951 | \n", "