commit 917bf25c20bb6179ee3ab7ac9ec5fa8f5018d6b9 Author: gmarx Date: Tue Mar 24 23:01:10 2020 -0600 initial commit diff --git a/covid-model.ipynb b/covid-model.ipynb new file mode 100644 index 0000000..5a3279f --- /dev/null +++ b/covid-model.ipynb @@ -0,0 +1,955 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 150, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
DateRepDayMonthYearCasesDeathsCountries and territoriesGeoId
024/03/2020243202061AfghanistanAF
123/03/20202332020100AfghanistanAF
222/03/2020223202000AfghanistanAF
321/03/2020213202020AfghanistanAF
420/03/2020203202000AfghanistanAF
...........................
654619/03/2020193202020ZambiaZM
654724/03/2020243202001ZimbabweZW
654823/03/2020233202000ZimbabweZW
654922/03/2020223202010ZimbabweZW
655021/03/2020213202010ZimbabweZW
\n", + "

6551 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + " DateRep Day Month Year Cases Deaths Countries and territories \\\n", + "0 24/03/2020 24 3 2020 6 1 Afghanistan \n", + "1 23/03/2020 23 3 2020 10 0 Afghanistan \n", + "2 22/03/2020 22 3 2020 0 0 Afghanistan \n", + "3 21/03/2020 21 3 2020 2 0 Afghanistan \n", + "4 20/03/2020 20 3 2020 0 0 Afghanistan \n", + "... ... ... ... ... ... ... ... \n", + "6546 19/03/2020 19 3 2020 2 0 Zambia \n", + "6547 24/03/2020 24 3 2020 0 1 Zimbabwe \n", + "6548 23/03/2020 23 3 2020 0 0 Zimbabwe \n", + "6549 22/03/2020 22 3 2020 1 0 Zimbabwe \n", + "6550 21/03/2020 21 3 2020 1 0 Zimbabwe \n", + "\n", + " GeoId \n", + "0 AF \n", + "1 AF \n", + "2 AF \n", + "3 AF \n", + "4 AF \n", + "... ... \n", + "6546 ZM \n", + "6547 ZW \n", + "6548 ZW \n", + "6549 ZW \n", + "6550 ZW \n", + "\n", + "[6551 rows x 8 columns]" + ] + }, + "execution_count": 150, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Reading data\n", + "import pandas as pd\n", + "covid_data = pd.read_csv('https://worldhealthorg-my.sharepoint.com/personal/garnicacarrenoj_who_int/_layouts/15/Doc.aspx?sourcedoc=%7B87BD9C0A-2E91-4BE3-8308-B0B545B6DFB6%7D&file=CSV%20as%20at%2024%20March%202020-Daily%20additions.csv&action=default&mobileredirect=true&CT=1585104198257&OR=ItemsView')\n", + "covid_data" + ] + }, + { + "cell_type": "code", + "execution_count": 151, + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split \n", + "train_set, test_set=train_test_split(covid_data,test_size=0.2,random_state=42)\n", + "train_cp=train_set.copy()" + ] + }, + { + "cell_type": "code", + "execution_count": 152, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[,\n", + " ],\n", + " [,\n", + " ],\n", + " [,\n", + " ]],\n", + " dtype=object)" + ] + }, + "execution_count": 152, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEVCAYAAAAM3jVmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3dfZhcZX3/8fenCAHDs9EVA5JYgzZKjRABL1BjUQhgDfRnbayFgPiLVtBasTVIL/UHpY0PaH1AJEoqKBrSKiWFCATMVr2UhwQjIUZkgaWwhgQIBAIqBr6/P+57wmGZ2Z3ZnZ2HPZ/Xdc21Z+5zzsz3nLnnu2fuc5/7KCIwM7Ny+KN2B2BmZq3jpG9mViJO+mZmJeKkb2ZWIk76ZmYl4qRvZlYiTvpmZiXipN8BJP21pFWStkraIOkHko5od1xmrSSpX9JvJT0m6RFJP5X0fknOU03kndlmkj4C/BvwL0AP8FLgq8CcdsZl1iZ/HhG7AfsDC4GPARe1N6TxxUm/jSTtAZwNnBYR34+IxyPiDxHx3xHxD5IOkfSzfNSzQdJXJO2U15WkL0jaJOlRSWslvTrPmyDpc5L+V9JGSV+TtEueN0nSlfk1N0v6sY+krNNExJaIWAb8FTBP0qslHSfp57m+3yvpU5XlJV0l6YPF15B0q6QTWhx6x/OXvb1eD+wMXF5j/lPA3wOT8rJHAh/I844C3ggcAOwBvBN4KM9bmMtnAC8HJgOfyPPOAO4DXkj6ZfFxwGNxWEeKiJtI9fUNwOPAScCewHHA30o6Pi96MfA3lfUkvYZU769qacBdwEm/vV4APBgR26rNjIjVEXFDRGyLiH7gQuBNefYfgN2AVw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GZmViI+0jczKxEnfTOzEnHSNzMrESd9M7MScdI3MysRJ30zsxJx0jczK5H/D8CFNKtImGqKAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "covid_data.hist()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 153, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(77, 8)" + ] + }, + "execution_count": 153, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "%matplotlib inline \n", + "import matplotlib.pyplot as plt \n", + "covid_mexico = covid_data[covid_data['GeoId']=='MX']\n", + "covid_mexico.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 154, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 154, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAWmElEQVR4nO3df5Bd5X3f8fd30SJtJGwtkqrBWohIxNiDXbE4OxRHHtc2cUNtj6Cjhtp1XLWl5Y9kHJNkguR03OCm7WClk9iedFwrQCynxJhBJmIMuGEEKW0mJlmMWH45hmDLWhXQslkZLZbWK+63f9wjsyv0467uPXs5e96vGc2957n37PneWelzHz3nPM+JzESSVB893S5AkjS/DH5JqhmDX5JqxuCXpJox+CWpZhZ1u4BWrFy5MteuXdvtMiSpUh555JGXMnPV8e2VCP61a9cyPDzc7TIkqVIiYu+J2h3qkaSaMfglqWYMfkmqGYNfkmrG4JekmjH4K2p8corH9h1kfHKq26VIqphKXM6p2Xbt2c+WnSP09vQw3WiwbdN6Ng6u6XZZkir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/0BzSPm2Tvw8g79DIqKXZujflplf73Y9HbQB2BgR3wduB94fEf+zuyV11CgwmpnH/od2J80vgoXgF4DvZeZYZk4DXwd+vss1leHFiDgPoHg80OV6Oioi/jXwYeBj2aGJVwZ/B0RE0Bwjfjozf7/b9XRSZn4qMwcycy3NE4MPZOaC6TVm5gvAvoh4a9F0BfBUF0vqpB8Al0fETxV/R69ggZy4Ps7dwObi+WZgVxdr6aiIuJLmMOvGzPxRp36uwd8ZG4CP0+wN7yn+fLDbRallnwBui4gRYBD4r12upyOK/8XcCXwbeJzmv/dKL28QEV8F/gp4a0SMRsS1wE3AByLiGZr/y7mpmzWeqZN8tj8EzgHuL3Llf3TkWC7ZIEn1Yo9fkmrG4JekmjH4JalmDH5JqhmDX5JqxuCXgIjImRPTImJRRIyd6WqkxYqfvzJj+70LcWVTVZPBLzW9ArwjIvqK7Q8A+9v4ecuBXzntu6QuMPil19xLcxVSgI8CXz32QrHm+58V66J/KyLWF+03Fuuo/0VEPBcRv1bschPws8Wkm98r2pbNWPf/tmI2rTTvDH7pNbcDHyluVrKe2SusfgZ4tFgX/beBr8x47W3ALwKXAb9TrNu0Ffi7zBzMzN8q3ncpcD1wMfAzNGd8S/PO4JcKmTkCrKXZ27/3uJffDfxJ8b4HgBUR8abitXsycyozX6K5QNjJlgX+68wczcwGsKc4ljTvFnW7AOkN5m6aa9i/F1jR4j5TM56/ysn/XbX6PqlU9vil2W4FPpOZjx/X/n+Aj0HzCh3gpdPcc+EQzcW1pDccexzSDJk5CnzhBC/dCNxarOD5I15bBvhkP2c8Iv6yuHH2fcA9na5VOlOuzilJNeNQjyTVjMEvSTVj8EtSzRj8klQzBr8k1YzBL0k1Y/BLUs38f4NOeoUsM4iTAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "covid_mexico.plot(kind=\"scatter\", x=\"Month\", y=\"Cases\")" + ] + }, + { + "cell_type": "code", + "execution_count": 168, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
DateRepDayMonthYearCasesDeathsCountries and territoriesGeoId
39852019-12-313112201900MexicoMX
39842020-01-0111202000MexicoMX
39532020-01-0212202000MexicoMX
39242020-01-0313202020MexicoMX
39722020-01-13131202000MexicoMX
...........................
39742020-11-01111202000MexicoMX
39432020-11-02112202000MexicoMX
39732020-12-01121202000MexicoMX
39422020-12-02122202000MexicoMX
39212020-12-03123202040MexicoMX
\n", + "

77 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + " DateRep Day Month Year Cases Deaths Countries and territories \\\n", + "3985 2019-12-31 31 12 2019 0 0 Mexico \n", + "3984 2020-01-01 1 1 2020 0 0 Mexico \n", + "3953 2020-01-02 1 2 2020 0 0 Mexico \n", + "3924 2020-01-03 1 3 2020 2 0 Mexico \n", + "3972 2020-01-13 13 1 2020 0 0 Mexico \n", + "... ... ... ... ... ... ... ... \n", + "3974 2020-11-01 11 1 2020 0 0 Mexico \n", + "3943 2020-11-02 11 2 2020 0 0 Mexico \n", + "3973 2020-12-01 12 1 2020 0 0 Mexico \n", + "3942 2020-12-02 12 2 2020 0 0 Mexico \n", + "3921 2020-12-03 12 3 2020 4 0 Mexico \n", + "\n", + " GeoId \n", + "3985 MX \n", + "3984 MX \n", + "3953 MX \n", + "3924 MX \n", + "3972 MX \n", + "... ... \n", + "3974 MX \n", + "3943 MX \n", + "3973 MX \n", + "3942 MX \n", + "3921 MX \n", + "\n", + "[77 rows x 8 columns]" + ] + }, + "execution_count": 168, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from datetime import datetime\n", + "mexico['DateRep'] =pd.to_datetime(mexico.DateRep, format=\"%d/%m/%Y\")\n", + "mexico_sort=mexico.sort_values(by='DateRep', ascending=True)\n", + "mexico_sort" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 156, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 156, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAX1UlEQVR4nO3df5Dc9X3f8edrpeV01QlzOh0aVWf5iIXtYvc4uxdsLOoaE8c/kgg6csEu42oSGrWZ4tpJWg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TRDyn7GQ0F5Kt2fLeiDgq6WKymaRDZNP6/1NE/CKApC3ATyLiZyV1AN+S9Jdks0TJt1kGvB34eD7c8/tk678cknQd8DtkM1gB/lFEDEp6F/A54C116LolzMFv9qoy8AeSBoHjZOve1/LzwICkD+W3XwNcTDal//WS9pCt6/LViBiV9BayMH8oXxlyCfBC1fN9CSAivinpfEkXRMThRe6b2T9w8FvSJP0MWcgfJBvrfwm4lGwY9OjJHgZ8LCIenPdc/eRj/MpOr/etfNXGHwL7Ilt1spb566Z4HRUrlMf4LVmSeoE/Af4gskWrXgO8EBEVsvXuZ89HfITs1H2zHgR+bfaIHUlvkLS8+rkj4sdkQ0S3kC0x3Cvp8nz7sqQ3V21+Xd5+BdkQ0k8Wt6dmc3mP31LTmQ/FlMlWSvwfwO/m9/0RMCLp3wAPAK/k7aPAcUl7gc+TrfzZD3xb2djNIbIzRs33P4FPko31fwj4jKTXkP3c3U62iijAUUnfyWv6lRrPY7aovDqnWQNJeoTsi+Pdja7F0uGhHjOzxHiP38wsMd7jNzNLjIPfzCwxDn4zs8Q4+M3MEuPgNzNLzP8HdHB3kuxkNDoAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "mexico_filter = mexico_sort[mexico_sort['Cases']!=0]\n", + "mexico_filter.plot(kind=\"scatter\", x=\"DateRep\", y=\"Cases\")" + ] + }, + { + "cell_type": "code", + "execution_count": 157, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
DateRepDayMonthYearCasesDeathsCountries and territoriesGeoId
39242020-01-0313202020MexicoMX
39232020-02-0323202010MexicoMX
39252020-02-29292202020MexicoMX
39202020-03-13133202050MexicoMX
39192020-03-141432020100MexicoMX
39182020-03-151532020150MexicoMX
39172020-03-161632020120MexicoMX
39162020-03-171732020290MexicoMX
39152020-03-181832020110MexicoMX
39142020-03-191932020250MexicoMX
39132020-03-202032020460MexicoMX
39122020-03-212132020392MexicoMX
39112020-03-222232020480MexicoMX
39102020-03-232332020650MexicoMX
39092020-03-242432020512MexicoMX
39222020-09-0393202020MexicoMX
39212020-12-03123202040MexicoMX
\n", + "
" + ], + "text/plain": [ + " DateRep Day Month Year Cases Deaths Countries and territories \\\n", + "3924 2020-01-03 1 3 2020 2 0 Mexico \n", + "3923 2020-02-03 2 3 2020 1 0 Mexico \n", + "3925 2020-02-29 29 2 2020 2 0 Mexico \n", + "3920 2020-03-13 13 3 2020 5 0 Mexico \n", + "3919 2020-03-14 14 3 2020 10 0 Mexico \n", + "3918 2020-03-15 15 3 2020 15 0 Mexico \n", + "3917 2020-03-16 16 3 2020 12 0 Mexico \n", + "3916 2020-03-17 17 3 2020 29 0 Mexico \n", + "3915 2020-03-18 18 3 2020 11 0 Mexico \n", + "3914 2020-03-19 19 3 2020 25 0 Mexico \n", + "3913 2020-03-20 20 3 2020 46 0 Mexico \n", + "3912 2020-03-21 21 3 2020 39 2 Mexico \n", + "3911 2020-03-22 22 3 2020 48 0 Mexico \n", + "3910 2020-03-23 23 3 2020 65 0 Mexico \n", + "3909 2020-03-24 24 3 2020 51 2 Mexico \n", + "3922 2020-09-03 9 3 2020 2 0 Mexico \n", + "3921 2020-12-03 12 3 2020 4 0 Mexico \n", + "\n", + " GeoId \n", + "3924 MX \n", + "3923 MX \n", + "3925 MX \n", + "3920 MX \n", + "3919 MX \n", + "3918 MX \n", + "3917 MX \n", + "3916 MX \n", + "3915 MX \n", + "3914 MX \n", + "3913 MX \n", + "3912 MX \n", + "3911 MX \n", + "3910 MX \n", + "3909 MX \n", + "3922 MX \n", + "3921 MX " + ] + }, + "execution_count": 157, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mexico_filter.head(77)" + ] + }, + { + "cell_type": "code", + "execution_count": 164, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "367" + ] + }, + "execution_count": 164, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sum(mexico_filter.Cases)" + ] + }, + { + "cell_type": "code", + "execution_count": 163, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3985 2019-12-31\n", + "3954 2020-01-31\n", + "3955 2020-01-30\n", + "3925 2020-02-29\n", + "3956 2020-01-29\n", + " ... \n", + "3952 2020-02-02\n", + "3983 2020-02-01\n", + "3924 2020-01-03\n", + "3953 2020-01-02\n", + "3984 2020-01-01\n", + "Name: DateRep, Length: 77, dtype: datetime64[ns]" + ] + }, + "execution_count": 163, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mexico.DateRep" + ] + }, + { + "cell_type": "code", + "execution_count": 160, + "metadata": {}, + "outputs": [], + "source": [ + "import sklearn\n", + "# Select a linear model\n", + "lin_reg_model = sklearn.linear_model.LinearRegression()\n", + "# Train the model\n" + ] + }, + { + "cell_type": "code", + "execution_count": 161, + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "Expected 2D array, got 1D array instead:\narray=[ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.\n 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36.\n 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54.\n 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72.\n 73. 74. 75. 76. 77.].\nReshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mX\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlinspace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m77\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m77\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmexico\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCases\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mlin_reg_model\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m~/lwc/topics/covid19/covid/lib/python3.7/site-packages/sklearn/linear_model/_base.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, X, y, sample_weight)\u001b[0m\n\u001b[1;32m 490\u001b[0m \u001b[0mn_jobs_\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mn_jobs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 491\u001b[0m X, y = check_X_y(X, y, accept_sparse=['csr', 'csc', 'coo'],\n\u001b[0;32m--> 492\u001b[0;31m y_numeric=True, multi_output=True)\n\u001b[0m\u001b[1;32m 493\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 494\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0msample_weight\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/lwc/topics/covid19/covid/lib/python3.7/site-packages/sklearn/utils/validation.py\u001b[0m in \u001b[0;36mcheck_X_y\u001b[0;34m(X, y, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, warn_on_dtype, estimator)\u001b[0m\n\u001b[1;32m 753\u001b[0m \u001b[0mensure_min_features\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mensure_min_features\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 754\u001b[0m \u001b[0mwarn_on_dtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mwarn_on_dtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 755\u001b[0;31m estimator=estimator)\n\u001b[0m\u001b[1;32m 756\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mmulti_output\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 757\u001b[0m y = check_array(y, 'csr', force_all_finite=True, ensure_2d=False,\n", + "\u001b[0;32m~/lwc/topics/covid19/covid/lib/python3.7/site-packages/sklearn/utils/validation.py\u001b[0m in \u001b[0;36mcheck_array\u001b[0;34m(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator)\u001b[0m\n\u001b[1;32m 554\u001b[0m \u001b[0;34m\"Reshape your data either using array.reshape(-1, 1) if \"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 555\u001b[0m \u001b[0;34m\"your data has a single feature or array.reshape(1, -1) \"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 556\u001b[0;31m \"if it contains a single sample.\".format(array))\n\u001b[0m\u001b[1;32m 557\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 558\u001b[0m \u001b[0;31m# in the future np.flexible dtypes will be handled like object dtypes\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: Expected 2D array, got 1D array instead:\narray=[ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.\n 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36.\n 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54.\n 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72.\n 73. 74. 75. 76. 77.].\nReshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample." + ] + } + ], + "source": [ + "X = np.linspace(1,77,77, axis=0)\n", + "y = mexico.Cases\n", + "lin_reg_model.fit(X, y)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "y.shape" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.7.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}