Master-DataScience-Notes/1year/2trimester/Coding for Data Science - Python language/Python/Examples/COVID-19 Analysis.ipynb

18292 lines
3.9 MiB
Plaintext
Raw Permalink Normal View History

2020-03-01 21:33:06 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# COVID-19 Analysis\n",
"<br>"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 2,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>1/22/20</th>\n",
" <th>1/23/20</th>\n",
" <th>1/24/20</th>\n",
" <th>1/25/20</th>\n",
" <th>1/26/20</th>\n",
" <th>1/27/20</th>\n",
" <th>1/28/20</th>\n",
" <th>1/29/20</th>\n",
" <th>...</th>\n",
" <th>2/21/20</th>\n",
" <th>2/22/20</th>\n",
" <th>2/23/20</th>\n",
" <th>2/24/20</th>\n",
" <th>2/25/20</th>\n",
" <th>2/26/20</th>\n",
" <th>2/27/20</th>\n",
" <th>2/28/20</th>\n",
" <th>2/29/20</th>\n",
2020-03-02 21:22:49 +01:00
" <th>3/1/20</th>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>count</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.00000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
" <td>125.000000</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>mean</td>\n",
" <td>32.160092</td>\n",
" <td>37.307430</td>\n",
" <td>4.440000</td>\n",
" <td>5.224000</td>\n",
" <td>7.528000</td>\n",
" <td>11.472000</td>\n",
" <td>16.944000</td>\n",
" <td>23.416000</td>\n",
" <td>44.624000</td>\n",
" <td>49.328000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>614.744000</td>\n",
" <td>628.792000</td>\n",
" <td>631.880000</td>\n",
" <td>636.560000</td>\n",
" <td>643.32000</td>\n",
" <td>651.176000</td>\n",
" <td>662.048000</td>\n",
" <td>672.976000</td>\n",
" <td>688.104000</td>\n",
" <td>706.968000</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>std</td>\n",
" <td>20.184693</td>\n",
" <td>85.561399</td>\n",
" <td>39.746657</td>\n",
" <td>39.840785</td>\n",
" <td>49.520373</td>\n",
" <td>68.835191</td>\n",
" <td>96.111268</td>\n",
" <td>129.438626</td>\n",
" <td>318.761506</td>\n",
" <td>320.358161</td>\n",
2020-03-01 21:33:06 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>5600.966184</td>\n",
" <td>5727.852962</td>\n",
" <td>5727.726592</td>\n",
" <td>5745.789407</td>\n",
" <td>5790.29246</td>\n",
" <td>5826.135337</td>\n",
" <td>5863.068799</td>\n",
" <td>5892.438301</td>\n",
" <td>5932.363864</td>\n",
" <td>5985.776481</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>min</td>\n",
2020-03-01 21:33:06 +01:00
" <td>-40.900600</td>\n",
" <td>-123.869500</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>...</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0.00000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>25%</td>\n",
" <td>26.078900</td>\n",
" <td>1.659600</td>\n",
2020-03-01 21:33:06 +01:00
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>...</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0.00000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>50%</td>\n",
2020-03-01 21:33:06 +01:00
" <td>35.443700</td>\n",
2020-03-02 21:22:49 +01:00
" <td>47.750000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>...</td>\n",
" <td>2.000000</td>\n",
" <td>2.000000</td>\n",
" <td>2.000000</td>\n",
" <td>2.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>2.00000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>2.000000</td>\n",
" <td>3.000000</td>\n",
" <td>4.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>6.000000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>7.000000</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>75%</td>\n",
" <td>43.653200</td>\n",
" <td>112.500000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>0.000000</td>\n",
" <td>1.000000</td>\n",
" <td>2.000000</td>\n",
" <td>3.000000</td>\n",
" <td>4.000000</td>\n",
" <td>6.000000</td>\n",
" <td>8.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>8.000000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>75.000000</td>\n",
" <td>75.000000</td>\n",
" <td>76.000000</td>\n",
" <td>79.000000</td>\n",
" <td>91.00000</td>\n",
" <td>91.000000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>92.000000</td>\n",
" <td>93.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>95.000000</td>\n",
" <td>106.000000</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>max</td>\n",
2020-03-01 21:33:06 +01:00
" <td>64.963100</td>\n",
" <td>174.886000</td>\n",
" <td>444.000000</td>\n",
" <td>444.000000</td>\n",
" <td>549.000000</td>\n",
" <td>761.000000</td>\n",
" <td>1058.000000</td>\n",
" <td>1423.000000</td>\n",
" <td>3554.000000</td>\n",
" <td>3554.000000</td>\n",
" <td>...</td>\n",
" <td>62662.000000</td>\n",
" <td>64084.000000</td>\n",
" <td>64084.000000</td>\n",
" <td>64287.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>64786.00000</td>\n",
2020-03-01 21:33:06 +01:00
" <td>65187.000000</td>\n",
" <td>65596.000000</td>\n",
" <td>65914.000000</td>\n",
" <td>66337.000000</td>\n",
2020-03-02 21:22:49 +01:00
" <td>66907.000000</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" </tbody>\n",
"</table>\n",
2020-03-02 21:22:49 +01:00
"<p>8 rows × 42 columns</p>\n",
2020-03-01 21:33:06 +01:00
"</div>"
],
"text/plain": [
" Lat Long 1/22/20 1/23/20 1/24/20 1/25/20 \\\n",
2020-03-02 21:22:49 +01:00
"count 125.000000 125.000000 125.000000 125.000000 125.000000 125.000000 \n",
"mean 32.160092 37.307430 4.440000 5.224000 7.528000 11.472000 \n",
"std 20.184693 85.561399 39.746657 39.840785 49.520373 68.835191 \n",
2020-03-01 21:33:06 +01:00
"min -40.900600 -123.869500 0.000000 0.000000 0.000000 0.000000 \n",
2020-03-02 21:22:49 +01:00
"25% 26.078900 1.659600 0.000000 0.000000 0.000000 0.000000 \n",
"50% 35.443700 47.750000 0.000000 0.000000 0.000000 0.000000 \n",
"75% 43.653200 112.500000 0.000000 1.000000 2.000000 3.000000 \n",
2020-03-01 21:33:06 +01:00
"max 64.963100 174.886000 444.000000 444.000000 549.000000 761.000000 \n",
"\n",
2020-03-02 21:22:49 +01:00
" 1/26/20 1/27/20 1/28/20 1/29/20 ... 2/21/20 \\\n",
"count 125.000000 125.000000 125.000000 125.000000 ... 125.000000 \n",
"mean 16.944000 23.416000 44.624000 49.328000 ... 614.744000 \n",
"std 96.111268 129.438626 318.761506 320.358161 ... 5600.966184 \n",
2020-03-01 21:33:06 +01:00
"min 0.000000 0.000000 0.000000 0.000000 ... 0.000000 \n",
"25% 0.000000 0.000000 0.000000 0.000000 ... 0.000000 \n",
"50% 0.000000 0.000000 0.000000 0.000000 ... 2.000000 \n",
2020-03-02 21:22:49 +01:00
"75% 4.000000 6.000000 8.000000 8.000000 ... 75.000000 \n",
"max 1058.000000 1423.000000 3554.000000 3554.000000 ... 62662.000000 \n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
" 2/22/20 2/23/20 2/24/20 2/25/20 2/26/20 \\\n",
"count 125.000000 125.000000 125.000000 125.00000 125.000000 \n",
"mean 628.792000 631.880000 636.560000 643.32000 651.176000 \n",
"std 5727.852962 5727.726592 5745.789407 5790.29246 5826.135337 \n",
"min 0.000000 0.000000 0.000000 0.00000 0.000000 \n",
"25% 0.000000 0.000000 0.000000 0.00000 1.000000 \n",
"50% 2.000000 2.000000 2.000000 2.00000 2.000000 \n",
"75% 75.000000 76.000000 79.000000 91.00000 91.000000 \n",
"max 64084.000000 64084.000000 64287.000000 64786.00000 65187.000000 \n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
" 2/27/20 2/28/20 2/29/20 3/1/20 \n",
"count 125.000000 125.000000 125.000000 125.000000 \n",
"mean 662.048000 672.976000 688.104000 706.968000 \n",
"std 5863.068799 5892.438301 5932.363864 5985.776481 \n",
2020-03-01 21:33:06 +01:00
"min 0.000000 0.000000 0.000000 0.000000 \n",
"25% 1.000000 1.000000 1.000000 1.000000 \n",
2020-03-02 21:22:49 +01:00
"50% 3.000000 4.000000 6.000000 7.000000 \n",
"75% 92.000000 93.000000 95.000000 106.000000 \n",
"max 65596.000000 65914.000000 66337.000000 66907.000000 \n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"[8 rows x 42 columns]"
2020-03-01 21:33:06 +01:00
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 2,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"data = pd.read_csv(\"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv\")\n",
"data.describe()"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 3,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Province/State</th>\n",
" <th>Country/Region</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>1/22/20</th>\n",
" <th>1/23/20</th>\n",
" <th>1/24/20</th>\n",
" <th>1/25/20</th>\n",
" <th>1/26/20</th>\n",
" <th>1/27/20</th>\n",
" <th>...</th>\n",
" <th>2/21/20</th>\n",
" <th>2/22/20</th>\n",
" <th>2/23/20</th>\n",
" <th>2/24/20</th>\n",
" <th>2/25/20</th>\n",
" <th>2/26/20</th>\n",
" <th>2/27/20</th>\n",
" <th>2/28/20</th>\n",
" <th>2/29/20</th>\n",
2020-03-02 21:22:49 +01:00
" <th>3/1/20</th>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Anhui</td>\n",
" <td>Mainland China</td>\n",
2020-03-02 21:22:49 +01:00
" <td>31.8257</td>\n",
2020-03-01 21:33:06 +01:00
" <td>117.2264</td>\n",
" <td>1</td>\n",
" <td>9</td>\n",
" <td>15</td>\n",
" <td>39</td>\n",
" <td>60</td>\n",
" <td>70</td>\n",
" <td>...</td>\n",
" <td>988</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>990</td>\n",
" <td>990</td>\n",
2020-03-02 21:22:49 +01:00
" <td>990</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Beijing</td>\n",
" <td>Mainland China</td>\n",
2020-03-02 21:22:49 +01:00
" <td>40.1824</td>\n",
2020-03-01 21:33:06 +01:00
" <td>116.4142</td>\n",
" <td>14</td>\n",
" <td>22</td>\n",
" <td>36</td>\n",
" <td>41</td>\n",
" <td>68</td>\n",
" <td>80</td>\n",
" <td>...</td>\n",
" <td>396</td>\n",
" <td>399</td>\n",
" <td>399</td>\n",
" <td>399</td>\n",
" <td>400</td>\n",
" <td>400</td>\n",
" <td>410</td>\n",
" <td>410</td>\n",
" <td>411</td>\n",
2020-03-02 21:22:49 +01:00
" <td>413</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>2</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Chongqing</td>\n",
" <td>Mainland China</td>\n",
2020-03-02 21:22:49 +01:00
" <td>30.0572</td>\n",
2020-03-01 21:33:06 +01:00
" <td>107.8740</td>\n",
" <td>6</td>\n",
" <td>9</td>\n",
" <td>27</td>\n",
" <td>57</td>\n",
" <td>75</td>\n",
" <td>110</td>\n",
" <td>...</td>\n",
" <td>572</td>\n",
" <td>573</td>\n",
" <td>575</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
2020-03-02 21:22:49 +01:00
" <td>576</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>3</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Fujian</td>\n",
" <td>Mainland China</td>\n",
2020-03-02 21:22:49 +01:00
" <td>26.0789</td>\n",
2020-03-01 21:33:06 +01:00
" <td>117.9874</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" <td>10</td>\n",
" <td>18</td>\n",
" <td>35</td>\n",
" <td>59</td>\n",
" <td>...</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>294</td>\n",
" <td>294</td>\n",
" <td>296</td>\n",
" <td>296</td>\n",
" <td>296</td>\n",
2020-03-02 21:22:49 +01:00
" <td>296</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>4</td>\n",
2020-03-01 22:50:58 +01:00
" <td>Gansu</td>\n",
" <td>Mainland China</td>\n",
2020-03-02 21:22:49 +01:00
" <td>36.0611</td>\n",
2020-03-01 22:50:58 +01:00
" <td>103.8343</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>7</td>\n",
" <td>14</td>\n",
" <td>...</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" </tr>\n",
" <tr>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>120</td>\n",
" <td>NaN</td>\n",
" <td>Azerbaijan</td>\n",
" <td>40.1431</td>\n",
" <td>47.5769</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>121</td>\n",
" <td>NaN</td>\n",
" <td>Czech Republic</td>\n",
" <td>49.8175</td>\n",
" <td>15.4730</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>122</td>\n",
" <td>NaN</td>\n",
" <td>Armenia</td>\n",
" <td>40.0691</td>\n",
" <td>45.0382</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>0</td>\n",
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>123</td>\n",
" <td>NaN</td>\n",
" <td>Dominican Republic</td>\n",
" <td>18.7357</td>\n",
" <td>-70.1627</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>124</td>\n",
" <td>Providence, RI</td>\n",
" <td>US</td>\n",
" <td>41.8240</td>\n",
" <td>-71.4128</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>...</td>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
2020-03-02 21:22:49 +01:00
" </tbody>\n",
"</table>\n",
"<p>125 rows × 44 columns</p>\n",
"</div>"
],
"text/plain": [
" Province/State Country/Region Lat Long 1/22/20 1/23/20 \\\n",
"0 Anhui Mainland China 31.8257 117.2264 1 9 \n",
"1 Beijing Mainland China 40.1824 116.4142 14 22 \n",
"2 Chongqing Mainland China 30.0572 107.8740 6 9 \n",
"3 Fujian Mainland China 26.0789 117.9874 1 5 \n",
"4 Gansu Mainland China 36.0611 103.8343 0 2 \n",
".. ... ... ... ... ... ... \n",
"120 NaN Azerbaijan 40.1431 47.5769 0 0 \n",
"121 NaN Czech Republic 49.8175 15.4730 0 0 \n",
"122 NaN Armenia 40.0691 45.0382 0 0 \n",
"123 NaN Dominican Republic 18.7357 -70.1627 0 0 \n",
"124 Providence, RI US 41.8240 -71.4128 0 0 \n",
"\n",
" 1/24/20 1/25/20 1/26/20 1/27/20 ... 2/21/20 2/22/20 2/23/20 \\\n",
"0 15 39 60 70 ... 988 989 989 \n",
"1 36 41 68 80 ... 396 399 399 \n",
"2 27 57 75 110 ... 572 573 575 \n",
"3 10 18 35 59 ... 293 293 293 \n",
"4 2 4 7 14 ... 91 91 91 \n",
".. ... ... ... ... ... ... ... ... \n",
"120 0 0 0 0 ... 0 0 0 \n",
"121 0 0 0 0 ... 0 0 0 \n",
"122 0 0 0 0 ... 0 0 0 \n",
"123 0 0 0 0 ... 0 0 0 \n",
"124 0 0 0 0 ... 0 0 0 \n",
"\n",
" 2/24/20 2/25/20 2/26/20 2/27/20 2/28/20 2/29/20 3/1/20 \n",
"0 989 989 989 989 990 990 990 \n",
"1 399 400 400 410 410 411 413 \n",
"2 576 576 576 576 576 576 576 \n",
"3 293 294 294 296 296 296 296 \n",
"4 91 91 91 91 91 91 91 \n",
".. ... ... ... ... ... ... ... \n",
"120 0 0 0 0 0 0 3 \n",
"121 0 0 0 0 0 0 3 \n",
"122 0 0 0 0 0 0 1 \n",
"123 0 0 0 0 0 0 1 \n",
"124 0 0 0 0 0 0 1 \n",
"\n",
"[125 rows x 44 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 2,\n",
" 2,\n",
" 2,\n",
" 2,\n",
" 2,\n",
" 2,\n",
" 2,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 3,\n",
" 20,\n",
" 62,\n",
" 155,\n",
" 229,\n",
" 322,\n",
" 453,\n",
" 655,\n",
" 888,\n",
" 1128,\n",
" 1694]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_italy = data[data[\"Country/Region\"] == \"Italy\"]\n",
"#data_italy.values[0,[3]]\n",
"#type(data_italy.values)\n",
"values =[]\n",
"for i in range(4,len(data_italy.values[0])):\n",
" values += [data_italy.values[0][i]]\n",
" \n",
"values"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"dates = []\n",
"for x in data_italy:\n",
" dates+= [x]\n",
" \n",
"dates = dates[4:]\n",
"dates\n",
"\n",
"df = pd.DataFrame( {\n",
" 'dates': dates,\n",
" 'values' : values, \n",
" 'el': [i for i in range(1,len(values)+1)] \n",
" })"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>dates</th>\n",
" <th>values</th>\n",
" <th>el</th>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
2020-03-02 21:22:49 +01:00
" </thead>\n",
" <tbody>\n",
2020-03-01 22:50:58 +01:00
" <tr>\n",
" <td>0</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1/22/20</td>\n",
2020-03-01 22:50:58 +01:00
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <td>1</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1/23/20</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
" <td>2</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1/24/20</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
" <td>3</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1/25/20</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" <td>4</td>\n",
2020-03-02 21:22:49 +01:00
" </tr>\n",
" <tr>\n",
2020-03-01 22:50:58 +01:00
" <td>4</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1/26/20</td>\n",
2020-03-01 21:33:06 +01:00
" <td>0</td>\n",
" <td>5</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" dates values el\n",
"0 1/22/20 0 1\n",
"1 1/23/20 0 2\n",
"2 1/24/20 0 3\n",
"3 1/25/20 0 4\n",
"4 1/26/20 0 5"
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 6,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 7,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
2020-03-02 21:22:49 +01:00
{
"data": {
"text/html": [
" <script type=\"text/javascript\">\n",
" window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
" if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
" if (typeof require !== 'undefined') {\n",
" require.undef(\"plotly\");\n",
" define('plotly', function(require, exports, module) {\n",
" /**\n",
"* plotly.js v1.52.2\n",
"* Copyright 2012-2020, Plotly, Inc.\n",
"* All rights reserved.\n",
"* Licensed under the MIT license\n",
"*/\n",
"!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function a(o,s){if(!r[o]){if(!e[o]){var l=\"function\"==typeof require&&require;if(!s&&l)return l(o,!0);if(i)return i(o,!0);var c=new Error(\"Cannot find module '\"+o+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return a(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var i=\"function\"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}}()({1:[function(t,e,r){\"use strict\";var n=t(\"../src/lib\"),a={\"X,X div\":\"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\",\"X input,X button\":\"font-family:'Open Sans', verdana, arial, sans-serif;\",\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg\":\"overflow:hidden;\",\"X svg a\":\"fill:#447adb;\",\"X svg a:hover\":\"fill:#3c6dc5;\",\"X .main-svg\":\"position:absolute;top:0;left:0;pointer-events:none;\",\"X .main-svg .draglayer\":\"pointer-events:all;\",\"X .cursor-default\":\"cursor:default;\",\"X .cursor-pointer\":\"cursor:pointer;\",\"X .cursor-crosshair\":\"cursor:crosshair;\",\"X .cursor-move\":\"cursor:move;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .cursor-grab\":\"cursor:-webkit-grab;cursor:grab;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;\",\"X .ease-bg\":\"-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;\",\"X .modebar--hover>:not(.watermark)\":\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\",\"X:hover .modebar--hover .modebar-group\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\",\"X .modebar-btn svg\":\"position:relative;top:2px;\",\"X .modebar.vertical\":\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\",\"X .modebar.vertical svg\":\"top:-1px;\",\"X .modebar.vertical .modebar-group\":\"display:block;float:none;padding-left:0px;padding-bottom:8px;\",\"X .modebar.vertical .modebar-group .modebar-btn\":\"display:block;text-align:center;\",\"X [data-title]:before,X [data-title]:after\":\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":\"content:'';position:absolute;background:transparent;border
" });\n",
" require(['plotly'], function(Plotly) {\n",
" window._Plotly = Plotly;\n",
" });\n",
" }\n",
" </script>\n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
2020-03-01 21:33:06 +01:00
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "el=%{x}<br>values=%{marker.color}",
"legendgroup": "",
"marker": {
"color": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
20,
62,
155,
229,
322,
453,
655,
888,
2020-03-02 21:22:49 +01:00
1128,
1694
2020-03-01 21:33:06 +01:00
],
"coloraxis": "coloraxis",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"showlegend": false,
"type": "scatter",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
2020-03-02 21:22:49 +01:00
39,
40
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
20,
62,
155,
229,
322,
453,
655,
888,
2020-03-02 21:22:49 +01:00
1128,
1694
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>values = 18.37 * el + -235.035<br>R<sup>2</sup>=0.363517<br><br>el=%{x}<br>values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "",
"marker": {
"symbol": "circle"
},
"mode": "lines",
"name": "",
"showlegend": false,
"type": "scatter",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
2020-03-02 21:22:49 +01:00
39,
40
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-216.66463414634137,
-198.29465290806746,
-179.92467166979353,
-161.55469043151962,
-143.1847091932457,
-124.81472795497179,
-106.44474671669786,
-88.07476547842396,
-69.70478424015005,
-51.33480300187614,
-32.9648217636022,
-14.594840525328294,
3.775140712945614,
22.14512195121955,
40.51510318949346,
58.88508442776737,
77.25506566604128,
95.62504690431518,
113.99502814258909,
132.365009380863,
150.73499061913697,
169.10497185741087,
187.47495309568478,
205.8449343339587,
224.2149155722326,
242.5848968105065,
260.9548780487804,
279.3248592870544,
297.6948405253283,
316.0648217636022,
334.4348030018761,
352.80478424015,
371.1747654784239,
389.54474671669783,
407.91472795497174,
426.28470919324565,
444.65469043151955,
463.02467166979346,
481.39465290806737,
499.7646341463413
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
}
],
"layout": {
"coloraxis": {
"colorbar": {
"title": {
"text": "values"
}
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "el"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
2020-03-02 21:22:49 +01:00
" <div id=\"f4f8d322-c2d4-464a-b049-00e1855058ea\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
2020-03-01 21:33:06 +01:00
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
2020-03-02 21:22:49 +01:00
" if (document.getElementById(\"f4f8d322-c2d4-464a-b049-00e1855058ea\")) {\n",
2020-03-01 21:33:06 +01:00
" Plotly.newPlot(\n",
2020-03-02 21:22:49 +01:00
" 'f4f8d322-c2d4-464a-b049-00e1855058ea',\n",
" [{\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"el=%{x}<br>values=%{marker.color}\", \"legendgroup\": \"\", \"marker\": {\"color\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 20, 62, 155, 229, 322, 453, 655, 888, 1128, 1694], \"coloraxis\": \"coloraxis\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], \"xaxis\": \"x\", \"y\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 20, 62, 155, 229, 322, 453, 655, 888, 1128, 1694], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"<b>OLS trendline</b><br>values = 18.37 * el + -235.035<br>R<sup>2</sup>=0.363517<br><br>el=%{x}<br>values=%{y} <b>(trend)</b>\", \"legendgroup\": \"\", \"marker\": {\"symbol\": \"circle\"}, \"mode\": \"lines\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], \"xaxis\": \"x\", \"y\": [-216.66463414634137, -198.29465290806746, -179.92467166979353, -161.55469043151962, -143.1847091932457, -124.81472795497179, -106.44474671669786, -88.07476547842396, -69.70478424015005, -51.33480300187614, -32.9648217636022, -14.594840525328294, 3.775140712945614, 22.14512195121955, 40.51510318949346, 58.88508442776737, 77.25506566604128, 95.62504690431518, 113.99502814258909, 132.365009380863, 150.73499061913697, 169.10497185741087, 187.47495309568478, 205.8449343339587, 224.2149155722326, 242.5848968105065, 260.9548780487804, 279.3248592870544, 297.6948405253283, 316.0648217636022, 334.4348030018761, 352.80478424015, 371.1747654784239, 389.54474671669783, 407.91472795497174, 426.28470919324565, 444.65469043151955, 463.02467166979346, 481.39465290806737, 499.7646341463413], \"yaxis\": \"y\"}],\n",
2020-03-01 21:33:06 +01:00
" {\"coloraxis\": {\"colorbar\": {\"title\": {\"text\": \"values\"}}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"legend\": {\"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlin
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
2020-03-02 21:22:49 +01:00
"var gd = document.getElementById('f4f8d322-c2d4-464a-b049-00e1855058ea');\n",
2020-03-01 21:33:06 +01:00
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly.express as px\n",
"fig = px.scatter(df,x = \"el\",y=\"values\", trendline=\"ols\", color=\"values\")\n",
"fig.show()"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 8,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "dates=%{x}<br>values=%{y}",
"legendgroup": "",
"line": {
"color": "#636efa",
"dash": "solid"
},
"mode": "lines",
"name": "",
"showlegend": false,
"type": "scatter",
"x": [
"1/22/20",
"1/23/20",
"1/24/20",
"1/25/20",
"1/26/20",
"1/27/20",
"1/28/20",
"1/29/20",
"1/30/20",
"1/31/20",
"2/1/20",
"2/2/20",
"2/3/20",
"2/4/20",
"2/5/20",
"2/6/20",
"2/7/20",
"2/8/20",
"2/9/20",
"2/10/20",
"2/11/20",
"2/12/20",
"2/13/20",
"2/14/20",
"2/15/20",
"2/16/20",
"2/17/20",
"2/18/20",
"2/19/20",
"2/20/20",
"2/21/20",
"2/22/20",
"2/23/20",
"2/24/20",
"2/25/20",
"2/26/20",
"2/27/20",
"2/28/20",
2020-03-02 21:22:49 +01:00
"2/29/20",
"3/1/20"
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
20,
62,
155,
229,
322,
453,
655,
888,
2020-03-02 21:22:49 +01:00
1128,
1694
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "dates"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
2020-03-02 21:22:49 +01:00
" <div id=\"ab148723-e8f7-4015-bb17-180480f46307\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
2020-03-01 21:33:06 +01:00
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
2020-03-02 21:22:49 +01:00
" if (document.getElementById(\"ab148723-e8f7-4015-bb17-180480f46307\")) {\n",
2020-03-01 21:33:06 +01:00
" Plotly.newPlot(\n",
2020-03-02 21:22:49 +01:00
" 'ab148723-e8f7-4015-bb17-180480f46307',\n",
" [{\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"dates=%{x}<br>values=%{y}\", \"legendgroup\": \"\", \"line\": {\"color\": \"#636efa\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [\"1/22/20\", \"1/23/20\", \"1/24/20\", \"1/25/20\", \"1/26/20\", \"1/27/20\", \"1/28/20\", \"1/29/20\", \"1/30/20\", \"1/31/20\", \"2/1/20\", \"2/2/20\", \"2/3/20\", \"2/4/20\", \"2/5/20\", \"2/6/20\", \"2/7/20\", \"2/8/20\", \"2/9/20\", \"2/10/20\", \"2/11/20\", \"2/12/20\", \"2/13/20\", \"2/14/20\", \"2/15/20\", \"2/16/20\", \"2/17/20\", \"2/18/20\", \"2/19/20\", \"2/20/20\", \"2/21/20\", \"2/22/20\", \"2/23/20\", \"2/24/20\", \"2/25/20\", \"2/26/20\", \"2/27/20\", \"2/28/20\", \"2/29/20\", \"3/1/20\"], \"xaxis\": \"x\", \"y\": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 20, 62, 155, 229, 322, 453, 655, 888, 1128, 1694], \"yaxis\": \"y\"}],\n",
2020-03-01 21:33:06 +01:00
" {\"legend\": {\"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
2020-03-02 21:22:49 +01:00
"var gd = document.getElementById('ab148723-e8f7-4015-bb17-180480f46307');\n",
2020-03-01 21:33:06 +01:00
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly.express as px\n",
"fig = px.line(df,x = \"dates\", y=\"values\")\n",
"fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## LINEAR REGRESSION with Sklearn"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 9,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2020-03-02 21:22:49 +01:00
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:13: SettingWithCopyWarning:\n",
2020-03-01 21:33:06 +01:00
"\n",
"\n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
2020-03-02 21:22:49 +01:00
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
2020-03-01 21:33:06 +01:00
"\n"
]
},
{
"data": {
"text/plain": [
2020-03-02 21:22:49 +01:00
"<Figure size 640x480 with 1 Axes>"
2020-03-01 21:33:06 +01:00
]
},
2020-03-02 21:22:49 +01:00
"metadata": {},
2020-03-01 21:33:06 +01:00
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2020-03-02 21:22:49 +01:00
"Accuracy: 0.6278428150820454\n"
2020-03-01 21:33:06 +01:00
]
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt # To visualize\n",
"import pandas as pd # To read data\n",
"from sklearn.linear_model import LinearRegression\n",
"\n",
"\n",
"#rescaling the values to get a better accuracy\n",
"df[\"el\"]\n",
"\n",
"j = 1\n",
"for i in range(len(df[\"el\"])):\n",
" if(i >= 20):\n",
" df[\"el\"][i]=j\n",
" j+=1\n",
" \n",
"X = df.iloc[20:, 2].values.reshape(-1, 1) # values converts it into a numpy array\n",
"Y = df.iloc[20:, 1].values.reshape(-1, 1) # -1 means that calculate the dimension of rows, but have 1 column\n",
"linear_regressor = LinearRegression() # create object for the class\n",
"linear_regressor.fit(X, Y) # perform linear regression\n",
"acc = linear_regressor.score(X, Y)\n",
"Y_pred = linear_regressor.predict(X) # make predictions\n",
"plt.scatter(X, Y)\n",
"plt.plot(X, Y_pred, color='red')\n",
"plt.show()\n",
"print(\"Accuracy:\" ,acc)\n"
]
},
{
"cell_type": "code",
2020-03-01 22:50:58 +01:00
"execution_count": null,
2020-03-01 21:33:06 +01:00
"metadata": {},
2020-03-01 22:50:58 +01:00
"outputs": [],
2020-03-01 21:33:06 +01:00
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# EVALUATION IN CHINA"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 10,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Province/State</th>\n",
" <th>Country/Region</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>1/22/20</th>\n",
" <th>1/23/20</th>\n",
" <th>1/24/20</th>\n",
" <th>1/25/20</th>\n",
" <th>1/26/20</th>\n",
" <th>1/27/20</th>\n",
" <th>...</th>\n",
" <th>2/21/20</th>\n",
" <th>2/22/20</th>\n",
" <th>2/23/20</th>\n",
" <th>2/24/20</th>\n",
" <th>2/25/20</th>\n",
" <th>2/26/20</th>\n",
" <th>2/27/20</th>\n",
" <th>2/28/20</th>\n",
" <th>2/29/20</th>\n",
2020-03-02 21:22:49 +01:00
" <th>3/1/20</th>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Anhui</td>\n",
" <td>Mainland China</td>\n",
" <td>31.82570</td>\n",
" <td>117.2264</td>\n",
" <td>1</td>\n",
" <td>9</td>\n",
" <td>15</td>\n",
" <td>39</td>\n",
" <td>60</td>\n",
" <td>70</td>\n",
" <td>...</td>\n",
" <td>988</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>989</td>\n",
" <td>990</td>\n",
" <td>990</td>\n",
2020-03-02 21:22:49 +01:00
" <td>990</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Beijing</td>\n",
" <td>Mainland China</td>\n",
" <td>40.18240</td>\n",
" <td>116.4142</td>\n",
" <td>14</td>\n",
" <td>22</td>\n",
" <td>36</td>\n",
" <td>41</td>\n",
" <td>68</td>\n",
" <td>80</td>\n",
" <td>...</td>\n",
" <td>396</td>\n",
" <td>399</td>\n",
" <td>399</td>\n",
" <td>399</td>\n",
" <td>400</td>\n",
" <td>400</td>\n",
" <td>410</td>\n",
" <td>410</td>\n",
" <td>411</td>\n",
2020-03-02 21:22:49 +01:00
" <td>413</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>2</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Chongqing</td>\n",
" <td>Mainland China</td>\n",
" <td>30.05720</td>\n",
" <td>107.8740</td>\n",
" <td>6</td>\n",
" <td>9</td>\n",
" <td>27</td>\n",
" <td>57</td>\n",
" <td>75</td>\n",
" <td>110</td>\n",
" <td>...</td>\n",
" <td>572</td>\n",
" <td>573</td>\n",
" <td>575</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
" <td>576</td>\n",
2020-03-02 21:22:49 +01:00
" <td>576</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>3</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Fujian</td>\n",
" <td>Mainland China</td>\n",
" <td>26.07890</td>\n",
" <td>117.9874</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" <td>10</td>\n",
" <td>18</td>\n",
" <td>35</td>\n",
" <td>59</td>\n",
" <td>...</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>293</td>\n",
" <td>294</td>\n",
" <td>294</td>\n",
" <td>296</td>\n",
" <td>296</td>\n",
" <td>296</td>\n",
2020-03-02 21:22:49 +01:00
" <td>296</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>4</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Gansu</td>\n",
" <td>Mainland China</td>\n",
" <td>36.06110</td>\n",
" <td>103.8343</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>7</td>\n",
" <td>14</td>\n",
" <td>...</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>5</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Guangdong</td>\n",
" <td>Mainland China</td>\n",
" <td>23.34170</td>\n",
" <td>113.4244</td>\n",
" <td>26</td>\n",
" <td>32</td>\n",
" <td>53</td>\n",
" <td>78</td>\n",
" <td>111</td>\n",
" <td>151</td>\n",
" <td>...</td>\n",
" <td>1333</td>\n",
" <td>1339</td>\n",
" <td>1342</td>\n",
" <td>1345</td>\n",
" <td>1347</td>\n",
" <td>1347</td>\n",
" <td>1347</td>\n",
" <td>1348</td>\n",
" <td>1349</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1349</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>6</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Guangxi</td>\n",
" <td>Mainland China</td>\n",
" <td>23.82980</td>\n",
" <td>108.7881</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>23</td>\n",
" <td>23</td>\n",
" <td>36</td>\n",
" <td>46</td>\n",
" <td>...</td>\n",
" <td>246</td>\n",
" <td>249</td>\n",
" <td>249</td>\n",
" <td>251</td>\n",
" <td>252</td>\n",
" <td>252</td>\n",
" <td>252</td>\n",
" <td>252</td>\n",
" <td>252</td>\n",
2020-03-02 21:22:49 +01:00
" <td>252</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>7</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Guizhou</td>\n",
" <td>Mainland China</td>\n",
" <td>26.81540</td>\n",
" <td>106.8748</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>5</td>\n",
" <td>7</td>\n",
" <td>...</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" <td>146</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>8</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Hainan</td>\n",
" <td>Mainland China</td>\n",
" <td>19.19590</td>\n",
" <td>109.7453</td>\n",
" <td>4</td>\n",
" <td>5</td>\n",
" <td>8</td>\n",
" <td>19</td>\n",
" <td>22</td>\n",
" <td>33</td>\n",
" <td>...</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" <td>168</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>9</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Hebei</td>\n",
" <td>Mainland China</td>\n",
" <td>38.04280</td>\n",
" <td>114.5149</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>8</td>\n",
" <td>13</td>\n",
" <td>18</td>\n",
" <td>...</td>\n",
" <td>308</td>\n",
" <td>309</td>\n",
" <td>311</td>\n",
" <td>311</td>\n",
" <td>311</td>\n",
" <td>312</td>\n",
" <td>317</td>\n",
" <td>318</td>\n",
" <td>318</td>\n",
2020-03-02 21:22:49 +01:00
" <td>318</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>10</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Heilongjiang</td>\n",
" <td>Mainland China</td>\n",
" <td>47.86200</td>\n",
" <td>127.7615</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>9</td>\n",
" <td>15</td>\n",
" <td>21</td>\n",
" <td>...</td>\n",
" <td>479</td>\n",
" <td>479</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
" <td>480</td>\n",
2020-03-02 21:22:49 +01:00
" <td>480</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>11</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Henan</td>\n",
" <td>Mainland China</td>\n",
" <td>33.88202</td>\n",
" <td>113.6140</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>9</td>\n",
" <td>32</td>\n",
" <td>83</td>\n",
" <td>128</td>\n",
" <td>...</td>\n",
" <td>1267</td>\n",
" <td>1270</td>\n",
" <td>1271</td>\n",
" <td>1271</td>\n",
" <td>1271</td>\n",
" <td>1271</td>\n",
" <td>1272</td>\n",
" <td>1272</td>\n",
" <td>1272</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1272</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>12</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Hubei</td>\n",
" <td>Mainland China</td>\n",
" <td>30.97560</td>\n",
" <td>112.2707</td>\n",
" <td>444</td>\n",
" <td>444</td>\n",
" <td>549</td>\n",
" <td>761</td>\n",
" <td>1058</td>\n",
" <td>1423</td>\n",
" <td>...</td>\n",
" <td>62662</td>\n",
" <td>64084</td>\n",
" <td>64084</td>\n",
" <td>64287</td>\n",
" <td>64786</td>\n",
" <td>65187</td>\n",
" <td>65596</td>\n",
" <td>65914</td>\n",
" <td>66337</td>\n",
2020-03-02 21:22:49 +01:00
" <td>66907</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>13</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Hunan</td>\n",
" <td>Mainland China</td>\n",
" <td>27.61040</td>\n",
" <td>111.7088</td>\n",
" <td>4</td>\n",
" <td>9</td>\n",
" <td>24</td>\n",
" <td>43</td>\n",
" <td>69</td>\n",
" <td>100</td>\n",
" <td>...</td>\n",
" <td>1011</td>\n",
" <td>1013</td>\n",
" <td>1016</td>\n",
" <td>1016</td>\n",
" <td>1016</td>\n",
" <td>1016</td>\n",
" <td>1017</td>\n",
" <td>1017</td>\n",
" <td>1018</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1018</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>14</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Inner Mongolia</td>\n",
" <td>Mainland China</td>\n",
" <td>44.09350</td>\n",
" <td>113.9448</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>11</td>\n",
" <td>...</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" <td>75</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>15</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Jiangsu</td>\n",
" <td>Mainland China</td>\n",
" <td>32.97110</td>\n",
" <td>119.4550</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" <td>9</td>\n",
" <td>18</td>\n",
" <td>33</td>\n",
" <td>47</td>\n",
" <td>...</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" <td>631</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>16</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Jiangxi</td>\n",
" <td>Mainland China</td>\n",
" <td>27.61400</td>\n",
" <td>115.7221</td>\n",
" <td>2</td>\n",
" <td>7</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>36</td>\n",
" <td>72</td>\n",
" <td>...</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
" <td>934</td>\n",
2020-03-02 21:22:49 +01:00
" <td>935</td>\n",
2020-03-01 21:33:06 +01:00
" <td>935</td>\n",
" <td>935</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>17</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Jilin</td>\n",
" <td>Mainland China</td>\n",
" <td>43.66610</td>\n",
" <td>126.1923</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>6</td>\n",
" <td>...</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
" <td>91</td>\n",
2020-03-02 21:22:49 +01:00
" <td>93</td>\n",
2020-03-01 21:33:06 +01:00
" <td>93</td>\n",
" <td>93</td>\n",
" <td>93</td>\n",
" <td>93</td>\n",
" <td>93</td>\n",
" <td>93</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>18</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Liaoning</td>\n",
" <td>Mainland China</td>\n",
" <td>41.29560</td>\n",
" <td>122.6085</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>17</td>\n",
" <td>21</td>\n",
" <td>27</td>\n",
" <td>...</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
" <td>121</td>\n",
2020-03-02 21:22:49 +01:00
" <td>122</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>19</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Ningxia</td>\n",
" <td>Mainland China</td>\n",
" <td>37.26920</td>\n",
" <td>106.1655</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>7</td>\n",
" <td>...</td>\n",
" <td>71</td>\n",
" <td>71</td>\n",
" <td>71</td>\n",
" <td>71</td>\n",
" <td>71</td>\n",
" <td>71</td>\n",
" <td>72</td>\n",
" <td>72</td>\n",
" <td>73</td>\n",
2020-03-02 21:22:49 +01:00
" <td>73</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>20</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Qinghai</td>\n",
" <td>Mainland China</td>\n",
" <td>35.74520</td>\n",
" <td>95.9956</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>6</td>\n",
" <td>...</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>21</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Shaanxi</td>\n",
" <td>Mainland China</td>\n",
" <td>35.19170</td>\n",
" <td>108.8701</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>5</td>\n",
" <td>15</td>\n",
" <td>22</td>\n",
" <td>35</td>\n",
" <td>...</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" <td>245</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>22</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Shandong</td>\n",
" <td>Mainland China</td>\n",
" <td>36.34270</td>\n",
" <td>118.1498</td>\n",
" <td>2</td>\n",
" <td>6</td>\n",
" <td>15</td>\n",
" <td>27</td>\n",
" <td>46</td>\n",
" <td>75</td>\n",
" <td>...</td>\n",
" <td>749</td>\n",
" <td>750</td>\n",
" <td>754</td>\n",
" <td>755</td>\n",
" <td>756</td>\n",
" <td>756</td>\n",
" <td>756</td>\n",
" <td>756</td>\n",
" <td>756</td>\n",
2020-03-02 21:22:49 +01:00
" <td>758</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>23</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Shanghai</td>\n",
" <td>Mainland China</td>\n",
" <td>31.20200</td>\n",
" <td>121.4491</td>\n",
" <td>9</td>\n",
" <td>16</td>\n",
" <td>20</td>\n",
" <td>33</td>\n",
" <td>40</td>\n",
" <td>53</td>\n",
" <td>...</td>\n",
" <td>334</td>\n",
" <td>335</td>\n",
" <td>335</td>\n",
" <td>335</td>\n",
" <td>336</td>\n",
" <td>337</td>\n",
" <td>337</td>\n",
" <td>337</td>\n",
" <td>337</td>\n",
2020-03-02 21:22:49 +01:00
" <td>337</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>24</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Shanxi</td>\n",
" <td>Mainland China</td>\n",
" <td>37.57770</td>\n",
" <td>112.2922</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>6</td>\n",
" <td>9</td>\n",
" <td>13</td>\n",
" <td>...</td>\n",
" <td>132</td>\n",
" <td>132</td>\n",
" <td>132</td>\n",
2020-03-02 21:22:49 +01:00
" <td>133</td>\n",
2020-03-01 21:33:06 +01:00
" <td>133</td>\n",
" <td>133</td>\n",
" <td>133</td>\n",
" <td>133</td>\n",
" <td>133</td>\n",
" <td>133</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>25</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Sichuan</td>\n",
" <td>Mainland China</td>\n",
" <td>30.61710</td>\n",
" <td>102.7103</td>\n",
" <td>5</td>\n",
" <td>8</td>\n",
" <td>15</td>\n",
" <td>28</td>\n",
" <td>44</td>\n",
" <td>69</td>\n",
" <td>...</td>\n",
" <td>525</td>\n",
" <td>526</td>\n",
" <td>526</td>\n",
" <td>527</td>\n",
" <td>529</td>\n",
" <td>531</td>\n",
" <td>534</td>\n",
" <td>538</td>\n",
" <td>538</td>\n",
2020-03-02 21:22:49 +01:00
" <td>538</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>26</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Tianjin</td>\n",
" <td>Mainland China</td>\n",
" <td>39.30540</td>\n",
" <td>117.3230</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>8</td>\n",
" <td>10</td>\n",
" <td>14</td>\n",
" <td>23</td>\n",
" <td>...</td>\n",
" <td>132</td>\n",
" <td>135</td>\n",
" <td>135</td>\n",
" <td>135</td>\n",
" <td>135</td>\n",
" <td>135</td>\n",
" <td>136</td>\n",
" <td>136</td>\n",
" <td>136</td>\n",
2020-03-02 21:22:49 +01:00
" <td>136</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>27</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Tibet</td>\n",
" <td>Mainland China</td>\n",
" <td>31.69270</td>\n",
" <td>88.0924</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>28</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Xinjiang</td>\n",
" <td>Mainland China</td>\n",
" <td>41.11290</td>\n",
" <td>85.2401</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>5</td>\n",
" <td>...</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" <td>76</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>29</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Yunnan</td>\n",
" <td>Mainland China</td>\n",
" <td>24.97400</td>\n",
" <td>101.4870</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>11</td>\n",
" <td>16</td>\n",
" <td>26</td>\n",
" <td>...</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" <td>174</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>30</td>\n",
2020-03-01 21:33:06 +01:00
" <td>Zhejiang</td>\n",
" <td>Mainland China</td>\n",
" <td>29.18320</td>\n",
" <td>120.0934</td>\n",
" <td>10</td>\n",
" <td>27</td>\n",
" <td>43</td>\n",
" <td>62</td>\n",
" <td>104</td>\n",
" <td>128</td>\n",
" <td>...</td>\n",
" <td>1203</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
" <td>1205</td>\n",
2020-03-02 21:22:49 +01:00
" <td>1205</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" </tbody>\n",
"</table>\n",
2020-03-02 21:22:49 +01:00
"<p>31 rows × 44 columns</p>\n",
2020-03-01 21:33:06 +01:00
"</div>"
],
"text/plain": [
" Province/State Country/Region Lat Long 1/22/20 1/23/20 \\\n",
"0 Anhui Mainland China 31.82570 117.2264 1 9 \n",
"1 Beijing Mainland China 40.18240 116.4142 14 22 \n",
"2 Chongqing Mainland China 30.05720 107.8740 6 9 \n",
"3 Fujian Mainland China 26.07890 117.9874 1 5 \n",
"4 Gansu Mainland China 36.06110 103.8343 0 2 \n",
"5 Guangdong Mainland China 23.34170 113.4244 26 32 \n",
"6 Guangxi Mainland China 23.82980 108.7881 2 5 \n",
"7 Guizhou Mainland China 26.81540 106.8748 1 3 \n",
"8 Hainan Mainland China 19.19590 109.7453 4 5 \n",
"9 Hebei Mainland China 38.04280 114.5149 1 1 \n",
"10 Heilongjiang Mainland China 47.86200 127.7615 0 2 \n",
"11 Henan Mainland China 33.88202 113.6140 5 5 \n",
"12 Hubei Mainland China 30.97560 112.2707 444 444 \n",
"13 Hunan Mainland China 27.61040 111.7088 4 9 \n",
"14 Inner Mongolia Mainland China 44.09350 113.9448 0 0 \n",
"15 Jiangsu Mainland China 32.97110 119.4550 1 5 \n",
"16 Jiangxi Mainland China 27.61400 115.7221 2 7 \n",
"17 Jilin Mainland China 43.66610 126.1923 0 1 \n",
"18 Liaoning Mainland China 41.29560 122.6085 2 3 \n",
"19 Ningxia Mainland China 37.26920 106.1655 1 1 \n",
"20 Qinghai Mainland China 35.74520 95.9956 0 0 \n",
"21 Shaanxi Mainland China 35.19170 108.8701 0 3 \n",
"22 Shandong Mainland China 36.34270 118.1498 2 6 \n",
"23 Shanghai Mainland China 31.20200 121.4491 9 16 \n",
"24 Shanxi Mainland China 37.57770 112.2922 1 1 \n",
"25 Sichuan Mainland China 30.61710 102.7103 5 8 \n",
"26 Tianjin Mainland China 39.30540 117.3230 4 4 \n",
"27 Tibet Mainland China 31.69270 88.0924 0 0 \n",
"28 Xinjiang Mainland China 41.11290 85.2401 0 2 \n",
"29 Yunnan Mainland China 24.97400 101.4870 1 2 \n",
"30 Zhejiang Mainland China 29.18320 120.0934 10 27 \n",
"\n",
2020-03-02 21:22:49 +01:00
" 1/24/20 1/25/20 1/26/20 1/27/20 ... 2/21/20 2/22/20 2/23/20 \\\n",
"0 15 39 60 70 ... 988 989 989 \n",
"1 36 41 68 80 ... 396 399 399 \n",
"2 27 57 75 110 ... 572 573 575 \n",
2020-03-01 21:33:06 +01:00
"3 10 18 35 59 ... 293 293 293 \n",
"4 2 4 7 14 ... 91 91 91 \n",
2020-03-02 21:22:49 +01:00
"5 53 78 111 151 ... 1333 1339 1342 \n",
"6 23 23 36 46 ... 246 249 249 \n",
2020-03-01 21:33:06 +01:00
"7 3 4 5 7 ... 146 146 146 \n",
"8 8 19 22 33 ... 168 168 168 \n",
2020-03-02 21:22:49 +01:00
"9 2 8 13 18 ... 308 309 311 \n",
"10 4 9 15 21 ... 479 479 480 \n",
"11 9 32 83 128 ... 1267 1270 1271 \n",
"12 549 761 1058 1423 ... 62662 64084 64084 \n",
"13 24 43 69 100 ... 1011 1013 1016 \n",
2020-03-01 21:33:06 +01:00
"14 1 7 7 11 ... 75 75 75 \n",
"15 9 18 33 47 ... 631 631 631 \n",
"16 18 18 36 72 ... 934 934 934 \n",
"17 3 4 4 6 ... 91 91 91 \n",
"18 4 17 21 27 ... 121 121 121 \n",
"19 2 3 4 7 ... 71 71 71 \n",
"20 0 1 1 6 ... 18 18 18 \n",
"21 5 15 22 35 ... 245 245 245 \n",
2020-03-02 21:22:49 +01:00
"22 15 27 46 75 ... 749 750 754 \n",
"23 20 33 40 53 ... 334 335 335 \n",
2020-03-01 21:33:06 +01:00
"24 1 6 9 13 ... 132 132 132 \n",
2020-03-02 21:22:49 +01:00
"25 15 28 44 69 ... 525 526 526 \n",
"26 8 10 14 23 ... 132 135 135 \n",
2020-03-01 21:33:06 +01:00
"27 0 0 0 0 ... 1 1 1 \n",
"28 2 3 4 5 ... 76 76 76 \n",
"29 5 11 16 26 ... 174 174 174 \n",
2020-03-02 21:22:49 +01:00
"30 43 62 104 128 ... 1203 1205 1205 \n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
" 2/24/20 2/25/20 2/26/20 2/27/20 2/28/20 2/29/20 3/1/20 \n",
"0 989 989 989 989 990 990 990 \n",
"1 399 400 400 410 410 411 413 \n",
"2 576 576 576 576 576 576 576 \n",
"3 293 294 294 296 296 296 296 \n",
"4 91 91 91 91 91 91 91 \n",
"5 1345 1347 1347 1347 1348 1349 1349 \n",
"6 251 252 252 252 252 252 252 \n",
"7 146 146 146 146 146 146 146 \n",
"8 168 168 168 168 168 168 168 \n",
"9 311 311 312 317 318 318 318 \n",
"10 480 480 480 480 480 480 480 \n",
"11 1271 1271 1271 1272 1272 1272 1272 \n",
"12 64287 64786 65187 65596 65914 66337 66907 \n",
"13 1016 1016 1016 1017 1017 1018 1018 \n",
"14 75 75 75 75 75 75 75 \n",
"15 631 631 631 631 631 631 631 \n",
"16 934 934 934 934 935 935 935 \n",
"17 93 93 93 93 93 93 93 \n",
"18 121 121 121 121 121 121 122 \n",
"19 71 71 71 72 72 73 73 \n",
"20 18 18 18 18 18 18 18 \n",
"21 245 245 245 245 245 245 245 \n",
"22 755 756 756 756 756 756 758 \n",
"23 335 336 337 337 337 337 337 \n",
"24 133 133 133 133 133 133 133 \n",
"25 527 529 531 534 538 538 538 \n",
"26 135 135 135 136 136 136 136 \n",
"27 1 1 1 1 1 1 1 \n",
"28 76 76 76 76 76 76 76 \n",
"29 174 174 174 174 174 174 174 \n",
"30 1205 1205 1205 1205 1205 1205 1205 \n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"[31 rows x 44 columns]"
2020-03-01 21:33:06 +01:00
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 10,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_china = data[data[\"Country/Region\"] == \"Mainland China\"]\n",
"data_china"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 11,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1205\n",
"1 [Zhejiang, Mainland China, 29.1832, 120.0934, ...\n",
"Name: values, dtype: object"
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 11,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#data_italy.values[0,[3]]\n",
"#type(data_italy.values)\n",
"df = {}\n",
"for i in range(len(data_china.values)):\n",
" for j in range(4, len(data_china.values[i])):\n",
" df[\"values\"] = [data_china.values[i][j],data_china.values[i]]\n",
"pd.DataFrame(df)[\"values\"]"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 12,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"40.1824"
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 12,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_china.values[1][2]"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 13,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [],
"source": [
"china_cities = []\n",
"count = 1\n",
"ind = []\n",
"for i in range(len(data_china.values)):\n",
" count = 0\n",
" for j in range(len(data_china.values[i][4:])):\n",
" china_cities+= [data_china.values[i][0]]\n",
" ind += [count]\n",
" count += 1"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 14,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [],
"source": [
"china_values=[]\n",
"for i in range(len(data_china.values)):\n",
" for j in range(4,len(data_china.values[i])): \n",
" china_values+= [data_china.values[i][j]]\n",
" "
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 15,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [],
"source": [
"df_china = pd.DataFrame(list(zip(china_values, china_cities,ind)), \n",
" columns =['Values', 'Cities','Lags']) "
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 16,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
2020-03-02 21:22:49 +01:00
" <th></th>\n",
" <th>Values</th>\n",
" <th>Cities</th>\n",
" <th>Lags</th>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
2020-03-02 21:22:49 +01:00
" </thead>\n",
" <tbody>\n",
2020-03-01 22:50:58 +01:00
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>0</td>\n",
" <td>1</td>\n",
" <td>Anhui</td>\n",
" <td>0</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1</td>\n",
" <td>9</td>\n",
" <td>Anhui</td>\n",
" <td>1</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>2</td>\n",
" <td>15</td>\n",
" <td>Anhui</td>\n",
" <td>2</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>3</td>\n",
" <td>39</td>\n",
" <td>Anhui</td>\n",
" <td>3</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>4</td>\n",
" <td>60</td>\n",
" <td>Anhui</td>\n",
" <td>4</td>\n",
2020-03-01 21:33:06 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
2020-03-01 22:50:58 +01:00
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1235</td>\n",
2020-03-01 21:33:06 +01:00
" <td>1205</td>\n",
" <td>Zhejiang</td>\n",
" <td>35</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1236</td>\n",
2020-03-01 21:33:06 +01:00
" <td>1205</td>\n",
" <td>Zhejiang</td>\n",
" <td>36</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1237</td>\n",
2020-03-01 21:33:06 +01:00
" <td>1205</td>\n",
" <td>Zhejiang</td>\n",
" <td>37</td>\n",
" </tr>\n",
" <tr>\n",
2020-03-02 21:22:49 +01:00
" <td>1238</td>\n",
2020-03-01 21:33:06 +01:00
" <td>1205</td>\n",
" <td>Zhejiang</td>\n",
" <td>38</td>\n",
" </tr>\n",
2020-03-02 21:22:49 +01:00
" <tr>\n",
" <td>1239</td>\n",
" <td>1205</td>\n",
" <td>Zhejiang</td>\n",
" <td>39</td>\n",
" </tr>\n",
2020-03-01 21:33:06 +01:00
" </tbody>\n",
"</table>\n",
2020-03-02 21:22:49 +01:00
"<p>1240 rows × 3 columns</p>\n",
2020-03-01 21:33:06 +01:00
"</div>"
],
"text/plain": [
" Values Cities Lags\n",
"0 1 Anhui 0\n",
"1 9 Anhui 1\n",
"2 15 Anhui 2\n",
"3 39 Anhui 3\n",
"4 60 Anhui 4\n",
"... ... ... ...\n",
2020-03-02 21:22:49 +01:00
"1235 1205 Zhejiang 35\n",
"1236 1205 Zhejiang 36\n",
"1237 1205 Zhejiang 37\n",
"1238 1205 Zhejiang 38\n",
"1239 1205 Zhejiang 39\n",
2020-03-01 21:33:06 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"[1240 rows x 3 columns]"
2020-03-01 21:33:06 +01:00
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 16,
2020-03-01 21:33:06 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_china"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 17,
2020-03-01 21:33:06 +01:00
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Anhui<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Anhui",
"line": {
"color": "#636efa",
"dash": "solid"
},
"mode": "lines",
"name": "Anhui",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
9,
15,
39,
60,
70,
106,
152,
200,
237,
297,
340,
408,
480,
530,
591,
665,
733,
779,
830,
860,
889,
910,
934,
950,
962,
973,
982,
986,
987,
988,
989,
989,
989,
989,
989,
989,
990,
2020-03-02 21:22:49 +01:00
990,
2020-03-01 21:33:06 +01:00
990
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Beijing<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Beijing",
"line": {
"color": "#EF553B",
"dash": "solid"
},
"mode": "lines",
"name": "Beijing",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
14,
22,
36,
41,
68,
80,
91,
111,
114,
139,
168,
191,
212,
228,
253,
274,
297,
315,
326,
337,
342,
352,
366,
372,
375,
380,
381,
387,
393,
395,
396,
399,
399,
399,
400,
400,
410,
410,
2020-03-02 21:22:49 +01:00
411,
413
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Chongqing<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Chongqing",
"line": {
"color": "#00cc96",
"dash": "solid"
},
"mode": "lines",
"name": "Chongqing",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
6,
9,
27,
57,
75,
110,
132,
147,
182,
211,
247,
300,
337,
366,
389,
411,
426,
428,
468,
486,
505,
518,
529,
537,
544,
551,
553,
555,
560,
567,
572,
573,
575,
576,
576,
576,
576,
576,
2020-03-02 21:22:49 +01:00
576,
2020-03-01 21:33:06 +01:00
576
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Fujian<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Fujian",
"line": {
"color": "#ab63fa",
"dash": "solid"
},
"mode": "lines",
"name": "Fujian",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
5,
10,
18,
35,
59,
80,
84,
101,
120,
144,
159,
179,
194,
205,
215,
224,
239,
250,
261,
267,
272,
279,
281,
285,
287,
290,
292,
293,
293,
293,
293,
293,
293,
294,
294,
296,
296,
2020-03-02 21:22:49 +01:00
296,
2020-03-01 21:33:06 +01:00
296
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Gansu<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Gansu",
"line": {
"color": "#FFA15A",
"dash": "solid"
},
"mode": "lines",
"name": "Gansu",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
2,
2,
4,
7,
14,
19,
24,
26,
29,
40,
51,
55,
57,
62,
62,
67,
79,
83,
83,
86,
87,
90,
90,
90,
90,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
2020-03-02 21:22:49 +01:00
91,
2020-03-01 21:33:06 +01:00
91
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guangdong<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guangdong",
"line": {
"color": "#19d3f3",
"dash": "solid"
},
"mode": "lines",
"name": "Guangdong",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
26,
32,
53,
78,
111,
151,
207,
277,
354,
436,
535,
632,
725,
813,
895,
970,
1034,
1095,
1131,
1159,
1177,
1219,
1241,
1261,
1294,
1316,
1322,
1328,
1331,
1332,
1333,
1339,
1342,
1345,
1347,
1347,
1347,
1348,
2020-03-02 21:22:49 +01:00
1349,
2020-03-01 21:33:06 +01:00
1349
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guangxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guangxi",
"line": {
"color": "#FF6692",
"dash": "solid"
},
"mode": "lines",
"name": "Guangxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
5,
23,
23,
36,
46,
51,
58,
78,
87,
100,
111,
127,
139,
150,
168,
172,
183,
195,
210,
215,
222,
222,
226,
235,
237,
238,
242,
244,
245,
246,
249,
249,
251,
252,
252,
252,
252,
2020-03-02 21:22:49 +01:00
252,
2020-03-01 21:33:06 +01:00
252
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guizhou<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guizhou",
"line": {
"color": "#B6E880",
"dash": "solid"
},
"mode": "lines",
"name": "Guizhou",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
3,
3,
4,
5,
7,
9,
9,
12,
29,
29,
38,
46,
58,
64,
71,
81,
89,
99,
109,
127,
133,
135,
140,
143,
144,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
2020-03-02 21:22:49 +01:00
146,
2020-03-01 21:33:06 +01:00
146
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hainan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hainan",
"line": {
"color": "#FF97FF",
"dash": "solid"
},
"mode": "lines",
"name": "Hainan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
5,
8,
19,
22,
33,
40,
43,
46,
52,
62,
64,
72,
80,
99,
106,
117,
124,
131,
138,
144,
157,
157,
159,
162,
162,
163,
163,
168,
168,
168,
168,
168,
168,
168,
168,
168,
168,
2020-03-02 21:22:49 +01:00
168,
2020-03-01 21:33:06 +01:00
168
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hebei<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hebei",
"line": {
"color": "#FECB52",
"dash": "solid"
},
"mode": "lines",
"name": "Hebei",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
2,
8,
13,
18,
33,
48,
65,
82,
96,
104,
113,
126,
135,
157,
172,
195,
206,
218,
239,
251,
265,
283,
291,
300,
301,
306,
306,
307,
308,
309,
311,
311,
311,
312,
317,
318,
2020-03-02 21:22:49 +01:00
318,
2020-03-01 21:33:06 +01:00
318
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Heilongjiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Heilongjiang",
"line": {
"color": "#636efa",
"dash": "solid"
},
"mode": "lines",
"name": "Heilongjiang",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
2,
4,
9,
15,
21,
33,
38,
44,
59,
80,
95,
121,
155,
190,
227,
277,
295,
307,
331,
360,
378,
395,
419,
425,
445,
457,
464,
470,
476,
479,
479,
480,
480,
480,
480,
480,
480,
2020-03-02 21:22:49 +01:00
480,
2020-03-01 21:33:06 +01:00
480
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Henan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Henan",
"line": {
"color": "#EF553B",
"dash": "solid"
},
"mode": "lines",
"name": "Henan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
5,
5,
9,
32,
83,
128,
168,
206,
278,
352,
422,
493,
566,
675,
764,
851,
914,
981,
1033,
1073,
1105,
1135,
1169,
1184,
1212,
1231,
1246,
1257,
1262,
1265,
1267,
1270,
1271,
1271,
1271,
1271,
1272,
1272,
2020-03-02 21:22:49 +01:00
1272,
2020-03-01 21:33:06 +01:00
1272
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hubei<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hubei",
"line": {
"color": "#00cc96",
"dash": "solid"
},
"mode": "lines",
"name": "Hubei",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
444,
444,
549,
761,
1058,
1423,
3554,
3554,
4903,
5806,
7153,
11177,
13522,
16678,
19665,
22112,
24953,
27100,
29631,
31728,
33366,
33366,
48206,
54406,
56249,
58182,
59989,
61682,
62031,
62442,
62662,
64084,
64084,
64287,
64786,
65187,
65596,
65914,
2020-03-02 21:22:49 +01:00
66337,
66907
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hunan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hunan",
"line": {
"color": "#ab63fa",
"dash": "solid"
},
"mode": "lines",
"name": "Hunan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
9,
24,
43,
69,
100,
143,
221,
277,
332,
389,
463,
521,
593,
661,
711,
772,
803,
838,
879,
912,
946,
968,
988,
1001,
1004,
1006,
1007,
1008,
1010,
1011,
1013,
1016,
1016,
1016,
1016,
1017,
1017,
2020-03-02 21:22:49 +01:00
1018,
2020-03-01 21:33:06 +01:00
1018
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Inner Mongolia<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Inner Mongolia",
"line": {
"color": "#FFA15A",
"dash": "solid"
},
"mode": "lines",
"name": "Inner Mongolia",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
1,
7,
7,
11,
15,
16,
19,
20,
23,
27,
34,
35,
42,
46,
50,
52,
54,
58,
58,
60,
61,
65,
68,
70,
72,
73,
75,
75,
75,
75,
75,
75,
75,
75,
75,
75,
2020-03-02 21:22:49 +01:00
75,
2020-03-01 21:33:06 +01:00
75
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jiangsu<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jiangsu",
"line": {
"color": "#19d3f3",
"dash": "solid"
},
"mode": "lines",
"name": "Jiangsu",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
5,
9,
18,
33,
47,
70,
99,
129,
168,
202,
236,
271,
308,
341,
373,
408,
439,
468,
492,
515,
543,
570,
593,
604,
617,
626,
629,
631,
631,
631,
631,
631,
631,
631,
631,
631,
631,
2020-03-02 21:22:49 +01:00
631,
2020-03-01 21:33:06 +01:00
631
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jiangxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jiangxi",
"line": {
"color": "#FF6692",
"dash": "solid"
},
"mode": "lines",
"name": "Jiangxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
7,
18,
18,
36,
72,
109,
109,
162,
240,
286,
333,
391,
476,
548,
600,
661,
698,
740,
771,
804,
844,
872,
900,
913,
925,
930,
933,
934,
934,
934,
934,
934,
934,
934,
934,
934,
935,
2020-03-02 21:22:49 +01:00
935,
2020-03-01 21:33:06 +01:00
935
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jilin<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jilin",
"line": {
"color": "#B6E880",
"dash": "solid"
},
"mode": "lines",
"name": "Jilin",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
1,
3,
4,
4,
6,
8,
9,
14,
14,
17,
23,
31,
42,
54,
59,
65,
69,
78,
80,
81,
83,
84,
86,
88,
89,
89,
89,
90,
91,
91,
91,
91,
93,
93,
93,
93,
93,
2020-03-02 21:22:49 +01:00
93,
2020-03-01 21:33:06 +01:00
93
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Liaoning<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Liaoning",
"line": {
"color": "#FF97FF",
"dash": "solid"
},
"mode": "lines",
"name": "Liaoning",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
3,
4,
17,
21,
27,
34,
39,
41,
48,
64,
70,
74,
81,
89,
94,
99,
105,
107,
108,
111,
116,
117,
119,
119,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
2020-03-02 21:22:49 +01:00
121,
122
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Ningxia<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Ningxia",
"line": {
"color": "#FECB52",
"dash": "solid"
},
"mode": "lines",
"name": "Ningxia",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
2,
3,
4,
7,
11,
12,
17,
21,
26,
28,
31,
34,
34,
40,
43,
45,
45,
49,
53,
58,
64,
67,
70,
70,
70,
70,
71,
71,
71,
71,
71,
71,
71,
71,
72,
72,
2020-03-02 21:22:49 +01:00
73,
2020-03-01 21:33:06 +01:00
73
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Qinghai<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Qinghai",
"line": {
"color": "#636efa",
"dash": "solid"
},
"mode": "lines",
"name": "Qinghai",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
1,
1,
6,
6,
6,
8,
8,
9,
11,
13,
15,
17,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
2020-03-02 21:22:49 +01:00
18,
2020-03-01 21:33:06 +01:00
18
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shaanxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shaanxi",
"line": {
"color": "#EF553B",
"dash": "solid"
},
"mode": "lines",
"name": "Shaanxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
3,
5,
15,
22,
35,
46,
56,
63,
87,
101,
116,
128,
142,
165,
173,
184,
195,
208,
213,
219,
225,
229,
230,
232,
236,
240,
240,
242,
245,
245,
245,
245,
245,
245,
245,
245,
245,
2020-03-02 21:22:49 +01:00
245,
2020-03-01 21:33:06 +01:00
245
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shandong<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shandong",
"line": {
"color": "#00cc96",
"dash": "solid"
},
"mode": "lines",
"name": "Shandong",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
6,
15,
27,
46,
75,
95,
130,
158,
184,
206,
230,
259,
275,
307,
347,
386,
416,
444,
466,
487,
497,
509,
523,
532,
537,
541,
543,
544,
546,
749,
750,
754,
755,
756,
756,
756,
756,
2020-03-02 21:22:49 +01:00
756,
758
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shanghai<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shanghai",
"line": {
"color": "#ab63fa",
"dash": "solid"
},
"mode": "lines",
"name": "Shanghai",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
9,
16,
20,
33,
40,
53,
66,
96,
112,
135,
169,
182,
203,
219,
243,
257,
277,
286,
293,
299,
303,
311,
315,
318,
326,
328,
333,
333,
333,
334,
334,
335,
335,
335,
336,
337,
337,
337,
2020-03-02 21:22:49 +01:00
337,
2020-03-01 21:33:06 +01:00
337
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shanxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shanxi",
"line": {
"color": "#FFA15A",
"dash": "solid"
},
"mode": "lines",
"name": "Shanxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
1,
6,
9,
13,
27,
27,
35,
39,
47,
66,
74,
81,
81,
96,
104,
115,
119,
119,
124,
126,
126,
127,
128,
129,
130,
131,
131,
132,
132,
132,
132,
133,
133,
133,
133,
133,
2020-03-02 21:22:49 +01:00
133,
2020-03-01 21:33:06 +01:00
133
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Sichuan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Sichuan",
"line": {
"color": "#19d3f3",
"dash": "solid"
},
"mode": "lines",
"name": "Sichuan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
5,
8,
15,
28,
44,
69,
90,
108,
142,
177,
207,
231,
254,
282,
301,
321,
344,
364,
386,
405,
417,
436,
451,
463,
470,
481,
495,
508,
514,
520,
525,
526,
526,
527,
529,
531,
534,
538,
2020-03-02 21:22:49 +01:00
538,
2020-03-01 21:33:06 +01:00
538
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Tianjin<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Tianjin",
"line": {
"color": "#FF6692",
"dash": "solid"
},
"mode": "lines",
"name": "Tianjin",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
4,
8,
10,
14,
23,
24,
27,
31,
32,
41,
48,
60,
67,
69,
79,
81,
88,
91,
95,
106,
112,
119,
120,
122,
124,
125,
128,
130,
131,
132,
135,
135,
135,
135,
135,
136,
136,
2020-03-02 21:22:49 +01:00
136,
2020-03-01 21:33:06 +01:00
136
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Tibet<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Tibet",
"line": {
"color": "#B6E880",
"dash": "solid"
},
"mode": "lines",
"name": "Tibet",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2020-03-02 21:22:49 +01:00
1,
2020-03-01 21:33:06 +01:00
1
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Xinjiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Xinjiang",
"line": {
"color": "#FF97FF",
"dash": "solid"
},
"mode": "lines",
"name": "Xinjiang",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
2,
2,
3,
4,
5,
10,
13,
14,
17,
18,
21,
24,
29,
32,
36,
39,
42,
45,
49,
55,
59,
63,
65,
70,
71,
75,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76,
2020-03-02 21:22:49 +01:00
76,
2020-03-01 21:33:06 +01:00
76
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Yunnan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Yunnan",
"line": {
"color": "#FECB52",
"dash": "solid"
},
"mode": "lines",
"name": "Yunnan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
2,
5,
11,
16,
26,
44,
55,
70,
83,
93,
105,
117,
122,
128,
133,
138,
138,
141,
149,
153,
154,
156,
162,
168,
171,
171,
172,
172,
174,
174,
174,
174,
174,
174,
174,
174,
174,
2020-03-02 21:22:49 +01:00
174,
2020-03-01 21:33:06 +01:00
174
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Zhejiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Zhejiang",
"line": {
"color": "#636efa",
"dash": "solid"
},
"mode": "lines",
"name": "Zhejiang",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
10,
27,
43,
62,
104,
128,
173,
296,
428,
538,
599,
661,
724,
829,
895,
954,
1006,
1048,
1075,
1092,
1117,
1131,
1145,
1155,
1162,
1167,
1171,
1172,
1174,
1175,
1203,
1205,
1205,
1205,
1205,
1205,
1205,
1205,
2020-03-02 21:22:49 +01:00
1205,
2020-03-01 21:33:06 +01:00
1205
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"title": {
"text": "Cities"
},
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Lags"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
2020-03-02 21:22:49 +01:00
" <div id=\"ad9bb659-7254-4e05-b1cd-3ecb4337e720\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
2020-03-01 21:33:06 +01:00
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
2020-03-02 21:22:49 +01:00
" if (document.getElementById(\"ad9bb659-7254-4e05-b1cd-3ecb4337e720\")) {\n",
2020-03-01 21:33:06 +01:00
" Plotly.newPlot(\n",
2020-03-02 21:22:49 +01:00
" 'ad9bb659-7254-4e05-b1cd-3ecb4337e720',\n",
" [{\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Anhui<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Anhui\", \"line\": {\"color\": \"#636efa\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Anhui\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [1, 9, 15, 39, 60, 70, 106, 152, 200, 237, 297, 340, 408, 480, 530, 591, 665, 733, 779, 830, 860, 889, 910, 934, 950, 962, 973, 982, 986, 987, 988, 989, 989, 989, 989, 989, 989, 990, 990, 990], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Beijing<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Beijing\", \"line\": {\"color\": \"#EF553B\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Beijing\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [14, 22, 36, 41, 68, 80, 91, 111, 114, 139, 168, 191, 212, 228, 253, 274, 297, 315, 326, 337, 342, 352, 366, 372, 375, 380, 381, 387, 393, 395, 396, 399, 399, 399, 400, 400, 410, 410, 411, 413], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Chongqing<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Chongqing\", \"line\": {\"color\": \"#00cc96\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Chongqing\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [6, 9, 27, 57, 75, 110, 132, 147, 182, 211, 247, 300, 337, 366, 389, 411, 426, 428, 468, 486, 505, 518, 529, 537, 544, 551, 553, 555, 560, 567, 572, 573, 575, 576, 576, 576, 576, 576, 576, 576], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Fujian<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Fujian\", \"line\": {\"color\": \"#ab63fa\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Fujian\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [1, 5, 10, 18, 35, 59, 80, 84, 101, 120, 144, 159, 179, 194, 205, 215, 224, 239, 250, 261, 267, 272, 279, 281, 285, 287, 290, 292, 293, 293, 293, 293, 293, 293, 294, 294, 296, 296, 296, 296], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Gansu<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Gansu\", \"line\": {\"color\": \"#FFA15A\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Gansu\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [0, 2, 2, 4, 7, 14, 19, 24, 26, 29, 40, 51, 55, 57, 62, 62, 67, 79, 83, 83, 86, 87, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Guangdong<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Guangdong\", \"line\": {\"color\": \"#19d3f3\", \"dash\": \"solid\"}, \"mode\": \"lines\", \"name\": \"Guangdong\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [26, 32, 53, 78, 111, 151, 207, 277, 354, 436, 535, 632, 725, 813, 895, 970, 1034, 1095, 1131, 1159, 1177, 1219, 1241, 1261, 1294, 1316, 1322, 1328, 1331, 1332, 1333, 1339, 1342, 1345, 1347, 1347, 1347, 1348, 1349, 1349], \"yaxis\": \"
2020-03-01 21:33:06 +01:00
" {\"legend\": {\"title\": {\"text\": \"Cities\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scatterg
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
2020-03-02 21:22:49 +01:00
"var gd = document.getElementById('ad9bb659-7254-4e05-b1cd-3ecb4337e720');\n",
2020-03-01 21:33:06 +01:00
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly.express as px\n",
"fig = px.line(df_china, x=\"Lags\", y = \"Values\", color=\"Cities\")\n",
"fig.show()"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 18,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
2020-03-02 21:22:49 +01:00
"data": {
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<ggplot: (-9223371897234348628)>"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
2020-03-01 21:33:06 +01:00
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from pandas.api.types import CategoricalDtype\n",
"from plotnine import *\n",
"from plotnine.data import mpg\n",
"(ggplot(df_china)\n",
" + aes(x='Lags', y='Values', color='Cities')\n",
" + geom_line()\n",
" + labs(title='China Covid-19 Virus cases', x='Days', y='Number of case')\n",
")"
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 19,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Anhui<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Anhui",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "Anhui",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
9,
15,
39,
60,
70,
106,
152,
200,
237,
297,
340,
408,
480,
530,
591,
665,
733,
779,
830,
860,
889,
910,
934,
950,
962,
973,
982,
986,
987,
988,
989,
989,
989,
989,
989,
989,
990,
2020-03-02 21:22:49 +01:00
990,
2020-03-01 21:33:06 +01:00
990
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 30.4596 * Lags + 52.7134<br>R<sup>2</sup>=0.879861<br><br>Cities=Anhui<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Anhui",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "lines",
"name": "Anhui",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
52.7134146341468,
83.17298311444696,
113.63255159474713,
144.09212007504726,
174.55168855534743,
205.0112570356476,
235.47082551594775,
265.9303939962479,
296.3899624765481,
326.8495309568482,
357.30909943714835,
387.7686679174485,
418.2282363977487,
448.68780487804884,
479.147373358349,
509.60694183864916,
540.0665103189493,
570.5260787992495,
600.9856472795497,
631.4452157598498,
661.90478424015,
692.3643527204501,
722.8239212007503,
753.2834896810505,
783.7430581613506,
814.2026266416508,
844.662195121951,
875.1217636022511,
905.5813320825513,
936.0409005628514,
966.5004690431516,
996.9600375234518,
1027.4196060037518,
1057.879174484052,
1088.3387429643522,
1118.7983114446524,
1149.2578799249525,
1179.7174484052528,
1210.1770168855528,
1240.636585365853
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Beijing<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Beijing",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "markers",
"name": "Beijing",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
14,
22,
36,
41,
68,
80,
91,
111,
114,
139,
168,
191,
212,
228,
253,
274,
297,
315,
326,
337,
342,
352,
366,
372,
375,
380,
381,
387,
393,
395,
396,
399,
399,
399,
400,
400,
410,
410,
2020-03-02 21:22:49 +01:00
411,
413
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 11.0498 * Lags + 61.9537<br>R<sup>2</sup>=0.890561<br><br>Cities=Beijing<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Beijing",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "lines",
"name": "Beijing",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
61.95365853658552,
73.00347091932473,
84.05328330206393,
95.10309568480312,
106.15290806754233,
117.20272045028153,
128.25253283302072,
139.30234521575994,
150.35215759849913,
161.40196998123832,
172.45178236397754,
183.50159474671673,
194.55140712945592,
205.60121951219514,
216.65103189493433,
227.70084427767355,
238.75065666041274,
249.80046904315194,
260.8502814258911,
271.90009380863034,
282.94990619136956,
293.9997185741088,
305.04953095684795,
316.09934333958716,
327.1491557223263,
338.19896810506555,
349.24878048780477,
360.298592870544,
371.34840525328315,
382.39821763602237,
393.4480300187616,
404.49784240150075,
415.54765478423997,
426.5974671669792,
437.64727954971835,
448.69709193245757,
459.7469043151968,
470.79671669793595,
481.84652908067517,
492.8963414634144
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Chongqing<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Chongqing",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "markers",
"name": "Chongqing",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
6,
9,
27,
57,
75,
110,
132,
147,
182,
211,
247,
300,
337,
366,
389,
411,
426,
428,
468,
486,
505,
518,
529,
537,
544,
551,
553,
555,
560,
567,
572,
573,
575,
576,
576,
576,
576,
576,
2020-03-02 21:22:49 +01:00
576,
2020-03-01 21:33:06 +01:00
576
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 15.8057 * Lags + 91.4134<br>R<sup>2</sup>=0.865912<br><br>Cities=Chongqing<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Chongqing",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "lines",
"name": "Chongqing",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
91.41341463414656,
107.21913696060058,
123.0248592870546,
138.83058161350863,
154.63630393996263,
170.44202626641663,
186.24774859287066,
202.0534709193247,
217.8591932457787,
233.66491557223273,
249.47063789868673,
265.2763602251407,
281.0820825515948,
296.88780487804877,
312.6935272045028,
328.49924953095683,
344.3049718574108,
360.1106941838649,
375.91641651031887,
391.72213883677284,
407.52786116322693,
423.3335834896809,
439.1393058161349,
454.94502814258897,
470.75075046904294,
486.55647279549703,
502.362195121951,
518.167917448405,
533.9736397748591,
549.779362101313,
565.585084427767,
581.3908067542211,
597.1965290806751,
613.002251407129,
628.8079737335831,
644.6136960600371,
660.4194183864912,
676.2251407129452,
692.0308630393992,
707.8365853658532
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Fujian<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Fujian",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "markers",
"name": "Fujian",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
5,
10,
18,
35,
59,
80,
84,
101,
120,
144,
159,
179,
194,
205,
215,
224,
239,
250,
261,
267,
272,
279,
281,
285,
287,
290,
292,
293,
293,
293,
293,
293,
293,
294,
294,
296,
296,
2020-03-02 21:22:49 +01:00
296,
2020-03-01 21:33:06 +01:00
296
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 8.02814 * Lags + 52.6012<br>R<sup>2</sup>=0.840346<br><br>Cities=Fujian<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Fujian",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "lines",
"name": "Fujian",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
52.60121951219525,
60.62936210131344,
68.65750469043164,
76.68564727954983,
84.71378986866802,
92.7419324577862,
100.7700750469044,
108.7982176360226,
116.82636022514077,
124.85450281425898,
132.88264540337715,
140.91078799249536,
148.93893058161356,
156.96707317073174,
164.99521575984994,
173.02335834896812,
181.05150093808632,
189.07964352720452,
197.1077861163227,
205.1359287054409,
213.16407129455908,
221.19221388367728,
229.22035647279546,
237.24849906191366,
245.27664165103187,
253.30478424015004,
261.3329268292682,
269.3610694183864,
277.3892120075046,
285.4173545966228,
293.445497185741,
301.4736397748592,
309.5017823639774,
317.5299249530956,
325.5580675422138,
333.58621013133194,
341.61435272045014,
349.64249530956835,
357.67063789868655,
365.6987804878047
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Gansu<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Gansu",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "markers",
"name": "Gansu",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
2,
2,
4,
7,
14,
19,
24,
26,
29,
40,
51,
55,
57,
62,
62,
67,
79,
83,
83,
86,
87,
90,
90,
90,
90,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
91,
2020-03-02 21:22:49 +01:00
91,
2020-03-01 21:33:06 +01:00
91
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2.58002 * Lags + 14.0146<br>R<sup>2</sup>=0.821566<br><br>Cities=Gansu<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Gansu",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "lines",
"name": "Gansu",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
14.014634146341503,
16.59465290806758,
19.174671669793653,
21.75469043151973,
24.334709193245807,
26.914727954971884,
29.49474671669796,
32.074765478424034,
34.65478424015011,
37.23480300187619,
39.81482176360227,
42.394840525328334,
44.974859287054414,
47.554878048780495,
50.13489681050656,
52.71491557223264,
55.29493433395872,
57.87495309568479,
60.45497185741087,
63.03499061913695,
65.61500938086303,
68.1950281425891,
70.77504690431518,
73.35506566604126,
75.93508442776732,
78.5151031894934,
81.09512195121948,
83.67514071294556,
86.25515947467163,
88.83517823639771,
91.41519699812379,
93.99521575984986,
96.57523452157594,
99.15525328330202,
101.73527204502808,
104.31529080675416,
106.89530956848024,
109.47532833020631,
112.05534709193239,
114.63536585365847
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guangdong<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guangdong",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "markers",
"name": "Guangdong",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
26,
32,
53,
78,
111,
151,
207,
277,
354,
436,
535,
632,
725,
813,
895,
970,
1034,
1095,
1131,
1159,
1177,
1219,
1241,
1261,
1294,
1316,
1322,
1328,
1331,
1332,
1333,
1339,
1342,
1345,
1347,
1347,
1347,
1348,
2020-03-02 21:22:49 +01:00
1349,
2020-03-01 21:33:06 +01:00
1349
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 38.6686 * Lags + 170.488<br>R<sup>2</sup>=0.853271<br><br>Cities=Guangdong<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Guangdong",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "lines",
"name": "Guangdong",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
170.4878048780494,
209.15637898686737,
247.82495309568534,
286.4935272045033,
325.1621013133213,
363.8306754221393,
402.4992495309573,
441.1678236397752,
479.8363977485932,
518.5049718574112,
557.1735459662292,
595.8421200750471,
634.5106941838651,
673.1792682926831,
711.847842401501,
750.516416510319,
789.184990619137,
827.853564727955,
866.522138836773,
905.1907129455909,
943.8592870544089,
982.5278611632269,
1021.1964352720448,
1059.8650093808628,
1098.533583489681,
1137.2021575984988,
1175.870731707317,
1214.5393058161349,
1253.2078799249527,
1291.8764540337709,
1330.5450281425888,
1369.2136022514069,
1407.8821763602248,
1446.5507504690427,
1485.2193245778608,
1523.8878986866787,
1562.5564727954968,
1601.2250469043147,
1639.8936210131326,
1678.5621951219507
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guangxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guangxi",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "markers",
"name": "Guangxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
5,
23,
23,
36,
46,
51,
58,
78,
87,
100,
111,
127,
139,
150,
168,
172,
183,
195,
210,
215,
222,
222,
226,
235,
237,
238,
242,
244,
245,
246,
249,
249,
251,
252,
252,
252,
252,
2020-03-02 21:22:49 +01:00
252,
2020-03-01 21:33:06 +01:00
252
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 7.01923 * Lags + 33.05<br>R<sup>2</sup>=0.895033<br><br>Cities=Guangxi<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Guangxi",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "lines",
"name": "Guangxi",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
33.05000000000011,
40.06923076923087,
47.08846153846164,
54.107692307692396,
61.12692307692316,
68.14615384615392,
75.16538461538468,
82.18461538461546,
89.2038461538462,
96.22307692307697,
103.24230769230773,
110.26153846153849,
117.28076923076925,
124.30000000000001,
131.31923076923078,
138.33846153846156,
145.3576923076923,
152.37692307692305,
159.39615384615382,
166.4153846153846,
173.43461538461537,
180.4538461538461,
187.47307692307686,
194.49230769230763,
201.5115384615384,
208.53076923076918,
215.5499999999999,
222.56923076923067,
229.58846153846144,
236.60769230769222,
243.626923076923,
250.6461538461537,
257.6653846153845,
264.68461538461526,
271.70384615384603,
278.7230769230768,
285.7423076923075,
292.7615384615383,
299.78076923076907,
306.79999999999984
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Guizhou<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Guizhou",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "markers",
"name": "Guizhou",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
3,
3,
4,
5,
7,
9,
9,
12,
29,
29,
38,
46,
58,
64,
71,
81,
89,
99,
109,
127,
133,
135,
140,
143,
144,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
146,
2020-03-02 21:22:49 +01:00
146,
2020-03-01 21:33:06 +01:00
146
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 4.75572 * Lags + -1.93659<br>R<sup>2</sup>=0.887764<br><br>Cities=Guizhou<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Guizhou",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "lines",
"name": "Guizhou",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-1.93658536585359,
2.8191369606004395,
7.574859287054469,
12.330581613508498,
17.086303939962526,
21.84202626641656,
26.597748592870587,
31.35347091932462,
36.10919324577865,
40.864915572232675,
45.62063789868671,
50.376360225140736,
55.13208255159476,
59.8878048780488,
64.64352720450283,
69.39924953095685,
74.15497185741089,
78.91069418386492,
83.66641651031894,
88.42213883677297,
93.177861163227,
97.93358348968103,
102.68930581613506,
107.4450281425891,
112.20075046904311,
116.95647279549715,
121.71219512195118,
126.4679174484052,
131.22363977485924,
135.97936210131326,
140.73508442776728,
145.49080675422132,
150.24652908067534,
155.00225140712936,
159.7579737335834,
164.51369606003743,
169.26941838649145,
174.0251407129455,
178.78086303939952,
183.53658536585354
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hainan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hainan",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "markers",
"name": "Hainan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
5,
8,
19,
22,
33,
40,
43,
46,
52,
62,
64,
72,
80,
99,
106,
117,
124,
131,
138,
144,
157,
157,
159,
162,
162,
163,
163,
168,
168,
168,
168,
168,
168,
168,
168,
168,
168,
2020-03-02 21:22:49 +01:00
168,
2020-03-01 21:33:06 +01:00
168
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 4.80056 * Lags + 20.089<br>R<sup>2</sup>=0.885848<br><br>Cities=Hainan<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Hainan",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "lines",
"name": "Hainan",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
20.089024390243978,
24.889587242026337,
29.690150093808697,
34.490712945591056,
39.291275797373416,
44.091838649155775,
48.892401500938135,
53.692964352720495,
58.493527204502854,
63.294090056285214,
68.09465290806757,
72.89521575984993,
77.69577861163229,
82.49634146341465,
87.29690431519701,
92.09746716697937,
96.89803001876173,
101.69859287054409,
106.49915572232645,
111.29971857410881,
116.10028142589117,
120.90084427767353,
125.70140712945589,
130.50196998123823,
135.30253283302062,
140.10309568480295,
144.90365853658534,
149.70422138836767,
154.50478424015006,
159.3053470919324,
164.10590994371478,
168.9064727954971,
173.7070356472795,
178.50759849906183,
183.30816135084422,
188.10872420262655,
192.90928705440894,
197.70984990619127,
202.51041275797365,
207.31097560975599
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hebei<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hebei",
"marker": {
"color": "#FECB52",
"symbol": "circle"
},
"mode": "markers",
"name": "Hebei",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
2,
8,
13,
18,
33,
48,
65,
82,
96,
104,
113,
126,
135,
157,
172,
195,
206,
218,
239,
251,
265,
283,
291,
300,
301,
306,
306,
307,
308,
309,
311,
311,
311,
312,
317,
318,
2020-03-02 21:22:49 +01:00
318,
2020-03-01 21:33:06 +01:00
318
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 9.80028 * Lags + 3.26951<br>R<sup>2</sup>=0.927881<br><br>Cities=Hebei<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Hebei",
"marker": {
"color": "#FECB52",
"symbol": "circle"
},
"mode": "lines",
"name": "Hebei",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
3.2695121951220933,
13.069793621013266,
22.87007504690444,
32.67035647279562,
42.47063789868679,
52.27091932457796,
62.07120075046913,
71.8714821763603,
81.67176360225147,
91.47204502814265,
101.27232645403382,
111.07260787992499,
120.87288930581617,
130.67317073170736,
140.47345215759853,
150.2737335834897,
160.07401500938087,
169.87429643527204,
179.67457786116321,
189.4748592870544,
199.27514071294556,
209.07542213883673,
218.8757035647279,
228.67598499061907,
238.47626641651027,
248.27654784240144,
258.0768292682926,
267.8771106941838,
277.67739212007496,
287.4776735459661,
297.2779549718573,
307.07823639774847,
316.87851782363964,
326.6787992495308,
336.479080675422,
346.27936210131315,
356.0796435272043,
365.8799249530955,
375.68020637898667,
385.48048780487784
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Heilongjiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Heilongjiang",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "Heilongjiang",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
2,
4,
9,
15,
21,
33,
38,
44,
59,
80,
95,
121,
155,
190,
227,
277,
295,
307,
331,
360,
378,
395,
419,
425,
445,
457,
464,
470,
476,
479,
479,
480,
480,
480,
480,
480,
480,
2020-03-02 21:22:49 +01:00
480,
2020-03-01 21:33:06 +01:00
480
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 15.7197 * Lags + -21.7841<br>R<sup>2</sup>=0.920321<br><br>Cities=Heilongjiang<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Heilongjiang",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "lines",
"name": "Heilongjiang",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-21.784146341463206,
-6.064446529080481,
9.655253283302244,
25.374953095684965,
41.094652908067694,
56.81435272045042,
72.53405253283313,
88.25375234521587,
103.97345215759859,
119.6931519699813,
135.41285178236404,
151.13255159474676,
166.85225140712947,
182.57195121951221,
198.29165103189493,
214.01135084427767,
229.7310506566604,
245.4507504690431,
261.1704502814258,
276.8901500938086,
292.6098499061913,
308.329549718574,
324.04924953095673,
339.76894934333944,
355.48864915572216,
371.20834896810493,
386.92804878048764,
402.64774859287036,
418.36744840525307,
434.0871482176358,
449.80684803001856,
465.52654784240127,
481.246247654784,
496.9659474671667,
512.6856472795495,
528.4053470919322,
544.1250469043149,
559.8447467166976,
575.5644465290804,
591.2841463414632
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Henan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Henan",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "markers",
"name": "Henan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
5,
5,
9,
32,
83,
128,
168,
206,
278,
352,
422,
493,
566,
675,
764,
851,
914,
981,
1033,
1073,
1105,
1135,
1169,
1184,
1212,
1231,
1246,
1257,
1262,
1265,
1267,
1270,
1271,
1271,
1271,
1271,
1272,
1272,
2020-03-02 21:22:49 +01:00
1272,
2020-03-01 21:33:06 +01:00
1272
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 38.2984 * Lags + 98.5061<br>R<sup>2</sup>=0.871190<br><br>Cities=Henan<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Henan",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "lines",
"name": "Henan",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
98.50609756097619,
136.80450281425945,
175.10290806754273,
213.40131332082598,
251.69971857410928,
289.99812382739253,
328.2965290806758,
366.5949343339591,
404.89333958724234,
443.1917448405256,
481.4901500938089,
519.7885553470921,
558.0869606003754,
596.3853658536588,
634.683771106942,
672.9821763602253,
711.2805816135085,
749.5789868667918,
787.877392120075,
826.1757973733584,
864.4742026266416,
902.7726078799249,
941.0710131332081,
979.3694183864914,
1017.6678236397746,
1055.966228893058,
1094.2646341463412,
1132.5630393996246,
1170.861444652908,
1209.159849906191,
1247.4582551594744,
1285.7566604127576,
1324.055065666041,
1362.3534709193243,
1400.6518761726074,
1438.9502814258908,
1477.248686679174,
1515.5470919324573,
1553.8454971857407,
1592.1439024390238
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hubei<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hubei",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "markers",
"name": "Hubei",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
444,
444,
549,
761,
1058,
1423,
3554,
3554,
4903,
5806,
7153,
11177,
13522,
16678,
19665,
22112,
24953,
27100,
29631,
31728,
33366,
33366,
48206,
54406,
56249,
58182,
59989,
61682,
62031,
62442,
62662,
64084,
64084,
64287,
64786,
65187,
65596,
65914,
2020-03-02 21:22:49 +01:00
66337,
66907
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2180.77 * Lags + -7375.64<br>R<sup>2</sup>=0.943146<br><br>Cities=Hubei<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Hubei",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "lines",
"name": "Hubei",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-7375.641463414604,
-5194.867542213855,
-3014.0936210131067,
-833.3196998123585,
1347.4542213883906,
3528.2281425891397,
5709.002063789887,
7889.775984990636,
10070.549906191385,
12251.323827392132,
14432.097748592883,
16612.871669793632,
18793.645590994376,
20974.419512195127,
23155.193433395878,
25335.96735459663,
27516.741275797373,
29697.515196998123,
31878.289118198867,
34059.06303939962,
36239.83696060037,
38420.61088180111,
40601.38480300186,
42782.158724202614,
44962.93264540336,
47143.70656660411,
49324.48048780486,
51505.25440900561,
53686.028330206354,
55866.802251407105,
58047.576172607856,
60228.35009380861,
62409.12401500935,
64589.897936210094,
66770.67185741085,
68951.4457786116,
71132.21969981234,
73312.9936210131,
75493.76754221384,
77674.54146341459
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Hunan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Hunan",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "markers",
"name": "Hunan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
9,
24,
43,
69,
100,
143,
221,
277,
332,
389,
463,
521,
593,
661,
711,
772,
803,
838,
879,
912,
946,
968,
988,
1001,
1004,
1006,
1007,
1008,
1010,
1011,
1013,
1016,
1016,
1016,
1016,
1017,
1017,
2020-03-02 21:22:49 +01:00
1018,
2020-03-01 21:33:06 +01:00
1018
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 29.7495 * Lags + 116.384<br>R<sup>2</sup>=0.850478<br><br>Cities=Hunan<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Hunan",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "lines",
"name": "Hunan",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
116.38414634146389,
146.13367729831188,
175.8832082551599,
205.6327392120079,
235.38227016885588,
265.1318011257039,
294.8813320825519,
324.63086303939986,
354.3803939962479,
384.12992495309584,
413.8794559099439,
443.6289868667918,
473.37851782363987,
503.1280487804879,
532.8775797373359,
562.6271106941839,
592.3766416510318,
622.1261726078799,
651.8757035647278,
681.6252345215759,
711.3747654784238,
741.1242964352718,
770.8738273921198,
800.6233583489678,
830.3728893058159,
860.1224202626638,
889.8719512195119,
919.6214821763598,
949.3710131332078,
979.1205440900558,
1008.8700750469038,
1038.6196060037519,
1068.3691369606,
1098.118667917448,
1127.8681988742958,
1157.6177298311438,
1187.3672607879919,
1217.11679174484,
1246.866322701688,
1276.6158536585358
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Inner Mongolia<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Inner Mongolia",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "markers",
"name": "Inner Mongolia",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
1,
7,
7,
11,
15,
16,
19,
20,
23,
27,
34,
35,
42,
46,
50,
52,
54,
58,
58,
60,
61,
65,
68,
70,
72,
73,
75,
75,
75,
75,
75,
75,
75,
75,
75,
75,
2020-03-02 21:22:49 +01:00
75,
2020-03-01 21:33:06 +01:00
75
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2.21201 * Lags + 5.46585<br>R<sup>2</sup>=0.917210<br><br>Cities=Inner Mongolia<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Inner Mongolia",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "lines",
"name": "Inner Mongolia",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
5.465853658536617,
7.677861163227046,
9.889868667917476,
12.101876172607906,
14.313883677298335,
16.525891181988765,
18.73789868667919,
20.94990619136962,
23.16191369606005,
25.37392120075048,
27.58592870544091,
29.79793621013134,
32.009943714821766,
34.2219512195122,
36.433958724202625,
38.64596622889306,
40.857973733583485,
43.06998123827391,
45.281988742964344,
47.49399624765477,
49.706003752345204,
51.91801125703563,
54.13001876172606,
56.34202626641649,
58.554033771106916,
60.76604127579735,
62.978048780487775,
65.19005628517822,
67.40206378986863,
69.61407129455907,
71.8260787992495,
74.03808630393992,
76.25009380863035,
78.46210131332079,
80.6741088180112,
82.88611632270164,
85.09812382739207,
87.3101313320825,
89.52213883677292,
91.73414634146336
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jiangsu<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jiangsu",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "markers",
"name": "Jiangsu",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
5,
9,
18,
33,
47,
70,
99,
129,
168,
202,
236,
271,
308,
341,
373,
408,
439,
468,
492,
515,
543,
570,
593,
604,
617,
626,
629,
631,
631,
631,
631,
631,
631,
631,
631,
631,
631,
2020-03-02 21:22:49 +01:00
631,
2020-03-01 21:33:06 +01:00
631
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 19.3812 * Lags + 31.7159<br>R<sup>2</sup>=0.894269<br><br>Cities=Jiangsu<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Jiangsu",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "lines",
"name": "Jiangsu",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
31.715853658536858,
51.09709193245804,
70.47833020637923,
89.85956848030041,
109.2408067542216,
128.6220450281428,
148.00328330206395,
167.38452157598516,
186.76575984990632,
206.14699812382753,
225.52823639774869,
244.9094746716699,
264.29071294559105,
283.67195121951227,
303.0531894934334,
322.4344277673546,
341.8156660412758,
361.196904315197,
380.57814258911816,
399.9593808630393,
419.3406191369605,
438.72185741088174,
458.1030956848029,
477.48433395872405,
496.86557223264526,
516.2468105065665,
535.6280487804877,
555.0092870544088,
574.39052532833,
593.7717636022512,
613.1530018761723,
632.5342401500935,
651.9154784240147,
671.296716697936,
690.6779549718572,
710.0591932457783,
729.4404315196995,
748.8216697936207,
768.2029080675418,
787.584146341463
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jiangxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jiangxi",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "markers",
"name": "Jiangxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
7,
18,
18,
36,
72,
109,
109,
162,
240,
286,
333,
391,
476,
548,
600,
661,
698,
740,
771,
804,
844,
872,
900,
913,
925,
930,
933,
934,
934,
934,
934,
934,
934,
934,
934,
934,
935,
2020-03-02 21:22:49 +01:00
935,
2020-03-01 21:33:06 +01:00
935
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 28.8485 * Lags + 52.6793<br>R<sup>2</sup>=0.869610<br><br>Cities=Jiangxi<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Jiangxi",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "lines",
"name": "Jiangxi",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
52.67926829268332,
81.52776735459699,
110.37626641651066,
139.22476547842433,
168.07326454033802,
196.9217636022517,
225.77026266416533,
254.61876172607901,
283.4672607879927,
312.3157598499064,
341.16425891182007,
370.0127579737337,
398.8612570356474,
427.70975609756107,
456.5582551594747,
485.4067542213884,
514.2552532833021,
543.1037523452158,
571.9522514071294,
600.8007504690431,
629.6492495309568,
658.4977485928704,
687.3462476547841,
716.1947467166978,
745.0432457786114,
773.8917448405251,
802.7402439024388,
831.5887429643525,
860.4372420262661,
889.2857410881797,
918.1342401500934,
946.9827392120071,
975.8312382739208,
1004.6797373358345,
1033.528236397748,
1062.3767354596619,
1091.2252345215754,
1120.073733583489,
1148.9222326454028,
1177.7707317073164
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Jilin<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Jilin",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "markers",
"name": "Jilin",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
1,
3,
4,
4,
6,
8,
9,
14,
14,
17,
23,
31,
42,
54,
59,
65,
69,
78,
80,
81,
83,
84,
86,
88,
89,
89,
89,
90,
91,
91,
91,
91,
93,
93,
93,
93,
93,
2020-03-02 21:22:49 +01:00
93,
2020-03-01 21:33:06 +01:00
93
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2.9121 * Lags + 2.58902<br>R<sup>2</sup>=0.866147<br><br>Cities=Jilin<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Jilin",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "lines",
"name": "Jilin",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
2.5890243902439414,
5.501125703564764,
8.413227016885587,
11.32532833020641,
14.237429643527232,
17.149530956848057,
20.06163227016888,
22.973733583489704,
25.885834896810525,
28.797936210131347,
31.710037523452172,
34.622138836773,
37.534240150093815,
40.44634146341464,
43.358442776735465,
46.27054409005628,
49.18264540337711,
52.094746716697934,
55.00684803001875,
57.91894934333958,
60.8310506566604,
63.74315196998122,
66.65525328330205,
69.56735459662286,
72.47945590994368,
75.39155722326451,
78.30365853658533,
81.21575984990615,
84.12786116322698,
87.0399624765478,
89.95206378986862,
92.86416510318945,
95.77626641651027,
98.68836772983109,
101.60046904315192,
104.51257035647274,
107.42467166979355,
110.33677298311439,
113.2488742964352,
116.16097560975602
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Liaoning<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Liaoning",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "markers",
"name": "Liaoning",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
3,
4,
17,
21,
27,
34,
39,
41,
48,
64,
70,
74,
81,
89,
94,
99,
105,
107,
108,
111,
116,
117,
119,
119,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
121,
2020-03-02 21:22:49 +01:00
121,
122
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 3.20385 * Lags + 25.65<br>R<sup>2</sup>=0.817986<br><br>Cities=Liaoning<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Liaoning",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "lines",
"name": "Liaoning",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
25.650000000000052,
28.853846153846202,
32.057692307692356,
35.26153846153851,
38.46538461538466,
41.66923076923081,
44.87307692307696,
48.07692307692311,
51.28076923076926,
54.48461538461541,
57.68846153846157,
60.89230769230771,
64.09615384615387,
67.30000000000001,
70.50384615384617,
73.70769230769231,
76.91153846153847,
80.11538461538461,
83.31923076923077,
86.52307692307691,
89.72692307692307,
92.93076923076922,
96.13461538461537,
99.33846153846152,
102.54230769230767,
105.74615384615382,
108.94999999999997,
112.15384615384612,
115.35769230769228,
118.56153846153842,
121.76538461538458,
124.96923076923072,
128.17307692307688,
131.37692307692305,
134.5807692307692,
137.78461538461534,
140.98846153846148,
144.19230769230765,
147.3961538461538,
150.59999999999994
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Ningxia<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Ningxia",
"marker": {
"color": "#FECB52",
"symbol": "circle"
},
"mode": "markers",
"name": "Ningxia",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
2,
3,
4,
7,
11,
12,
17,
21,
26,
28,
31,
34,
34,
40,
43,
45,
45,
49,
53,
58,
64,
67,
70,
70,
70,
70,
71,
71,
71,
71,
71,
71,
71,
71,
72,
72,
2020-03-02 21:22:49 +01:00
73,
2020-03-01 21:33:06 +01:00
73
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2.16979 * Lags + 3.53902<br>R<sup>2</sup>=0.918136<br><br>Cities=Ningxia<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Ningxia",
"marker": {
"color": "#FECB52",
"symbol": "circle"
},
"mode": "lines",
"name": "Ningxia",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
3.5390243902439344,
5.7088180112570655,
7.8786116322701965,
10.048405253283327,
12.218198874296458,
14.38799249530959,
16.55778611632272,
18.72757973733585,
20.897373358348982,
23.067166979362113,
25.236960600375244,
27.406754221388375,
29.576547842401506,
31.746341463414637,
33.916135084427765,
36.08592870544091,
38.255722326454034,
40.42551594746716,
42.59530956848029,
44.76510318949343,
46.93489681050656,
49.104690431519685,
51.27448405253281,
53.444277673545955,
55.61407129455908,
57.78386491557221,
59.95365853658534,
62.12345215759848,
64.2932457786116,
66.46303939962473,
68.63283302063788,
70.802626641651,
72.97242026266413,
75.14221388367726,
77.31200750469038,
79.48180112570353,
81.65159474671665,
83.82138836772978,
85.99118198874292,
88.16097560975605
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Qinghai<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Qinghai",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "Qinghai",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
1,
1,
6,
6,
6,
8,
8,
9,
11,
13,
15,
17,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
2020-03-02 21:22:49 +01:00
18,
2020-03-01 21:33:06 +01:00
18
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 0.460882 * Lags + 4.7878<br>R<sup>2</sup>=0.693309<br><br>Cities=Qinghai<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Qinghai",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "lines",
"name": "Qinghai",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
4.787804878048789,
5.248686679174492,
5.709568480300195,
6.170450281425898,
6.631332082551602,
7.092213883677305,
7.553095684803007,
8.01397748592871,
8.474859287054414,
8.935741088180116,
9.39662288930582,
9.857504690431522,
10.318386491557225,
10.779268292682929,
11.240150093808632,
11.701031894934335,
12.161913696060038,
12.622795497185741,
13.083677298311445,
13.544559099437148,
14.005440900562851,
14.466322701688554,
14.927204502814257,
15.38808630393996,
15.848968105065662,
16.309849906191367,
16.77073170731707,
17.23161350844277,
17.692495309568475,
18.15337711069418,
18.61425891181988,
19.075140712945583,
19.536022514071288,
19.996904315196993,
20.457786116322694,
20.918667917448396,
21.3795497185741,
21.840431519699802,
22.301313320825507,
22.76219512195121
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shaanxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shaanxi",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "markers",
"name": "Shaanxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
3,
5,
15,
22,
35,
46,
56,
63,
87,
101,
116,
128,
142,
165,
173,
184,
195,
208,
213,
219,
225,
229,
230,
232,
236,
240,
240,
242,
245,
245,
245,
245,
245,
245,
245,
245,
245,
2020-03-02 21:22:49 +01:00
245,
2020-03-01 21:33:06 +01:00
245
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 7.0166 * Lags + 31.8012<br>R<sup>2</sup>=0.855478<br><br>Cities=Shaanxi<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Shaanxi",
"marker": {
"color": "#EF553B",
"symbol": "circle"
},
"mode": "lines",
"name": "Shaanxi",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
31.801219512195235,
38.817823639774964,
45.8344277673547,
52.85103189493442,
59.86763602251416,
66.88424015009389,
73.90084427767361,
80.91744840525335,
87.93405253283308,
94.95065666041282,
101.96726078799254,
108.98386491557227,
116.000469043152,
123.01707317073173,
130.03367729831146,
137.0502814258912,
144.06688555347094,
151.08348968105065,
158.1000938086304,
165.11669793621013,
172.13330206378987,
179.14990619136958,
186.16651031894932,
193.18311444652906,
200.19971857410877,
207.2163227016885,
214.23292682926825,
221.249530956848,
228.2661350844277,
235.28273921200744,
242.29934333958718,
249.3159474671669,
256.33255159474663,
263.3491557223264,
270.36575984990606,
277.3823639774858,
284.39896810506553,
291.4155722326453,
298.432176360225,
305.44878048780475
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shandong<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shandong",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "markers",
"name": "Shandong",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2,
6,
15,
27,
46,
75,
95,
130,
158,
184,
206,
230,
259,
275,
307,
347,
386,
416,
444,
466,
487,
497,
509,
523,
532,
537,
541,
543,
544,
546,
749,
750,
754,
755,
756,
756,
756,
756,
2020-03-02 21:22:49 +01:00
756,
758
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 21.8763 * Lags + -4.6122<br>R<sup>2</sup>=0.972076<br><br>Cities=Shandong<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Shandong",
"marker": {
"color": "#00cc96",
"symbol": "circle"
},
"mode": "lines",
"name": "Shandong",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-4.6121951219509185,
17.26407129455938,
39.14033771106968,
61.01660412757997,
82.89287054409027,
104.76913696060058,
126.64540337711085,
148.52166979362116,
170.39793621013146,
192.27420262664177,
214.15046904315207,
236.02673545966235,
257.90300187617265,
279.7792682926829,
301.65553470919326,
323.5318011257035,
345.40806754221387,
367.2843339587241,
389.1606003752345,
411.0368667917447,
432.9131332082551,
454.78939962476534,
476.6656660412756,
498.54193245778595,
520.4181988742962,
542.2944652908066,
564.1707317073168,
586.0469981238272,
607.9232645403374,
629.7995309568478,
651.675797373358,
673.5520637898684,
695.4283302063786,
717.3045966228889,
739.1808630393992,
761.0571294559095,
782.9333958724199,
804.8096622889301,
826.6859287054405,
848.5621951219507
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shanghai<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shanghai",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "markers",
"name": "Shanghai",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
9,
16,
20,
33,
40,
53,
66,
96,
112,
135,
169,
182,
203,
219,
243,
257,
277,
286,
293,
299,
303,
311,
315,
318,
326,
328,
333,
333,
333,
334,
334,
335,
335,
335,
336,
337,
337,
337,
2020-03-02 21:22:49 +01:00
337,
2020-03-01 21:33:06 +01:00
337
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 9.09343 * Lags + 62.728<br>R<sup>2</sup>=0.829586<br><br>Cities=Shanghai<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Shanghai",
"marker": {
"color": "#ab63fa",
"symbol": "circle"
},
"mode": "lines",
"name": "Shanghai",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
62.72804878048794,
71.82148217636035,
80.91491557223276,
90.00834896810517,
99.10178236397758,
108.19521575984999,
117.28864915572241,
126.38208255159482,
135.47551594746722,
144.56894934333963,
153.66238273921203,
162.75581613508444,
171.84924953095688,
180.9426829268293,
190.0361163227017,
199.1295497185741,
208.22298311444652,
217.31641651031893,
226.40984990619134,
235.50328330206375,
244.59671669793616,
253.69015009380857,
262.78358348968095,
271.8770168855534,
280.9704502814258,
290.06388367729824,
299.15731707317065,
308.25075046904306,
317.34418386491546,
326.4376172607879,
335.5310506566603,
344.6244840525327,
353.7179174484051,
362.8113508442775,
371.9047842401499,
380.99821763602233,
390.09165103189474,
399.18508442776715,
408.27851782363956,
417.37195121951197
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Shanxi<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Shanxi",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "markers",
"name": "Shanxi",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
1,
1,
1,
6,
9,
13,
27,
27,
35,
39,
47,
66,
74,
81,
81,
96,
104,
115,
119,
119,
124,
126,
126,
127,
128,
129,
130,
131,
131,
132,
132,
132,
132,
133,
133,
133,
133,
133,
2020-03-02 21:22:49 +01:00
133,
2020-03-01 21:33:06 +01:00
133
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 3.85629 * Lags + 16.6024<br>R<sup>2</sup>=0.832861<br><br>Cities=Shanxi<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Shanxi",
"marker": {
"color": "#FFA15A",
"symbol": "circle"
},
"mode": "lines",
"name": "Shanxi",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
16.6024390243903,
20.458724202626694,
24.31500938086309,
28.17129455909948,
32.02757973733588,
35.88386491557227,
39.740150093808666,
43.596435272045056,
47.45272045028145,
51.309005628517845,
55.165290806754236,
59.02157598499063,
62.877861163227024,
66.73414634146343,
70.59043151969982,
74.44671669793621,
78.3030018761726,
82.15928705440899,
86.01557223264538,
89.87185741088177,
93.72814258911816,
97.58442776735458,
101.44071294559097,
105.29699812382736,
109.15328330206376,
113.00956848030015,
116.86585365853654,
120.72213883677293,
124.57842401500932,
128.4347091932457,
132.29099437148213,
136.14727954971852,
140.0035647279549,
143.8598499061913,
147.7161350844277,
151.57242026266408,
155.42870544090047,
159.28499061913686,
163.14127579737325,
166.99756097560964
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Sichuan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Sichuan",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "markers",
"name": "Sichuan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
5,
8,
15,
28,
44,
69,
90,
108,
142,
177,
207,
231,
254,
282,
301,
321,
344,
364,
386,
405,
417,
436,
451,
463,
470,
481,
495,
508,
514,
520,
525,
526,
526,
527,
529,
531,
534,
538,
2020-03-02 21:22:49 +01:00
538,
2020-03-01 21:33:06 +01:00
538
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 15.4141 * Lags + 45.6256<br>R<sup>2</sup>=0.920118<br><br>Cities=Sichuan<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Sichuan",
"marker": {
"color": "#19d3f3",
"symbol": "circle"
},
"mode": "lines",
"name": "Sichuan",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
45.62560975609778,
61.03968105065687,
76.45375234521595,
91.86782363977503,
107.28189493433412,
122.69596622889321,
138.1100375234523,
153.52410881801137,
168.93818011257045,
184.35225140712956,
199.76632270168864,
215.18039399624772,
230.5944652908068,
246.00853658536587,
261.42260787992495,
276.83667917448406,
292.2507504690431,
307.6648217636022,
323.0788930581613,
338.4929643527204,
353.9070356472795,
369.32110694183854,
384.73517823639764,
400.14924953095675,
415.5633208255158,
430.9773921200749,
446.39146341463396,
461.80553470919307,
477.2196060037522,
492.6336772983112,
508.04774859287033,
523.4618198874293,
538.8758911819884,
554.2899624765475,
569.7040337711067,
585.1181050656658,
600.5321763602249,
615.9462476547839,
631.360318949343,
646.7743902439021
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Tianjin<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Tianjin",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "markers",
"name": "Tianjin",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
4,
4,
8,
10,
14,
23,
24,
27,
31,
32,
41,
48,
60,
67,
69,
79,
81,
88,
91,
95,
106,
112,
119,
120,
122,
124,
125,
128,
130,
131,
132,
135,
135,
135,
135,
135,
136,
136,
2020-03-02 21:22:49 +01:00
136,
2020-03-01 21:33:06 +01:00
136
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 3.96154 * Lags + 9.35<br>R<sup>2</sup>=0.928187<br><br>Cities=Tianjin<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Tianjin",
"marker": {
"color": "#FF6692",
"symbol": "circle"
},
"mode": "lines",
"name": "Tianjin",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
9.350000000000058,
13.311538461538516,
17.273076923076975,
21.23461538461543,
25.19615384615389,
29.15769230769235,
33.11923076923081,
37.08076923076926,
41.04230769230772,
45.00384615384618,
48.96538461538464,
52.926923076923096,
56.888461538461556,
60.850000000000016,
64.81153846153848,
68.77307692307693,
72.73461538461538,
76.69615384615383,
80.65769230769232,
84.61923076923077,
88.58076923076922,
92.54230769230767,
96.50384615384613,
100.46538461538461,
104.42692307692306,
108.38846153846151,
112.34999999999997,
116.31153846153842,
120.27307692307687,
124.23461538461535,
128.1961538461538,
132.15769230769226,
136.1192307692307,
140.08076923076916,
144.04230769230762,
148.0038461538461,
151.96538461538455,
155.926923076923,
159.88846153846146,
163.8499999999999
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Tibet<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Tibet",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "markers",
"name": "Tibet",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2020-03-02 21:22:49 +01:00
1,
2020-03-01 21:33:06 +01:00
1
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 0.024015 * Lags + 0.331707<br>R<sup>2</sup>=0.480300<br><br>Cities=Tibet<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
2020-03-01 21:33:06 +01:00
"legendgroup": "Tibet",
"marker": {
"color": "#B6E880",
"symbol": "circle"
},
"mode": "lines",
"name": "Tibet",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
],
"xaxis": "x",
"y": [
0.3317073170731712,
0.35572232645403423,
0.3797373358348972,
0.4037523452157602,
0.42776735459662324,
0.4517823639774863,
0.47579737335834926,
0.49981238273921225,
0.5238273921200753,
0.5478424015009383,
0.5718574108818013,
0.5958724202626644,
0.6198874296435273,
0.6439024390243904,
0.6679174484052534,
0.6919324577861163,
0.7159474671669794,
0.7399624765478423,
0.7639774859287054,
0.7879924953095685,
0.8120075046904314,
0.8360225140712945,
0.8600375234521576,
0.8840525328330204,
0.9080675422138835,
0.9320825515947464,
0.9560975609756095,
0.9801125703564726,
1.0041275797373355,
1.0281425891181986,
1.0521575984990617,
1.0761726078799245,
1.1001876172607876,
1.1242026266416505,
1.1482176360225136,
1.1722326454033767,
1.1962476547842396,
1.2202626641651027,
1.2442776735459657,
1.2682926829268286
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Xinjiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Xinjiang",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "markers",
"name": "Xinjiang",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39
],
"xaxis": "x",
"y": [
0,
2,
2,
3,
4,
5,
10,
13,
14,
17,
18,
21,
24,
29,
32,
36,
39,
42,
45,
49,
55,
59,
63,
65,
70,
71,
75,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76,
76
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "<b>OLS trendline</b><br>Values = 2.39203 * Lags + -0.369512<br>R<sup>2</sup>=0.931951<br><br>Cities=Xinjiang<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
"legendgroup": "Xinjiang",
"marker": {
"color": "#FF97FF",
"symbol": "circle"
},
"mode": "lines",
"name": "Xinjiang",
"showlegend": false,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39
],
"xaxis": "x",
"y": [
-0.36951219512191713,
2.022514071294591,
4.414540337711099,
6.806566604127607,
9.198592870544115,
11.590619136960623,
13.98264540337713,
16.37467166979364,
18.766697936210146,
21.158724202626654,
23.550750469043162,
25.94277673545967,
28.33480300187618,
30.726829268292686,
33.1188555347092,
35.510881801125706,
37.902908067542214,
40.29493433395872,
42.68696060037523,
45.07898686679174,
47.471013133208245,
49.86303939962475,
52.25506566604126,
54.64709193245777,
57.03911819887428,
59.431144465290785,
61.82317073170729,
64.2151969981238,
66.60722326454031,
68.99924953095682,
71.39127579737332,
73.78330206378983,
76.17532833020634,
78.56735459662285,
80.95938086303936,
83.35140712945586,
85.74343339587237,
88.13545966228888,
90.52748592870539,
92.9195121951219
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
"hovertemplate": "Cities=Yunnan<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Yunnan",
"marker": {
"color": "#FECB52",
"symbol": "circle"
},
"mode": "markers",
"name": "Yunnan",
"showlegend": true,
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
1,
2,
5,
11,
16,
26,
44,
55,
70,
83,
93,
105,
117,
122,
128,
133,
138,
138,
141,
149,
153,
154,
156,
162,
168,
171,
171,
172,
172,
174,
174,
174,
174,
174,
174,
174,
174,
174,
174,
174
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 4.65403 * Lags + 33.4963<br>R<sup>2</sup>=0.828086<br><br>Cities=Yunnan<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
"legendgroup": "Yunnan",
2020-03-01 21:33:06 +01:00
"marker": {
2020-03-02 21:22:49 +01:00
"color": "#FECB52",
2020-03-01 21:33:06 +01:00
"symbol": "circle"
},
2020-03-02 21:22:49 +01:00
"mode": "lines",
"name": "Yunnan",
"showlegend": false,
2020-03-01 21:33:06 +01:00
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
33.496341463414716,
38.150375234521654,
42.80440900562859,
47.458442776735524,
52.11247654784246,
56.7665103189494,
61.42054409005634,
66.07457786116328,
70.72861163227022,
75.38264540337715,
80.03667917448409,
84.69071294559103,
89.34474671669795,
93.99878048780491,
98.65281425891183,
103.30684803001878,
107.96088180112571,
112.61491557223266,
117.26894934333959,
121.92298311444654,
126.57701688555346,
131.23105065666041,
135.88508442776734,
140.5391181988743,
145.19315196998122,
149.84718574108814,
154.5012195121951,
159.15525328330202,
163.80928705440897,
168.46332082551592,
173.11735459662285,
177.7713883677298,
182.42542213883672,
187.07945590994365,
191.7334896810506,
196.38752345215752,
201.04155722326448,
205.6955909943714,
210.34962476547835,
215.00365853658528
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "Cities=Zhejiang<br>Lags=%{x}<br>Values=%{y}",
"legendgroup": "Zhejiang",
2020-03-01 21:33:06 +01:00
"marker": {
2020-03-02 21:22:49 +01:00
"color": "#636efa",
2020-03-01 21:33:06 +01:00
"symbol": "circle"
},
2020-03-02 21:22:49 +01:00
"mode": "markers",
"name": "Zhejiang",
"showlegend": true,
2020-03-01 21:33:06 +01:00
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
10,
27,
43,
62,
104,
128,
173,
296,
428,
538,
599,
661,
724,
829,
895,
954,
1006,
1048,
1075,
1092,
1117,
1131,
1145,
1155,
1162,
1167,
1171,
1172,
1174,
1175,
1203,
1205,
1205,
1205,
1205,
1205,
1205,
1205,
1205,
1205
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 33.1881 * Lags + 210.557<br>R<sup>2</sup>=0.806849<br><br>Cities=Zhejiang<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
"legendgroup": "Zhejiang",
2020-03-01 21:33:06 +01:00
"marker": {
2020-03-02 21:22:49 +01:00
"color": "#636efa",
2020-03-01 21:33:06 +01:00
"symbol": "circle"
},
2020-03-02 21:22:49 +01:00
"mode": "lines",
"name": "Zhejiang",
"showlegend": false,
2020-03-01 21:33:06 +01:00
"type": "scattergl",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
210.55731707317125,
243.7454033771112,
276.9334896810511,
310.121575984991,
343.30966228893095,
376.4977485928709,
409.6858348968108,
442.8739212007507,
476.06200750469065,
509.2500938086306,
542.4381801125705,
575.6262664165104,
608.8143527204504,
642.0024390243902,
675.1905253283302,
708.3786116322701,
741.5666979362101,
774.75478424015,
807.9428705440899,
841.1309568480299,
874.3190431519698,
907.5071294559096,
940.6952157598496,
973.8833020637895,
1007.0713883677295,
1040.2594746716695,
1073.4475609756093,
1106.6356472795492,
1139.8237335834892,
1173.011819887429,
1206.1999061913689,
1239.387992495309,
1272.576078799249,
1305.7641651031886,
1338.9522514071286,
1372.1403377110687,
1405.3284240150087,
1438.5165103189483,
1471.7045966228884,
1504.8926829268285
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
2020-03-02 21:22:49 +01:00
}
],
"layout": {
"legend": {
"title": {
"text": "Cities"
2020-03-01 21:33:06 +01:00
},
2020-03-02 21:22:49 +01:00
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
2020-03-01 21:33:06 +01:00
},
2020-03-02 21:22:49 +01:00
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
2020-03-01 21:33:06 +01:00
0,
2020-03-02 21:22:49 +01:00
1
2020-03-01 21:33:06 +01:00
],
2020-03-02 21:22:49 +01:00
"title": {
"text": "Lags"
}
2020-03-01 21:33:06 +01:00
},
2020-03-02 21:22:49 +01:00
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
" <div id=\"296680a4-18db-4aa6-ba33-13658ca394fc\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
" if (document.getElementById(\"296680a4-18db-4aa6-ba33-13658ca394fc\")) {\n",
" Plotly.newPlot(\n",
" '296680a4-18db-4aa6-ba33-13658ca394fc',\n",
" [{\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Anhui<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Anhui\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"Anhui\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [1, 9, 15, 39, 60, 70, 106, 152, 200, 237, 297, 340, 408, 480, 530, 591, 665, 733, 779, 830, 860, 889, 910, 934, 950, 962, 973, 982, 986, 987, 988, 989, 989, 989, 989, 989, 989, 990, 990, 990], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"<b>OLS trendline</b><br>Values = 30.4596 * Lags + 52.7134<br>R<sup>2</sup>=0.879861<br><br>Cities=Anhui<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>\", \"legendgroup\": \"Anhui\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"lines\", \"name\": \"Anhui\", \"showlegend\": false, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [52.7134146341468, 83.17298311444696, 113.63255159474713, 144.09212007504726, 174.55168855534743, 205.0112570356476, 235.47082551594775, 265.9303939962479, 296.3899624765481, 326.8495309568482, 357.30909943714835, 387.7686679174485, 418.2282363977487, 448.68780487804884, 479.147373358349, 509.60694183864916, 540.0665103189493, 570.5260787992495, 600.9856472795497, 631.4452157598498, 661.90478424015, 692.3643527204501, 722.8239212007503, 753.2834896810505, 783.7430581613506, 814.2026266416508, 844.662195121951, 875.1217636022511, 905.5813320825513, 936.0409005628514, 966.5004690431516, 996.9600375234518, 1027.4196060037518, 1057.879174484052, 1088.3387429643522, 1118.7983114446524, 1149.2578799249525, 1179.7174484052528, 1210.1770168855528, 1240.636585365853], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Cities=Beijing<br>Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"Beijing\", \"marker\": {\"color\": \"#EF553B\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"Beijing\", \"showlegend\": true, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [14, 22, 36, 41, 68, 80, 91, 111, 114, 139, 168, 191, 212, 228, 253, 274, 297, 315, 326, 337, 342, 352, 366, 372, 375, 380, 381, 387, 393, 395, 396, 399, 399, 399, 400, 400, 410, 410, 411, 413], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"<b>OLS trendline</b><br>Values = 11.0498 * Lags + 61.9537<br>R<sup>2</sup>=0.890561<br><br>Cities=Beijing<br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>\", \"legendgroup\": \"Beijing\", \"marker\": {\"color\": \"#EF553B\", \"symbol\": \"circle\"}, \"mode\": \"lines\", \"name\": \"Beijing\", \"showlegend\": false, \"type\": \"scattergl\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [61.95365853658552, 73.00347091932473, 84.05328330206393, 95.10309568480312, 106.15290806754233, 117.20272045028153, 128.25253283302072, 139.30234521575994, 150.35215759849913, 161.40196998123832, 172.45178236397754, 183.50159474671673, 194.55140712945592, 205.60121951219514, 216.65103189493433, 227.70084427767355, 238.75065666041274, 249.80046904315194, 260.8502814258911, 271.90009380863034, 282.94990619136956, 293.9997185741088, 305.04953095684795, 316.09934333958716, 327.1491557223263, 338.19896810506555, 349.24878048780477, 360.298592870544, 371.34840525328315, 382.39821763602237, 393.4480300187616, 404.49784240150075, 415.54765478423997, 426.5974671669792, 437.64727954971835, 448.69709193245757, 459.7469043151968, 470.79671669793595, 481
" {\"legend\": {\"title\": {\"text\": \"Cities\"}, \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scatterg
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
"var gd = document.getElementById('296680a4-18db-4aa6-ba33-13658ca394fc');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly.express as px\n",
"fig = px.scatter(df_china, x=\"Lags\", y = \"Values\", color=\"Cities\", trendline=\"ols\")\n",
"fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Hubei Linear regression"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
2020-03-01 21:33:06 +01:00
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "Lags=%{x}<br>Values=%{y}",
"legendgroup": "",
2020-03-01 21:33:06 +01:00
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
2020-03-02 21:22:49 +01:00
"name": "",
"showlegend": false,
"type": "scatter",
2020-03-01 21:33:06 +01:00
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
444,
444,
549,
761,
1058,
1423,
3554,
3554,
4903,
5806,
7153,
11177,
13522,
16678,
19665,
22112,
24953,
27100,
29631,
31728,
33366,
33366,
48206,
54406,
56249,
58182,
59989,
61682,
62031,
62442,
62662,
64084,
64084,
64287,
64786,
65187,
65596,
65914,
66337,
66907
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
},
{
"hoverlabel": {
"namelength": 0
},
2020-03-02 21:22:49 +01:00
"hovertemplate": "<b>OLS trendline</b><br>Values = 2180.77 * Lags + -7375.64<br>R<sup>2</sup>=0.943146<br><br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>",
"legendgroup": "",
2020-03-01 21:33:06 +01:00
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "lines",
2020-03-02 21:22:49 +01:00
"name": "",
2020-03-01 21:33:06 +01:00
"showlegend": false,
2020-03-02 21:22:49 +01:00
"type": "scatter",
2020-03-01 21:33:06 +01:00
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"xaxis": "x",
"y": [
2020-03-02 21:22:49 +01:00
-7375.641463414604,
-5194.867542213855,
-3014.0936210131067,
-833.3196998123585,
1347.4542213883906,
3528.2281425891397,
5709.002063789887,
7889.775984990636,
10070.549906191385,
12251.323827392132,
14432.097748592883,
16612.871669793632,
18793.645590994376,
20974.419512195127,
23155.193433395878,
25335.96735459663,
27516.741275797373,
29697.515196998123,
31878.289118198867,
34059.06303939962,
36239.83696060037,
38420.61088180111,
40601.38480300186,
42782.158724202614,
44962.93264540336,
47143.70656660411,
49324.48048780486,
51505.25440900561,
53686.028330206354,
55866.802251407105,
58047.576172607856,
60228.35009380861,
62409.12401500935,
64589.897936210094,
66770.67185741085,
68951.4457786116,
71132.21969981234,
73312.9936210131,
75493.76754221384,
77674.54146341459
2020-03-01 21:33:06 +01:00
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Lags"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
2020-03-02 21:22:49 +01:00
" <div id=\"fda1ecb9-17f3-46a9-9148-3e5de56ddcce\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
2020-03-01 21:33:06 +01:00
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
2020-03-02 21:22:49 +01:00
" if (document.getElementById(\"fda1ecb9-17f3-46a9-9148-3e5de56ddcce\")) {\n",
2020-03-01 21:33:06 +01:00
" Plotly.newPlot(\n",
2020-03-02 21:22:49 +01:00
" 'fda1ecb9-17f3-46a9-9148-3e5de56ddcce',\n",
" [{\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"Lags=%{x}<br>Values=%{y}\", \"legendgroup\": \"\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [444, 444, 549, 761, 1058, 1423, 3554, 3554, 4903, 5806, 7153, 11177, 13522, 16678, 19665, 22112, 24953, 27100, 29631, 31728, 33366, 33366, 48206, 54406, 56249, 58182, 59989, 61682, 62031, 62442, 62662, 64084, 64084, 64287, 64786, 65187, 65596, 65914, 66337, 66907], \"yaxis\": \"y\"}, {\"hoverlabel\": {\"namelength\": 0}, \"hovertemplate\": \"<b>OLS trendline</b><br>Values = 2180.77 * Lags + -7375.64<br>R<sup>2</sup>=0.943146<br><br>Lags=%{x}<br>Values=%{y} <b>(trend)</b>\", \"legendgroup\": \"\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"lines\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"xaxis\": \"x\", \"y\": [-7375.641463414604, -5194.867542213855, -3014.0936210131067, -833.3196998123585, 1347.4542213883906, 3528.2281425891397, 5709.002063789887, 7889.775984990636, 10070.549906191385, 12251.323827392132, 14432.097748592883, 16612.871669793632, 18793.645590994376, 20974.419512195127, 23155.193433395878, 25335.96735459663, 27516.741275797373, 29697.515196998123, 31878.289118198867, 34059.06303939962, 36239.83696060037, 38420.61088180111, 40601.38480300186, 42782.158724202614, 44962.93264540336, 47143.70656660411, 49324.48048780486, 51505.25440900561, 53686.028330206354, 55866.802251407105, 58047.576172607856, 60228.35009380861, 62409.12401500935, 64589.897936210094, 66770.67185741085, 68951.4457786116, 71132.21969981234, 73312.9936210131, 75493.76754221384, 77674.54146341459], \"yaxis\": \"y\"}],\n",
" {\"legend\": {\"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {
2020-03-01 21:33:06 +01:00
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
2020-03-02 21:22:49 +01:00
"var gd = document.getElementById('fda1ecb9-17f3-46a9-9148-3e5de56ddcce');\n",
2020-03-01 21:33:06 +01:00
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2020-03-02 21:22:49 +01:00
"from sklearn.linear_model import LinearRegression\n",
"df_hubei = df_china[df_china[\"Cities\"] == \"Hubei\"]\n",
"df_hubei = df_hubei.drop([\"Cities\"],axis=1) \n",
"\n",
"fig = px.scatter(df_hubei, x=\"Lags\", y = \"Values\", trendline=\"ols\")\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.9431456103160005\n"
]
}
],
"source": [
"X = df_hubei.iloc[:, 1].values.reshape(-1, 1) # values converts it into a numpy array\n",
"Y = df_hubei.iloc[:, 0].values.reshape(-1, 1) # -1 means that calculate the dimension of rows, but have 1 column\n",
"linear_regressor = LinearRegression() # create object for the class\n",
"linear_regressor.fit(X, Y) # perform linear regression\n",
"acc = linear_regressor.score(X, Y)\n",
"Y_pred = linear_regressor.predict(X) # make predictions\n",
"plt.scatter(X, Y)\n",
"plt.plot(X, Y_pred, color='red')\n",
"plt.show()\n",
"print(\"Accuracy:\" ,acc)"
]
},
{
"cell_type": "code",
"execution_count": 111,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-7375.64146341],\n",
" [-5194.86754221],\n",
" [-3014.09362101],\n",
" [ -833.31969981],\n",
" [ 1347.45422139],\n",
" [ 3528.22814259],\n",
" [ 5709.00206379],\n",
" [ 7889.77598499],\n",
" [10070.54990619],\n",
" [12251.32382739],\n",
" [14432.09774859],\n",
" [16612.87166979],\n",
" [18793.64559099],\n",
" [20974.4195122 ],\n",
" [23155.1934334 ],\n",
" [25335.9673546 ],\n",
" [27516.7412758 ],\n",
" [29697.515197 ],\n",
" [31878.2891182 ],\n",
" [34059.0630394 ],\n",
" [36239.8369606 ],\n",
" [38420.6108818 ],\n",
" [40601.384803 ],\n",
" [42782.1587242 ],\n",
" [44962.9326454 ],\n",
" [47143.7065666 ],\n",
" [49324.4804878 ],\n",
" [51505.25440901],\n",
" [53686.02833021],\n",
" [55866.80225141],\n",
" [58047.57617261],\n",
" [60228.35009381],\n",
" [62409.12401501],\n",
" [64589.89793621],\n",
" [66770.67185741],\n",
" [68951.44577861],\n",
" [71132.21969981],\n",
" [73312.99362101],\n",
" [75493.76754221],\n",
" [77674.54146341]])"
]
},
"execution_count": 111,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"predictions = linear_regressor.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Prediction: [-7375.64146341] - Day: [0] - Actual: [444]\n",
"Prediction: [-5194.86754221] - Day: [1] - Actual: [444]\n",
"Prediction: [-3014.09362101] - Day: [2] - Actual: [549]\n",
"Prediction: [-833.31969981] - Day: [3] - Actual: [761]\n",
"Prediction: [1347.45422139] - Day: [4] - Actual: [1058]\n",
"Prediction: [3528.22814259] - Day: [5] - Actual: [1423]\n",
"Prediction: [5709.00206379] - Day: [6] - Actual: [3554]\n",
"Prediction: [7889.77598499] - Day: [7] - Actual: [3554]\n",
"Prediction: [10070.54990619] - Day: [8] - Actual: [4903]\n",
"Prediction: [12251.32382739] - Day: [9] - Actual: [5806]\n",
"Prediction: [14432.09774859] - Day: [10] - Actual: [7153]\n",
"Prediction: [16612.87166979] - Day: [11] - Actual: [11177]\n",
"Prediction: [18793.64559099] - Day: [12] - Actual: [13522]\n",
"Prediction: [20974.4195122] - Day: [13] - Actual: [16678]\n",
"Prediction: [23155.1934334] - Day: [14] - Actual: [19665]\n",
"Prediction: [25335.9673546] - Day: [15] - Actual: [22112]\n",
"Prediction: [27516.7412758] - Day: [16] - Actual: [24953]\n",
"Prediction: [29697.515197] - Day: [17] - Actual: [27100]\n",
"Prediction: [31878.2891182] - Day: [18] - Actual: [29631]\n",
"Prediction: [34059.0630394] - Day: [19] - Actual: [31728]\n",
"Prediction: [36239.8369606] - Day: [20] - Actual: [33366]\n",
"Prediction: [38420.6108818] - Day: [21] - Actual: [33366]\n",
"Prediction: [40601.384803] - Day: [22] - Actual: [48206]\n",
"Prediction: [42782.1587242] - Day: [23] - Actual: [54406]\n",
"Prediction: [44962.9326454] - Day: [24] - Actual: [56249]\n",
"Prediction: [47143.7065666] - Day: [25] - Actual: [58182]\n",
"Prediction: [49324.4804878] - Day: [26] - Actual: [59989]\n",
"Prediction: [51505.25440901] - Day: [27] - Actual: [61682]\n",
"Prediction: [53686.02833021] - Day: [28] - Actual: [62031]\n",
"Prediction: [55866.80225141] - Day: [29] - Actual: [62442]\n",
"Prediction: [58047.57617261] - Day: [30] - Actual: [62662]\n",
"Prediction: [60228.35009381] - Day: [31] - Actual: [64084]\n",
"Prediction: [62409.12401501] - Day: [32] - Actual: [64084]\n",
"Prediction: [64589.89793621] - Day: [33] - Actual: [64287]\n",
"Prediction: [66770.67185741] - Day: [34] - Actual: [64786]\n",
"Prediction: [68951.44577861] - Day: [35] - Actual: [65187]\n",
"Prediction: [71132.21969981] - Day: [36] - Actual: [65596]\n",
"Prediction: [73312.99362101] - Day: [37] - Actual: [65914]\n",
"Prediction: [75493.76754221] - Day: [38] - Actual: [66337]\n",
"Prediction: [77674.54146341] - Day: [39] - Actual: [66907]\n"
]
}
],
"source": [
"for x in range(len(predictions)):\n",
" print(\"Prediction: \",predictions[x],\"- Day:\", X[x],\"- Actual: \", Y[x])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Prediction for 01/03/2020, 02/03/2020, 03/03/2020"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Giorno 39 : 77674.54146341463\n",
"Giorno 40 : 79855.31538461539\n",
"Giorno 41 : 82036.08930581613\n"
]
}
],
"source": [
"prediction = linear_regressor.predict([[39],[40],[41]])\n",
"l = 39\n",
"for x in prediction:\n",
" print(\"Giorno \",l,\": \",x[0])\n",
" l+=1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Logistic regression"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\linear_model\\logistic.py:432: FutureWarning:\n",
"\n",
"Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
"\n",
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py:724: DataConversionWarning:\n",
"\n",
"A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n",
"\n",
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\linear_model\\logistic.py:469: FutureWarning:\n",
"\n",
"Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.\n",
"\n"
]
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.125\n"
]
}
],
"source": [
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"\n",
"X = df_hubei.iloc[:, 1].values.reshape(-1, 1) # values converts it into a numpy array\n",
"Y = df_hubei.iloc[:, 0].values.reshape(-1, 1) # -1 means that calculate the dimension of rows, but have 1 column\n",
"logistic = LogisticRegression(random_state=0) # create object for the class\n",
"logistic.fit(X, Y) # perform linear regression\n",
"acc = logistic.score(X, Y)\n",
"Y_pred = logistic.predict(X) # make predictions\n",
"\n",
"\n",
"plt.scatter(X, Y)\n",
"plt.plot(X, Y_pred, color='red')\n",
"plt.show()\n",
"print(\"Accuracy:\" ,acc)\n",
"\n",
"#plt.plot(X_test, ols.coef_ * X_test + ols.intercept_, linewidth=1)\n"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([64084], dtype=int64)"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Y_pred = logistic.predict([[41]])\n",
"Y_pred "
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.25\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\linear_model\\logistic.py:432: FutureWarning:\n",
"\n",
"Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
"\n",
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py:724: DataConversionWarning:\n",
"\n",
"A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n",
"\n",
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\linear_model\\logistic.py:469: FutureWarning:\n",
"\n",
"Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.\n",
"\n"
]
}
],
"source": [
"prob = logistic.predict_proba(X)\n",
"from sklearn import linear_model\n",
"from scipy.special import expit\n",
"clf = linear_model.LogisticRegression(C=1e5)\n",
"clf.fit(X, Y)\n",
"acc = clf.score(X, Y)\n",
"\n",
"print(\"Accuracy:\" ,acc)"
2020-03-01 21:33:06 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2020-03-02 21:22:49 +01:00
"\n",
"\n",
"# Random Forest regression"
]
},
{
"cell_type": "code",
"execution_count": 217,
"metadata": {},
"outputs": [],
"source": [
"X = df_hubei.iloc[:, 1].values.reshape(-1, 1) # values converts it into a numpy array\n",
"Y = df_hubei.iloc[:, 0].values.reshape(-1, 1) # -1 means that calculate the dimension of rows, but have 1 column"
]
},
{
"cell_type": "code",
"execution_count": 237,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"E:\\ProgramData\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:3: DataConversionWarning:\n",
"\n",
"A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n",
"\n"
]
},
{
"data": {
"text/plain": [
"RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
" max_features='auto', max_leaf_nodes=None,\n",
" min_impurity_decrease=0.0, min_impurity_split=None,\n",
" min_samples_leaf=1, min_samples_split=2,\n",
" min_weight_fraction_leaf=0.0, n_estimators=10,\n",
" n_jobs=None, oob_score=False, random_state=42, verbose=0,\n",
" warm_start=False)"
]
},
"execution_count": 237,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.ensemble import RandomForestRegressor\n",
"regressor = RandomForestRegressor(n_estimators=10,random_state=42)\n",
"regressor.fit(X,Y)"
]
},
{
"cell_type": "code",
"execution_count": 238,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Prediction: 475.7 - Day: [0] - Actual: [444]\n",
"Prediction: 475.7 - Day: [1] - Actual: [444]\n",
"Prediction: 549.2 - Day: [2] - Actual: [549]\n",
"Prediction: 769.5 - Day: [3] - Actual: [761]\n",
"Prediction: 939.2 - Day: [4] - Actual: [1058]\n",
"Prediction: 1247.3 - Day: [5] - Actual: [1423]\n",
"Prediction: 3091.3 - Day: [6] - Actual: [3554]\n",
"Prediction: 3304.4 - Day: [7] - Actual: [3554]\n",
"Prediction: 4948.5 - Day: [8] - Actual: [4903]\n",
"Prediction: 5894.8 - Day: [9] - Actual: [5806]\n",
"Prediction: 6883.6 - Day: [10] - Actual: [7153]\n",
"Prediction: 9969.8 - Day: [11] - Actual: [11177]\n",
"Prediction: 13287.5 - Day: [12] - Actual: [13522]\n",
"Prediction: 14865.5 - Day: [13] - Actual: [16678]\n",
"Prediction: 19841.1 - Day: [14] - Actual: [19665]\n",
"Prediction: 21946.1 - Day: [15] - Actual: [22112]\n",
"Prediction: 24315.4 - Day: [16] - Actual: [24953]\n",
"Prediction: 26709.0 - Day: [17] - Actual: [27100]\n",
"Prediction: 28910.1 - Day: [18] - Actual: [29631]\n",
"Prediction: 31262.7 - Day: [19] - Actual: [31728]\n",
"Prediction: 32664.9 - Day: [20] - Actual: [33366]\n",
"Prediction: 35306.2 - Day: [21] - Actual: [33366]\n",
"Prediction: 47282.3 - Day: [22] - Actual: [48206]\n",
"Prediction: 53970.3 - Day: [23] - Actual: [54406]\n",
"Prediction: 55880.4 - Day: [24] - Actual: [56249]\n",
"Prediction: 57782.8 - Day: [25] - Actual: [58182]\n",
"Prediction: 59977.6 - Day: [26] - Actual: [59989]\n",
"Prediction: 61004.8 - Day: [27] - Actual: [61682]\n",
"Prediction: 61897.6 - Day: [28] - Actual: [62031]\n",
"Prediction: 62270.9 - Day: [29] - Actual: [62442]\n",
"Prediction: 62902.4 - Day: [30] - Actual: [62662]\n",
"Prediction: 63799.6 - Day: [31] - Actual: [64084]\n",
"Prediction: 64084.0 - Day: [32] - Actual: [64084]\n",
"Prediction: 64205.8 - Day: [33] - Actual: [64287]\n",
"Prediction: 64656.1 - Day: [34] - Actual: [64786]\n",
"Prediction: 65228.7 - Day: [35] - Actual: [65187]\n",
"Prediction: 65351.4 - Day: [36] - Actual: [65596]\n",
"Prediction: 65917.9 - Day: [37] - Actual: [65914]\n",
"Prediction: 66366.4 - Day: [38] - Actual: [66337]\n",
"Prediction: 66636.7 - Day: [39] - Actual: [66907]\n",
"\n",
"Accuracy of : 0.9995179670300028\n"
]
}
],
"source": [
"predictions = regressor.predict(X)\n",
"for x in range(len(predictions)):\n",
" print(\"Prediction: \",predictions[x],\"- Day:\", X[x],\"- Actual: \", Y[x])\n",
" \n",
"acc = regressor.score(X,Y)\n",
"print(\"\\nAccuracy of : \",acc)"
2020-03-01 21:33:06 +01:00
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 239,
2020-03-01 21:33:06 +01:00
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
2020-03-02 21:22:49 +01:00
"name": "Actual Cases",
2020-03-01 21:33:06 +01:00
"type": "scatter",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"y": [
444,
444,
549,
761,
1058,
1423,
3554,
3554,
4903,
5806,
7153,
11177,
13522,
16678,
19665,
22112,
24953,
27100,
29631,
31728,
33366,
33366,
48206,
54406,
56249,
58182,
59989,
61682,
62031,
62442,
62662,
64084,
64084,
64287,
64786,
65187,
65596,
65914,
2020-03-02 21:22:49 +01:00
66337,
66907
]
2020-03-01 21:33:06 +01:00
},
{
2020-03-02 21:22:49 +01:00
"name": "Predicted",
2020-03-01 21:33:06 +01:00
"type": "scatter",
"x": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
2020-03-02 21:22:49 +01:00
38,
39
2020-03-01 21:33:06 +01:00
],
"y": [
2020-03-02 21:22:49 +01:00
475.7,
475.7,
549.2,
769.5,
939.2,
1247.3,
3091.3,
3304.4,
4948.5,
5894.8,
6883.6,
9969.8,
13287.5,
14865.5,
19841.1,
21946.1,
24315.4,
26709,
28910.1,
31262.7,
32664.9,
35306.2,
47282.3,
53970.3,
55880.4,
57782.8,
59977.6,
61004.8,
61897.6,
62270.9,
62902.4,
63799.6,
64084,
64205.8,
64656.1,
65228.7,
65351.4,
65917.9,
66366.4,
66636.7
]
2020-03-01 21:33:06 +01:00
}
],
"layout": {
2020-03-02 21:22:49 +01:00
"font": {
"color": "#7f7f7f",
"family": "Courier New, monospace",
"size": 18
2020-03-01 21:33:06 +01:00
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
2020-03-02 21:22:49 +01:00
"title": {
"text": "Forecast of cases using RF"
},
2020-03-01 21:33:06 +01:00
"xaxis": {
"title": {
2020-03-02 21:22:49 +01:00
"text": "Day"
2020-03-01 21:33:06 +01:00
}
},
"yaxis": {
"title": {
"text": "Values"
}
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
2020-03-02 21:22:49 +01:00
" <div id=\"cb5c3113-39a6-469f-80e3-14aff8c4f144\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
2020-03-01 21:33:06 +01:00
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" \n",
2020-03-02 21:22:49 +01:00
" if (document.getElementById(\"cb5c3113-39a6-469f-80e3-14aff8c4f144\")) {\n",
2020-03-01 21:33:06 +01:00
" Plotly.newPlot(\n",
2020-03-02 21:22:49 +01:00
" 'cb5c3113-39a6-469f-80e3-14aff8c4f144',\n",
" [{\"name\": \"Actual Cases\", \"type\": \"scatter\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"y\": [444, 444, 549, 761, 1058, 1423, 3554, 3554, 4903, 5806, 7153, 11177, 13522, 16678, 19665, 22112, 24953, 27100, 29631, 31728, 33366, 33366, 48206, 54406, 56249, 58182, 59989, 61682, 62031, 62442, 62662, 64084, 64084, 64287, 64786, 65187, 65596, 65914, 66337, 66907]}, {\"name\": \"Predicted\", \"type\": \"scatter\", \"x\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], \"y\": [475.7, 475.7, 549.2, 769.5, 939.2, 1247.3, 3091.3, 3304.4, 4948.5, 5894.8, 6883.6, 9969.8, 13287.5, 14865.5, 19841.1, 21946.1, 24315.4, 26709.0, 28910.1, 31262.7, 32664.9, 35306.2, 47282.3, 53970.3, 55880.4, 57782.8, 59977.6, 61004.8, 61897.6, 62270.9, 62902.4, 63799.6, 64084.0, 64205.8, 64656.1, 65228.7, 65351.4, 65917.9, 66366.4, 66636.7]}],\n",
" {\"font\": {\"color\": \"#7f7f7f\", \"family\": \"Courier New, monospace\", \"size\": 18}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [
2020-03-01 21:33:06 +01:00
" {\"responsive\": true}\n",
" ).then(function(){\n",
" \n",
2020-03-02 21:22:49 +01:00
"var gd = document.getElementById('cb5c3113-39a6-469f-80e3-14aff8c4f144');\n",
2020-03-01 21:33:06 +01:00
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2020-03-01 22:50:58 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"Accuracy of : 0.9995179670300028\n"
2020-03-01 22:50:58 +01:00
]
}
],
"source": [
2020-03-02 21:22:49 +01:00
"#plt.scatter(X, Y)\n",
"#plt.plot(X, Y, color=\"red\")\n",
"newY=[]\n",
"newX=[]\n",
2020-03-01 22:50:58 +01:00
"\n",
"\n",
2020-03-02 21:22:49 +01:00
" \n",
"for i in range(len(Y)):\n",
" newY+=[Y[i][0]]\n",
2020-03-01 22:50:58 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"for i in range(len(X)):\n",
" newX+=[X[i][0]]\n",
"import plotly.graph_objects as go\n",
2020-03-01 22:50:58 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"fig = go.Figure()\n",
2020-03-01 22:50:58 +01:00
"\n",
2020-03-02 21:22:49 +01:00
"fig.add_trace(go.Scatter(\n",
" x=newX,\n",
" y=newY,\n",
" name=\"Actual Cases\" # this sets its legend entry\n",
"))\n",
"\n",
"fig.add_trace(go.Scatter(\n",
" x=newX,\n",
" y=predictions,\n",
" name=\"Predicted\" # this sets its legend entry\n",
"))\n",
"\n",
"fig.update_layout(\n",
" title=\"Forecast of cases using RF\",\n",
" xaxis_title=\"Day\",\n",
" yaxis_title=\"Values\",\n",
" font=dict(\n",
" family=\"Courier New, monospace\",\n",
" size=18,\n",
" color=\"#7f7f7f\"\n",
" )\n",
")\n",
"\n",
"fig.show()\n",
"\n",
"acc = regressor.score(X,Y)\n",
"print(\"\\nAccuracy of : \",acc)\n"
2020-03-01 22:50:58 +01:00
]
},
{
"cell_type": "code",
2020-03-02 21:22:49 +01:00
"execution_count": 240,
2020-03-01 22:50:58 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2020-03-02 21:22:49 +01:00
"array([ 475.7, 475.7, 549.2, 769.5, 939.2, 1247.3, 3091.3,\n",
" 3304.4, 4948.5, 5894.8, 6883.6, 9969.8, 13287.5, 14865.5,\n",
" 19841.1, 21946.1, 24315.4, 26709. , 28910.1, 31262.7, 32664.9,\n",
" 35306.2, 47282.3, 53970.3, 55880.4, 57782.8, 59977.6, 61004.8,\n",
" 61897.6, 62270.9, 62902.4, 63799.6, 64084. , 64205.8, 64656.1,\n",
" 65228.7, 65351.4, 65917.9, 66366.4, 66636.7])"
2020-03-01 22:50:58 +01:00
]
},
2020-03-02 21:22:49 +01:00
"execution_count": 240,
2020-03-01 22:50:58 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2020-03-02 21:22:49 +01:00
"predictions"
2020-03-01 22:50:58 +01:00
]
},
{
"cell_type": "code",
2020-03-04 16:54:16 +01:00
"execution_count": 1,
2020-03-01 22:50:58 +01:00
"metadata": {},
2020-03-04 16:54:16 +01:00
"outputs": [],
2020-03-01 22:50:58 +01:00
"source": [
2020-03-02 21:22:49 +01:00
"# Import tools needed for visualization\n",
2020-03-01 22:50:58 +01:00
"\n",
2020-03-04 16:54:16 +01:00
"#feature_list = list(df_hubei.columns[0])\n",
"#from sklearn.tree import export_graphviz\n",
"#import pydot\n",
"#rf_small = RandomForestRegressor(n_estimators=10, max_depth = 3)\n",
"#rf_small.fit(train_features, train_labels)# Extract the small tree\n",
"#tree_small = rf_small.estimators_[5]# Save the tree as a png image\n",
"#export_graphviz(tree_small, out_file = 'small_tree.dot', feature_names = [\"Values\"], rounded = True, precision = 1)\n",
2020-03-02 21:22:49 +01:00
"\n",
2020-03-04 16:54:16 +01:00
"#(graph, ) = pydot.graph_from_dot_file('small_tree.dot')\n",
"#graph.write_png('small_tree.png');"
2020-03-01 22:50:58 +01:00
]
},
2020-03-01 21:33:06 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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",
2020-03-02 21:22:49 +01:00
"version": "3.7.4"
2020-03-01 21:33:06 +01:00
}
},
"nbformat": 4,
2020-03-04 16:54:16 +01:00
"nbformat_minor": 4
2020-03-01 21:33:06 +01:00
}