{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "colab": {}, "colab_type": "code", "id": "aUcSSVlSOGoA" }, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "from sklearn.linear_model import LinearRegression" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 289 }, "colab_type": "code", "id": "kDn9hp3dPX5G", "outputId": "10aaed77-f1b9-4735-89b9-0d2d614a9e98" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " Date TempHighF TempAvgF TempLowF DewPointHighF DewPointAvgF \\\n", "0 2013-12-21 74 60 45 67 49 \n", "1 2013-12-22 56 48 39 43 36 \n", "2 2013-12-23 58 45 32 31 27 \n", "3 2013-12-24 61 46 31 36 28 \n", "4 2013-12-25 58 50 41 44 40 \n", "\n", " DewPointLowF HumidityHighPercent HumidityAvgPercent HumidityLowPercent ... \\\n", "0 43 93 75 57 ... \n", "1 28 93 68 43 ... \n", "2 23 76 52 27 ... \n", "3 21 89 56 22 ... \n", "4 36 86 71 56 ... \n", "\n", " SeaLevelPressureAvgInches SeaLevelPressureLowInches VisibilityHighMiles \\\n", "0 29.68 29.59 10 \n", "1 30.13 29.87 10 \n", "2 30.49 30.41 10 \n", "3 30.45 30.3 10 \n", "4 30.33 30.27 10 \n", "\n", " VisibilityAvgMiles VisibilityLowMiles WindHighMPH WindAvgMPH WindGustMPH \\\n", "0 7 2 20 4 31 \n", "1 10 5 16 6 25 \n", "2 10 10 8 3 12 \n", "3 10 7 12 4 20 \n", "4 10 7 10 2 16 \n", "\n", " PrecipitationSumInches Events \n", "0 0.46 Rain , Thunderstorm \n", "1 0 \n", "2 0 \n", "3 0 \n", "4 T \n", "\n", "[5 rows x 21 columns]\n", " Date TempHighF TempAvgF TempLowF DewPointHighF DewPointAvgF \\\n", "1314 2017-07-27 103 89 75 71 67 \n", "1315 2017-07-28 105 91 76 71 64 \n", "1316 2017-07-29 107 92 77 72 64 \n", "1317 2017-07-30 106 93 79 70 68 \n", "1318 2017-07-31 99 88 77 66 61 \n", "\n", " DewPointLowF HumidityHighPercent HumidityAvgPercent HumidityLowPercent \\\n", "1314 61 82 54 25 \n", "1315 55 87 54 20 \n", "1316 55 82 51 19 \n", "1317 63 69 48 27 \n", "1318 54 64 43 22 \n", "\n", " ... SeaLevelPressureAvgInches SeaLevelPressureLowInches \\\n", "1314 ... 29.97 29.88 \n", "1315 ... 29.9 29.81 \n", "1316 ... 29.86 29.79 \n", "1317 ... 29.91 29.87 \n", "1318 ... 29.97 29.91 \n", "\n", " VisibilityHighMiles VisibilityAvgMiles VisibilityLowMiles WindHighMPH \\\n", "1314 10 10 10 12 \n", "1315 10 10 10 14 \n", "1316 10 10 10 12 \n", "1317 10 10 10 13 \n", "1318 10 10 10 12 \n", "\n", " WindAvgMPH WindGustMPH PrecipitationSumInches Events \n", "1314 5 21 0 \n", "1315 5 20 0 \n", "1316 4 17 0 \n", "1317 4 20 0 \n", "1318 4 20 0 \n", "\n", "[5 rows x 21 columns]\n" ] } ], "source": [ "#\n", "# load data and inspect\n", "#\n", "df = pd.read_csv('../Datasets/austin_weather.csv')\n", "#\n", "print(df.head())\n", "print(df.tail())" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "colab_type": "code", "id": "hBtKePSxQDOV", "outputId": "11e0290a-73f3-4587-8653-b75303f566ed" }, "outputs": [ { "data": { "text/html": [ "
\n", " | Date | \n", "TempAvgF | \n", "
---|---|---|
0 | \n", "2013-12-21 | \n", "60 | \n", "
1 | \n", "2013-12-22 | \n", "48 | \n", "
2 | \n", "2013-12-23 | \n", "45 | \n", "
3 | \n", "2013-12-24 | \n", "46 | \n", "
4 | \n", "2013-12-25 | \n", "50 | \n", "