diff --git a/1anno/2trimestre/Coding for DataScience/Python/.ipynb_checkpoints/COVID-19 Analysis-checkpoint.ipynb b/1anno/2trimestre/Coding for DataScience/Python/.ipynb_checkpoints/COVID-19 Analysis-checkpoint.ipynb index e63aa5817..22197c9ab 100644 --- a/1anno/2trimestre/Coding for DataScience/Python/.ipynb_checkpoints/COVID-19 Analysis-checkpoint.ipynb +++ b/1anno/2trimestre/Coding for DataScience/Python/.ipynb_checkpoints/COVID-19 Analysis-checkpoint.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 353, + "execution_count": 98, "metadata": {}, "outputs": [ { @@ -59,7 +59,7 @@ " \n", " \n", " \n", - " count\n", + " count\n", " 119.000000\n", " 119.000000\n", " 119.000000\n", @@ -83,7 +83,7 @@ " 119.000000\n", " \n", " \n", - " mean\n", + " mean\n", " 32.195406\n", " 40.126887\n", " 4.663866\n", @@ -107,7 +107,7 @@ " 722.798319\n", " \n", " \n", - " std\n", + " std\n", " 20.305522\n", " 85.839690\n", " 40.731714\n", @@ -131,7 +131,7 @@ " 6079.237047\n", " \n", " \n", - " min\n", + " min\n", " -40.900600\n", " -123.869500\n", " 0.000000\n", @@ -155,7 +155,7 @@ " 0.000000\n", " \n", " \n", - " 25%\n", + " 25%\n", " 26.447150\n", " 3.000000\n", " 0.000000\n", @@ -179,7 +179,7 @@ " 1.000000\n", " \n", " \n", - " 50%\n", + " 50%\n", " 35.443700\n", " 53.000000\n", " 0.000000\n", @@ -203,7 +203,7 @@ " 7.000000\n", " \n", " \n", - " 75%\n", + " 75%\n", " 43.659650\n", " 113.487200\n", " 0.000000\n", @@ -227,7 +227,7 @@ " 101.000000\n", " \n", " \n", - " max\n", + " max\n", " 64.963100\n", " 174.886000\n", " 444.000000\n", @@ -299,7 +299,7 @@ "[8 rows x 41 columns]" ] }, - "execution_count": 353, + "execution_count": 98, "metadata": {}, "output_type": "execute_result" } @@ -313,7 +313,7 @@ }, { "cell_type": "code", - "execution_count": 354, + "execution_count": 99, "metadata": {}, "outputs": [ { @@ -362,10 +362,10 @@ " \n", " \n", " \n", - " 0\n", + " 0\n", " Anhui\n", " Mainland China\n", - " 31.8257\n", + " 31.82570\n", " 117.2264\n", " 1\n", " 9\n", @@ -386,10 +386,10 @@ " 990\n", " \n", " \n", - " 1\n", + " 1\n", " Beijing\n", " Mainland China\n", - " 40.1824\n", + " 40.18240\n", " 116.4142\n", " 14\n", " 22\n", @@ -410,10 +410,10 @@ " 411\n", " \n", " \n", - " 2\n", + " 2\n", " Chongqing\n", " Mainland China\n", - " 30.0572\n", + " 30.05720\n", " 107.8740\n", " 6\n", " 9\n", @@ -434,10 +434,10 @@ " 576\n", " \n", " \n", - " 3\n", + " 3\n", " Fujian\n", " Mainland China\n", - " 26.0789\n", + " 26.07890\n", " 117.9874\n", " 1\n", " 5\n", @@ -458,10 +458,10 @@ " 296\n", " \n", " \n", - " 4\n", + " 4\n", " Gansu\n", " Mainland China\n", - " 36.0611\n", + " 36.06110\n", " 103.8343\n", " 0\n", " 2\n", @@ -482,7 +482,607 @@ " 91\n", " \n", " \n", + " 5\n", + " Guangdong\n", + " Mainland China\n", + " 23.34170\n", + " 113.4244\n", + " 26\n", + " 32\n", + " 53\n", + " 78\n", + " 111\n", + " 151\n", " ...\n", + " 1332\n", + " 1333\n", + " 1339\n", + " 1342\n", + " 1345\n", + " 1347\n", + " 1347\n", + " 1347\n", + " 1348\n", + " 1349\n", + " \n", + " \n", + " 6\n", + " Guangxi\n", + " Mainland China\n", + " 23.82980\n", + " 108.7881\n", + " 2\n", + " 5\n", + " 23\n", + " 23\n", + " 36\n", + " 46\n", + " ...\n", + " 245\n", + " 246\n", + " 249\n", + " 249\n", + " 251\n", + " 252\n", + " 252\n", + " 252\n", + " 252\n", + " 252\n", + " \n", + " \n", + " 7\n", + " Guizhou\n", + " Mainland China\n", + " 26.81540\n", + " 106.8748\n", + " 1\n", + " 3\n", + " 3\n", + " 4\n", + " 5\n", + " 7\n", + " ...\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " \n", + " \n", + " 8\n", + " Hainan\n", + " Mainland China\n", + " 19.19590\n", + " 109.7453\n", + " 4\n", + " 5\n", + " 8\n", + " 19\n", + " 22\n", + " 33\n", + " ...\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " \n", + " \n", + " 9\n", + " Hebei\n", + " Mainland China\n", + " 38.04280\n", + " 114.5149\n", + " 1\n", + " 1\n", + " 2\n", + " 8\n", + " 13\n", + " 18\n", + " ...\n", + " 307\n", + " 308\n", + " 309\n", + " 311\n", + " 311\n", + " 311\n", + " 312\n", + " 317\n", + " 318\n", + " 318\n", + " \n", + " \n", + " 10\n", + " Heilongjiang\n", + " Mainland China\n", + " 47.86200\n", + " 127.7615\n", + " 0\n", + " 2\n", + " 4\n", + " 9\n", + " 15\n", + " 21\n", + " ...\n", + " 476\n", + " 479\n", + " 479\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " \n", + " \n", + " 11\n", + " Henan\n", + " Mainland China\n", + " 33.88202\n", + " 113.6140\n", + " 5\n", + " 5\n", + " 9\n", + " 32\n", + " 83\n", + " 128\n", + " ...\n", + " 1265\n", + " 1267\n", + " 1270\n", + " 1271\n", + " 1271\n", + " 1271\n", + " 1271\n", + " 1272\n", + " 1272\n", + " 1272\n", + " \n", + " \n", + " 12\n", + " Hubei\n", + " Mainland China\n", + " 30.97560\n", + " 112.2707\n", + " 444\n", + " 444\n", + " 549\n", + " 761\n", + " 1058\n", + " 1423\n", + " ...\n", + " 62442\n", + " 62662\n", + " 64084\n", + " 64084\n", + " 64287\n", + " 64786\n", + " 65187\n", + " 65596\n", + " 65914\n", + " 66337\n", + " \n", + " \n", + " 13\n", + " Hunan\n", + " Mainland China\n", + " 27.61040\n", + " 111.7088\n", + " 4\n", + " 9\n", + " 24\n", + " 43\n", + " 69\n", + " 100\n", + " ...\n", + " 1010\n", + " 1011\n", + " 1013\n", + " 1016\n", + " 1016\n", + " 1016\n", + " 1016\n", + " 1017\n", + " 1017\n", + " 1018\n", + " \n", + " \n", + " 14\n", + " Inner Mongolia\n", + " Mainland China\n", + " 44.09350\n", + " 113.9448\n", + " 0\n", + " 0\n", + " 1\n", + " 7\n", + " 7\n", + " 11\n", + " ...\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " \n", + " \n", + " 15\n", + " Jiangsu\n", + " Mainland China\n", + " 32.97110\n", + " 119.4550\n", + " 1\n", + " 5\n", + " 9\n", + " 18\n", + " 33\n", + " 47\n", + " ...\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " \n", + " \n", + " 16\n", + " Jiangxi\n", + " Mainland China\n", + " 27.61400\n", + " 115.7221\n", + " 2\n", + " 7\n", + " 18\n", + " 18\n", + " 36\n", + " 72\n", + " ...\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 935\n", + " 935\n", + " \n", + " \n", + " 17\n", + " Jilin\n", + " Mainland China\n", + " 43.66610\n", + " 126.1923\n", + " 0\n", + " 1\n", + " 3\n", + " 4\n", + " 4\n", + " 6\n", + " ...\n", + " 91\n", + " 91\n", + " 91\n", + " 91\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " \n", + " \n", + " 18\n", + " Liaoning\n", + " Mainland China\n", + " 41.29560\n", + " 122.6085\n", + " 2\n", + " 3\n", + " 4\n", + " 17\n", + " 21\n", + " 27\n", + " ...\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " \n", + " \n", + " 19\n", + " Ningxia\n", + " Mainland China\n", + " 37.26920\n", + " 106.1655\n", + " 1\n", + " 1\n", + " 2\n", + " 3\n", + " 4\n", + " 7\n", + " ...\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 72\n", + " 72\n", + " 73\n", + " \n", + " \n", + " 20\n", + " Qinghai\n", + " Mainland China\n", + " 35.74520\n", + " 95.9956\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " ...\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " \n", + " \n", + " 21\n", + " Shaanxi\n", + " Mainland China\n", + " 35.19170\n", + " 108.8701\n", + " 0\n", + " 3\n", + " 5\n", + " 15\n", + " 22\n", + " 35\n", + " ...\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " \n", + " \n", + " 22\n", + " Shandong\n", + " Mainland China\n", + " 36.34270\n", + " 118.1498\n", + " 2\n", + " 6\n", + " 15\n", + " 27\n", + " 46\n", + " 75\n", + " ...\n", + " 546\n", + " 749\n", + " 750\n", + " 754\n", + " 755\n", + " 756\n", + " 756\n", + " 756\n", + " 756\n", + " 756\n", + " \n", + " \n", + " 23\n", + " Shanghai\n", + " Mainland China\n", + " 31.20200\n", + " 121.4491\n", + " 9\n", + " 16\n", + " 20\n", + " 33\n", + " 40\n", + " 53\n", + " ...\n", + " 334\n", + " 334\n", + " 335\n", + " 335\n", + " 335\n", + " 336\n", + " 337\n", + " 337\n", + " 337\n", + " 337\n", + " \n", + " \n", + " 24\n", + " Shanxi\n", + " Mainland China\n", + " 37.57770\n", + " 112.2922\n", + " 1\n", + " 1\n", + " 1\n", + " 6\n", + " 9\n", + " 13\n", + " ...\n", + " 132\n", + " 132\n", + " 132\n", + " 132\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " \n", + " \n", + " 25\n", + " Sichuan\n", + " Mainland China\n", + " 30.61710\n", + " 102.7103\n", + " 5\n", + " 8\n", + " 15\n", + " 28\n", + " 44\n", + " 69\n", + " ...\n", + " 520\n", + " 525\n", + " 526\n", + " 526\n", + " 527\n", + " 529\n", + " 531\n", + " 534\n", + " 538\n", + " 538\n", + " \n", + " \n", + " 26\n", + " Tianjin\n", + " Mainland China\n", + " 39.30540\n", + " 117.3230\n", + " 4\n", + " 4\n", + " 8\n", + " 10\n", + " 14\n", + " 23\n", + " ...\n", + " 131\n", + " 132\n", + " 135\n", + " 135\n", + " 135\n", + " 135\n", + " 135\n", + " 136\n", + " 136\n", + " 136\n", + " \n", + " \n", + " 27\n", + " Tibet\n", + " Mainland China\n", + " 31.69270\n", + " 88.0924\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 28\n", + " Xinjiang\n", + " Mainland China\n", + " 41.11290\n", + " 85.2401\n", + " 0\n", + " 2\n", + " 2\n", + " 3\n", + " 4\n", + " 5\n", + " ...\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " \n", + " \n", + " 29\n", + " Yunnan\n", + " Mainland China\n", + " 24.97400\n", + " 101.4870\n", + " 1\n", + " 2\n", + " 5\n", + " 11\n", + " 16\n", + " 26\n", + " ...\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " \n", + " \n", + " ...\n", " ...\n", " ...\n", " ...\n", @@ -506,10 +1106,610 @@ " ...\n", " \n", " \n", - " 114\n", + " 89\n", + " NaN\n", + " Algeria\n", + " 28.03390\n", + " 1.6596\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 90\n", + " NaN\n", + " Croatia\n", + " 45.10000\n", + " 15.2000\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 3\n", + " 3\n", + " 5\n", + " 6\n", + " \n", + " \n", + " 91\n", + " NaN\n", + " Switzerland\n", + " 46.81820\n", + " 8.2275\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 8\n", + " 8\n", + " 18\n", + " \n", + " \n", + " 92\n", + " NaN\n", + " Austria\n", + " 47.51620\n", + " 14.5501\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " 2\n", + " 3\n", + " 3\n", + " 9\n", + " \n", + " \n", + " 93\n", + " NaN\n", + " Israel\n", + " 31.00000\n", + " 35.0000\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 2\n", + " 3\n", + " 4\n", + " 7\n", + " \n", + " \n", + " 94\n", + " NaN\n", + " Pakistan\n", + " 30.37530\n", + " 69.3451\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " 2\n", + " 2\n", + " 4\n", + " \n", + " \n", + " 95\n", + " NaN\n", + " Brazil\n", + " -14.23500\n", + " -51.9253\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 2\n", + " \n", + " \n", + " 96\n", + " NaN\n", + " Georgia\n", + " 42.31540\n", + " 43.3569\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 97\n", + " NaN\n", + " Greece\n", + " 39.07420\n", + " 21.8243\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 3\n", + " 4\n", + " 4\n", + " \n", + " \n", + " 98\n", + " NaN\n", + " North Macedonia\n", + " 41.60860\n", + " 21.7453\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 99\n", + " NaN\n", + " Norway\n", + " 60.47200\n", + " 8.4689\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " 15\n", + " \n", + " \n", + " 100\n", + " NaN\n", + " Romania\n", + " 45.94320\n", + " 24.9668\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 3\n", + " 3\n", + " \n", + " \n", + " 101\n", + " NaN\n", + " Denmark\n", + " 56.26390\n", + " 9.5018\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 3\n", + " \n", + " \n", + " 102\n", + " NaN\n", + " Estonia\n", + " 58.59530\n", + " 25.0136\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 103\n", + " NaN\n", + " Netherlands\n", + " 52.13260\n", + " 5.2913\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " \n", + " \n", + " 104\n", + " NaN\n", + " San Marino\n", + " 43.94240\n", + " 12.4578\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 105\n", + " NaN\n", + " Belarus\n", + " 53.70980\n", + " 27.9534\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 106\n", + " Montreal, QC\n", + " Canada\n", + " 45.50170\n", + " -73.5673\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 107\n", + " NaN\n", + " Iceland\n", + " 64.96310\n", + " -19.0208\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 108\n", + " NaN\n", + " Lithuania\n", + " 55.16940\n", + " 23.8813\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 109\n", + " NaN\n", + " Mexico\n", + " 23.63450\n", + " -102.5528\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 4\n", + " \n", + " \n", + " 110\n", + " NaN\n", + " New Zealand\n", + " -40.90060\n", + " 174.8860\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 111\n", + " NaN\n", + " Nigeria\n", + " 9.08200\n", + " 8.6753\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 112\n", + " Western Australia\n", + " Australia\n", + " -31.95050\n", + " 115.8605\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " \n", + " \n", + " 113\n", + " NaN\n", + " Ireland\n", + " 53.14240\n", + " -7.6921\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " \n", + " \n", + " 114\n", " NaN\n", " Luxembourg\n", - " 49.8153\n", + " 49.81530\n", " 6.1296\n", " 0\n", " 0\n", @@ -530,10 +1730,10 @@ " 1\n", " \n", " \n", - " 115\n", + " 115\n", " NaN\n", " Monaco\n", - " 43.7333\n", + " 43.73330\n", " 7.4167\n", " 0\n", " 0\n", @@ -554,10 +1754,10 @@ " 1\n", " \n", " \n", - " 116\n", + " 116\n", " NaN\n", " Qatar\n", - " 25.3548\n", + " 25.35480\n", " 51.1839\n", " 0\n", " 0\n", @@ -578,10 +1778,10 @@ " 1\n", " \n", " \n", - " 117\n", + " 117\n", " Portland, OR\n", " US\n", - " 45.5051\n", + " 45.50510\n", " -122.6750\n", " 0\n", " 0\n", @@ -602,10 +1802,10 @@ " 1\n", " \n", " \n", - " 118\n", + " 118\n", " Snohomish County, WA\n", " US\n", - " 48.0330\n", + " 48.03300\n", " -121.8339\n", " 0\n", " 0\n", @@ -631,18 +1831,68 @@ "" ], "text/plain": [ - " Province/State Country/Region Lat Long 1/22/20 \\\n", - "0 Anhui Mainland China 31.8257 117.2264 1 \n", - "1 Beijing Mainland China 40.1824 116.4142 14 \n", - "2 Chongqing Mainland China 30.0572 107.8740 6 \n", - "3 Fujian Mainland China 26.0789 117.9874 1 \n", - "4 Gansu Mainland China 36.0611 103.8343 0 \n", - ".. ... ... ... ... ... \n", - "114 NaN Luxembourg 49.8153 6.1296 0 \n", - "115 NaN Monaco 43.7333 7.4167 0 \n", - "116 NaN Qatar 25.3548 51.1839 0 \n", - "117 Portland, OR US 45.5051 -122.6750 0 \n", - "118 Snohomish County, WA US 48.0330 -121.8339 0 \n", + " Province/State Country/Region Lat Long 1/22/20 \\\n", + "0 Anhui Mainland China 31.82570 117.2264 1 \n", + "1 Beijing Mainland China 40.18240 116.4142 14 \n", + "2 Chongqing Mainland China 30.05720 107.8740 6 \n", + "3 Fujian Mainland China 26.07890 117.9874 1 \n", + "4 Gansu Mainland China 36.06110 103.8343 0 \n", + "5 Guangdong Mainland China 23.34170 113.4244 26 \n", + "6 Guangxi Mainland China 23.82980 108.7881 2 \n", + "7 Guizhou Mainland China 26.81540 106.8748 1 \n", + "8 Hainan Mainland China 19.19590 109.7453 4 \n", + "9 Hebei Mainland China 38.04280 114.5149 1 \n", + "10 Heilongjiang Mainland China 47.86200 127.7615 0 \n", + "11 Henan Mainland China 33.88202 113.6140 5 \n", + "12 Hubei Mainland China 30.97560 112.2707 444 \n", + "13 Hunan Mainland China 27.61040 111.7088 4 \n", + "14 Inner Mongolia Mainland China 44.09350 113.9448 0 \n", + "15 Jiangsu Mainland China 32.97110 119.4550 1 \n", + "16 Jiangxi Mainland China 27.61400 115.7221 2 \n", + "17 Jilin Mainland China 43.66610 126.1923 0 \n", + "18 Liaoning Mainland China 41.29560 122.6085 2 \n", + "19 Ningxia Mainland China 37.26920 106.1655 1 \n", + "20 Qinghai Mainland China 35.74520 95.9956 0 \n", + "21 Shaanxi Mainland China 35.19170 108.8701 0 \n", + "22 Shandong Mainland China 36.34270 118.1498 2 \n", + "23 Shanghai Mainland China 31.20200 121.4491 9 \n", + "24 Shanxi Mainland China 37.57770 112.2922 1 \n", + "25 Sichuan Mainland China 30.61710 102.7103 5 \n", + "26 Tianjin Mainland China 39.30540 117.3230 4 \n", + "27 Tibet Mainland China 31.69270 88.0924 0 \n", + "28 Xinjiang Mainland China 41.11290 85.2401 0 \n", + "29 Yunnan Mainland China 24.97400 101.4870 1 \n", + ".. ... ... ... ... ... \n", + "89 NaN Algeria 28.03390 1.6596 0 \n", + "90 NaN Croatia 45.10000 15.2000 0 \n", + "91 NaN Switzerland 46.81820 8.2275 0 \n", + "92 NaN Austria 47.51620 14.5501 0 \n", + "93 NaN Israel 31.00000 35.0000 0 \n", + "94 NaN Pakistan 30.37530 69.3451 0 \n", + "95 NaN Brazil -14.23500 -51.9253 0 \n", + "96 NaN Georgia 42.31540 43.3569 0 \n", + "97 NaN Greece 39.07420 21.8243 0 \n", + "98 NaN North Macedonia 41.60860 21.7453 0 \n", + "99 NaN Norway 60.47200 8.4689 0 \n", + "100 NaN Romania 45.94320 24.9668 0 \n", + "101 NaN Denmark 56.26390 9.5018 0 \n", + "102 NaN Estonia 58.59530 25.0136 0 \n", + "103 NaN Netherlands 52.13260 5.2913 0 \n", + "104 NaN San Marino 43.94240 12.4578 0 \n", + "105 NaN Belarus 53.70980 27.9534 0 \n", + "106 Montreal, QC Canada 45.50170 -73.5673 0 \n", + "107 NaN Iceland 64.96310 -19.0208 0 \n", + "108 NaN Lithuania 55.16940 23.8813 0 \n", + "109 NaN Mexico 23.63450 -102.5528 0 \n", + "110 NaN New Zealand -40.90060 174.8860 0 \n", + "111 NaN Nigeria 9.08200 8.6753 0 \n", + "112 Western Australia Australia -31.95050 115.8605 0 \n", + "113 NaN Ireland 53.14240 -7.6921 0 \n", + "114 NaN Luxembourg 49.81530 6.1296 0 \n", + "115 NaN Monaco 43.73330 7.4167 0 \n", + "116 NaN Qatar 25.35480 51.1839 0 \n", + "117 Portland, OR US 45.50510 -122.6750 0 \n", + "118 Snohomish County, WA US 48.03300 -121.8339 0 \n", "\n", " 1/23/20 1/24/20 1/25/20 1/26/20 1/27/20 ... 2/20/20 2/21/20 \\\n", "0 9 15 39 60 70 ... 987 988 \n", @@ -650,7 +1900,57 @@ "2 9 27 57 75 110 ... 567 572 \n", "3 5 10 18 35 59 ... 293 293 \n", "4 2 2 4 7 14 ... 91 91 \n", + "5 32 53 78 111 151 ... 1332 1333 \n", + "6 5 23 23 36 46 ... 245 246 \n", + "7 3 3 4 5 7 ... 146 146 \n", + "8 5 8 19 22 33 ... 168 168 \n", + "9 1 2 8 13 18 ... 307 308 \n", + "10 2 4 9 15 21 ... 476 479 \n", + "11 5 9 32 83 128 ... 1265 1267 \n", + "12 444 549 761 1058 1423 ... 62442 62662 \n", + "13 9 24 43 69 100 ... 1010 1011 \n", + "14 0 1 7 7 11 ... 75 75 \n", + "15 5 9 18 33 47 ... 631 631 \n", + "16 7 18 18 36 72 ... 934 934 \n", + "17 1 3 4 4 6 ... 91 91 \n", + "18 3 4 17 21 27 ... 121 121 \n", + "19 1 2 3 4 7 ... 71 71 \n", + "20 0 0 1 1 6 ... 18 18 \n", + "21 3 5 15 22 35 ... 245 245 \n", + "22 6 15 27 46 75 ... 546 749 \n", + "23 16 20 33 40 53 ... 334 334 \n", + "24 1 1 6 9 13 ... 132 132 \n", + "25 8 15 28 44 69 ... 520 525 \n", + "26 4 8 10 14 23 ... 131 132 \n", + "27 0 0 0 0 0 ... 1 1 \n", + "28 2 2 3 4 5 ... 76 76 \n", + "29 2 5 11 16 26 ... 174 174 \n", ".. ... ... ... ... ... ... ... ... \n", + "89 0 0 0 0 0 ... 0 0 \n", + "90 0 0 0 0 0 ... 0 0 \n", + "91 0 0 0 0 0 ... 0 0 \n", + "92 0 0 0 0 0 ... 0 0 \n", + "93 0 0 0 0 0 ... 0 1 \n", + "94 0 0 0 0 0 ... 0 0 \n", + "95 0 0 0 0 0 ... 0 0 \n", + "96 0 0 0 0 0 ... 0 0 \n", + "97 0 0 0 0 0 ... 0 0 \n", + "98 0 0 0 0 0 ... 0 0 \n", + "99 0 0 0 0 0 ... 0 0 \n", + "100 0 0 0 0 0 ... 0 0 \n", + "101 0 0 0 0 0 ... 0 0 \n", + "102 0 0 0 0 0 ... 0 0 \n", + "103 0 0 0 0 0 ... 0 0 \n", + "104 0 0 0 0 0 ... 0 0 \n", + "105 0 0 0 0 0 ... 0 0 \n", + "106 0 0 0 0 0 ... 0 0 \n", + "107 0 0 0 0 0 ... 0 0 \n", + "108 0 0 0 0 0 ... 0 0 \n", + "109 0 0 0 0 0 ... 0 0 \n", + "110 0 0 0 0 0 ... 0 0 \n", + "111 0 0 0 0 0 ... 0 0 \n", + "112 0 0 0 0 0 ... 0 0 \n", + "113 0 0 0 0 0 ... 0 0 \n", "114 0 0 0 0 0 ... 0 0 \n", "115 0 0 0 0 0 ... 0 0 \n", "116 0 0 0 0 0 ... 0 0 \n", @@ -663,7 +1963,57 @@ "2 573 575 576 576 576 576 576 576 \n", "3 293 293 293 294 294 296 296 296 \n", "4 91 91 91 91 91 91 91 91 \n", + "5 1339 1342 1345 1347 1347 1347 1348 1349 \n", + "6 249 249 251 252 252 252 252 252 \n", + "7 146 146 146 146 146 146 146 146 \n", + "8 168 168 168 168 168 168 168 168 \n", + "9 309 311 311 311 312 317 318 318 \n", + "10 479 480 480 480 480 480 480 480 \n", + "11 1270 1271 1271 1271 1271 1272 1272 1272 \n", + "12 64084 64084 64287 64786 65187 65596 65914 66337 \n", + "13 1013 1016 1016 1016 1016 1017 1017 1018 \n", + "14 75 75 75 75 75 75 75 75 \n", + "15 631 631 631 631 631 631 631 631 \n", + "16 934 934 934 934 934 934 935 935 \n", + "17 91 91 93 93 93 93 93 93 \n", + "18 121 121 121 121 121 121 121 121 \n", + "19 71 71 71 71 71 72 72 73 \n", + "20 18 18 18 18 18 18 18 18 \n", + "21 245 245 245 245 245 245 245 245 \n", + "22 750 754 755 756 756 756 756 756 \n", + "23 335 335 335 336 337 337 337 337 \n", + "24 132 132 133 133 133 133 133 133 \n", + "25 526 526 527 529 531 534 538 538 \n", + "26 135 135 135 135 135 136 136 136 \n", + "27 1 1 1 1 1 1 1 1 \n", + "28 76 76 76 76 76 76 76 76 \n", + "29 174 174 174 174 174 174 174 174 \n", ".. ... ... ... ... ... ... ... ... \n", + "89 0 0 0 1 1 1 1 1 \n", + "90 0 0 0 1 3 3 5 6 \n", + "91 0 0 0 1 1 8 8 18 \n", + "92 0 0 0 2 2 3 3 9 \n", + "93 1 1 1 1 2 3 4 7 \n", + "94 0 0 0 0 2 2 2 4 \n", + "95 0 0 0 0 1 1 1 2 \n", + "96 0 0 0 0 1 1 1 1 \n", + "97 0 0 0 0 1 3 4 4 \n", + "98 0 0 0 0 1 1 1 1 \n", + "99 0 0 0 0 1 1 6 15 \n", + "100 0 0 0 0 1 1 3 3 \n", + "101 0 0 0 0 0 1 1 3 \n", + "102 0 0 0 0 0 1 1 1 \n", + "103 0 0 0 0 0 1 1 6 \n", + "104 0 0 0 0 0 1 1 1 \n", + "105 0 0 0 0 0 0 1 1 \n", + "106 0 0 0 0 0 0 1 1 \n", + "107 0 0 0 0 0 0 1 1 \n", + "108 0 0 0 0 0 0 1 1 \n", + "109 0 0 0 0 0 0 1 4 \n", + "110 0 0 0 0 0 0 1 1 \n", + "111 0 0 0 0 0 0 1 1 \n", + "112 0 0 0 0 0 0 0 2 \n", + "113 0 0 0 0 0 0 0 1 \n", "114 0 0 0 0 0 0 0 1 \n", "115 0 0 0 0 0 0 0 1 \n", "116 0 0 0 0 0 0 0 1 \n", @@ -673,7 +2023,7 @@ "[119 rows x 43 columns]" ] }, - "execution_count": 354, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } @@ -684,7 +2034,7 @@ }, { "cell_type": "code", - "execution_count": 355, + "execution_count": 100, "metadata": {}, "outputs": [ { @@ -731,7 +2081,7 @@ " 1128]" ] }, - "execution_count": 355, + "execution_count": 100, "metadata": {}, "output_type": "execute_result" } @@ -749,7 +2099,7 @@ }, { "cell_type": "code", - "execution_count": 356, + "execution_count": 101, "metadata": {}, "outputs": [], "source": [ @@ -769,7 +2119,7 @@ }, { "cell_type": "code", - "execution_count": 357, + "execution_count": 102, "metadata": {}, "outputs": [ { @@ -800,31 +2150,31 @@ " \n", " \n", " \n", - " 0\n", + " 0\n", " 1/22/20\n", " 0\n", " 1\n", " \n", " \n", - " 1\n", + " 1\n", " 1/23/20\n", " 0\n", " 2\n", " \n", " \n", - " 2\n", + " 2\n", " 1/24/20\n", " 0\n", " 3\n", " \n", " \n", - " 3\n", + " 3\n", " 1/25/20\n", " 0\n", " 4\n", " \n", " \n", - " 4\n", + " 4\n", " 1/26/20\n", " 0\n", " 5\n", @@ -842,7 +2192,7 @@ "4 1/26/20 0 5" ] }, - "execution_count": 357, + "execution_count": 102, "metadata": {}, "output_type": "execute_result" } @@ -853,7 +2203,7 @@ }, { "cell_type": "code", - "execution_count": 358, + "execution_count": 103, "metadata": {}, "outputs": [ { @@ -1989,20 +3339,20 @@ "
\n", " \n", " \n", - "
\n", + "
\n", " \n", + "
" + ] + }, + "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": 116, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "hoverlabel": { + "namelength": 0 + }, + "hovertemplate": "Lags=%{x}
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 + ], + "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 + ], + "yaxis": "y" + }, + { + "hoverlabel": { + "namelength": 0 + }, + "hovertemplate": "OLS trendline
Values = 2224.37 * Lags + -7927.82
R2=0.945835

Lags=%{x}
Values=%{y} (trend)", + "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 + ], + "xaxis": "x", + "y": [ + -7927.823076923082, + -5703.455870445348, + -3479.0886639676155, + -1254.7214574898817, + 969.6457489878512, + 3194.012955465584, + 5418.380161943319, + 7642.747368421052, + 9867.114574898784, + 12091.481781376518, + 14315.84898785425, + 16540.216194331984, + 18764.58340080972, + 20988.95060728745, + 23213.317813765185, + 25437.685020242916, + 27662.05222672065, + 29886.419433198385, + 32110.78663967612, + 34335.15384615385, + 36559.521052631586, + 38783.88825910932, + 41008.255465587055, + 43232.62267206479, + 45456.989878542525, + 47681.35708502025, + 49905.72429149799, + 52130.09149797572, + 54354.45870445346, + 56578.82591093119, + 58803.19311740892, + 61027.56032388665, + 63251.92753036439, + 65476.29473684212, + 67700.66194331985, + 69925.02914979758, + 72149.39635627532, + 74373.76356275305, + 76598.13076923077 + ], + "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": [ + "
\n", + " \n", + " \n", + "
\n", + " \n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "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": 117, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD6CAYAAABDPiuvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3debzWY/7H8ddHwrFNoQynKGMZKcRBxIyxVTN+U/oxU7NoxhKDkeXXKMbYxoiyZYmUJSQk1SglKktSnRZSSWcSWhApmQ5tn98f1/fk7nSf+77Pem/v5+Phce77+n7v732d2+n7ua/tc5m7IyIi+W27dFdARETST8FAREQUDERERMFARERQMBARERQMRESEFIOBmV1pZvPM7H0ze8bMdjKz5mY2zcwWmdmzZrZDdO6O0fOS6HizmOv0jsoXmlm7mPL2UVmJmfWq6V9SREQSs2TrDMysEHgLaOHupWb2HDAW+CUwwt2HmdlDwLvuPsDMLgEOd/eLzawLcJa7/9bMWgDPAMcC+wKvAgdHb/MhcDqwFJgBdHX3+Ynqtddee3mzZs2q9luLiOShmTNnfunujeId2z7Fa2wPFJjZBmBnYAVwCvC76PgTwI3AAKBj9BhgOHC/mVlUPszdvwc+MrMSQmAAKHH3xQBmNiw6N2EwaNasGcXFxSlWX0REzOzjio4l7SZy92VAP+ATQhBYA8wEVrv7xui0pUBh9LgQ+DR67cbo/D1jy8u9pqLyeL9IdzMrNrPilStXJqu6iIikKGkwMLOGhG/qzQndO7sAHeKcWtbfZBUcq2z5toXuA929yN2LGjWK29IREZEqSGUA+TTgI3df6e4bgB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ElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Accuracy: 0.9458346650136403\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": 118, + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "predictions = linear_regressor.predict(X)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Prediction: [-7927.82307692] - Day: [0] - Actual: [444]\n", + "Prediction: [-5703.45587045] - Day: [1] - Actual: [444]\n", + "Prediction: [-3479.08866397] - Day: [2] - Actual: [549]\n", + "Prediction: [-1254.72145749] - Day: [3] - Actual: [761]\n", + "Prediction: [969.64574899] - Day: [4] - Actual: [1058]\n", + "Prediction: [3194.01295547] - Day: [5] - Actual: [1423]\n", + "Prediction: [5418.38016194] - Day: [6] - Actual: [3554]\n", + "Prediction: [7642.74736842] - Day: [7] - Actual: [3554]\n", + "Prediction: [9867.1145749] - Day: [8] - Actual: [4903]\n", + "Prediction: [12091.48178138] - Day: [9] - Actual: [5806]\n", + "Prediction: [14315.84898785] - Day: [10] - Actual: [7153]\n", + "Prediction: [16540.21619433] - Day: [11] - Actual: [11177]\n", + "Prediction: [18764.58340081] - Day: [12] - Actual: [13522]\n", + "Prediction: [20988.95060729] - Day: [13] - Actual: [16678]\n", + "Prediction: [23213.31781377] - Day: [14] - Actual: [19665]\n", + "Prediction: [25437.68502024] - Day: [15] - Actual: [22112]\n", + "Prediction: [27662.05222672] - Day: [16] - Actual: [24953]\n", + "Prediction: [29886.4194332] - Day: [17] - Actual: [27100]\n", + "Prediction: [32110.78663968] - Day: [18] - Actual: [29631]\n", + "Prediction: [34335.15384615] - Day: [19] - Actual: [31728]\n", + "Prediction: [36559.52105263] - Day: [20] - Actual: [33366]\n", + "Prediction: [38783.88825911] - Day: [21] - Actual: [33366]\n", + "Prediction: [41008.25546559] - Day: [22] - Actual: [48206]\n", + "Prediction: [43232.62267206] - Day: [23] - Actual: [54406]\n", + "Prediction: [45456.98987854] - Day: [24] - Actual: [56249]\n", + "Prediction: [47681.35708502] - Day: [25] - Actual: [58182]\n", + "Prediction: [49905.7242915] - Day: [26] - Actual: [59989]\n", + "Prediction: [52130.09149798] - Day: [27] - Actual: [61682]\n", + "Prediction: [54354.45870445] - Day: [28] - Actual: [62031]\n", + "Prediction: [56578.82591093] - Day: [29] - Actual: [62442]\n", + "Prediction: [58803.19311741] - Day: [30] - Actual: [62662]\n", + "Prediction: [61027.56032389] - Day: [31] - Actual: [64084]\n", + "Prediction: [63251.92753036] - Day: [32] - Actual: [64084]\n", + "Prediction: [65476.29473684] - Day: [33] - Actual: [64287]\n", + "Prediction: [67700.66194332] - Day: [34] - Actual: [64786]\n", + "Prediction: [69925.0291498] - Day: [35] - Actual: [65187]\n", + "Prediction: [72149.39635628] - Day: [36] - Actual: [65596]\n", + "Prediction: [74373.76356275] - Day: [37] - Actual: [65914]\n", + "Prediction: [76598.13076923] - Day: [38] - Actual: [66337]\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": 120, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Giorno 39 : 78822.49797570852\n", + "Giorno 40 : 81046.86518218626\n", + "Giorno 41 : 83271.23238866398\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": 138, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\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", + "C:\\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", + "C:\\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": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAcDklEQVR4nO3df4xc9Xnv8ffD7tqs+bV2WOjaTrCJjA2ExnYWh9Q3iB8ldrgJOCSVoFKEbqjcH0FK1Mq3dlqVVLpX0Pq2iapbpaE3NNwqTUoBLy1NuutrTEhAAtasg03GNmCT4LWDN4WtAS/ueve5f5wzMLue2T07c2bO+c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NGmyTlTKeaZtqcXkNnZwEPAl939+FSXVoil4bG7+5i7ryS6o10DXDrFd+UibjP7FHDM3XeVNk/xXbmIO7bW3VcDnwS+aGZXT3FtXuJuJera/Ia7rwLeJuoyqSQvcacqzwm87psm1+A1M+sCiI/H4vZKMU/VvrhMeyrMrI0oeX/H3R8OKXYAdx8GHifqs+wws+IOUqXf9W588evnAa9PE3c9fldrgZvM7BXge0TdKF8PIG7c/Uh8PAZsI/pLM++/k8PAYXd/On7+IFFCz3vc6cq6D2eKPq5WooLCUt4r2lyeUSxLmNgHvpWJhZI/j8//KxMLJc/E7QuI+uvmx49DwIL4tWfja4uFkhtTitmA/wt8fVJ7rmMHOoGO+Lwd+BHwKeCfmFgM/L34/ItMLAY+EJ9fzsRi4EGiQmDdf1fANbxXxMx13MBZwDkl508B6/P+O4k/90fA8vj8q3HMuY871d9a1gFM8wd0I9HoiZeBP8oohu8CR4FRor+V7yDqq9wBvBgfi3/gBvx1HO8eoLvkc74AvBQ//ltJezewN37P/2ZSUaaGuP8L0T/5ngd2x48b8x478KvAQBz3XuBP4vaLiUYFvESUFOfG7WfGz1+KX7+45LP+KI5tPyUjCOr9u2JiAs913HF8P4kfLxQ/N++/k/hzVwL98W+lhygB5z7uNB+aSi8iEqg894GLiMgUlMBFRAKlBC4iEiglcBGRQCmBi4gESglcRCRQSuAiIoH6/zOHTP4IHgQKAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Accuracy: 0.02564102564102564\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": 135, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([64084], dtype=int64)" + ] + }, + "execution_count": 135, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Y_pred = logistic.predict([[41]])\n", + "Y_pred " + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "metadata": {}, + "outputs": [], + "source": [ + "prob = logistic.predict_proba(X)" + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Accuracy: 0.2564102564102564\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\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", + "C:\\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", + "C:\\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": [ - "(ggplot(df)\n", - " + aes(x='\"Lags\"', y='Values', color='Cities')\n", - " + geom_point()\n", - " + labs(title='Covid-19 Virus cases', x='Days', y='Highway Miles per Gallon')\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)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -8282,7 +18434,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.3" } }, "nbformat": 4, diff --git a/1anno/2trimestre/Coding for DataScience/Python/COVID-19 Analysis.ipynb b/1anno/2trimestre/Coding for DataScience/Python/COVID-19 Analysis.ipynb index 443b63ca8..22197c9ab 100644 --- a/1anno/2trimestre/Coding for DataScience/Python/COVID-19 Analysis.ipynb +++ b/1anno/2trimestre/Coding for DataScience/Python/COVID-19 Analysis.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 453, + "execution_count": 98, "metadata": {}, "outputs": [ { @@ -59,7 +59,7 @@ " \n", " \n", " \n", - " count\n", + " count\n", " 119.000000\n", " 119.000000\n", " 119.000000\n", @@ -83,7 +83,7 @@ " 119.000000\n", " \n", " \n", - " mean\n", + " mean\n", " 32.195406\n", " 40.126887\n", " 4.663866\n", @@ -107,7 +107,7 @@ " 722.798319\n", " \n", " \n", - " std\n", + " std\n", " 20.305522\n", " 85.839690\n", " 40.731714\n", @@ -131,7 +131,7 @@ " 6079.237047\n", " \n", " \n", - " min\n", + " min\n", " -40.900600\n", " -123.869500\n", " 0.000000\n", @@ -155,7 +155,7 @@ " 0.000000\n", " \n", " \n", - " 25%\n", + " 25%\n", " 26.447150\n", " 3.000000\n", " 0.000000\n", @@ -179,7 +179,7 @@ " 1.000000\n", " \n", " \n", - " 50%\n", + " 50%\n", " 35.443700\n", " 53.000000\n", " 0.000000\n", @@ -203,7 +203,7 @@ " 7.000000\n", " \n", " \n", - " 75%\n", + " 75%\n", " 43.659650\n", " 113.487200\n", " 0.000000\n", @@ -227,7 +227,7 @@ " 101.000000\n", " \n", " \n", - " max\n", + " max\n", " 64.963100\n", " 174.886000\n", " 444.000000\n", @@ -299,7 +299,7 @@ "[8 rows x 41 columns]" ] }, - "execution_count": 453, + "execution_count": 98, "metadata": {}, "output_type": "execute_result" } @@ -313,7 +313,7 @@ }, { "cell_type": "code", - "execution_count": 454, + "execution_count": 99, "metadata": {}, "outputs": [ { @@ -362,10 +362,10 @@ " \n", " \n", " \n", - " 0\n", + " 0\n", " Anhui\n", " Mainland China\n", - " 31.8257\n", + " 31.82570\n", " 117.2264\n", " 1\n", " 9\n", @@ -386,10 +386,10 @@ " 990\n", " \n", " \n", - " 1\n", + " 1\n", " Beijing\n", " Mainland China\n", - " 40.1824\n", + " 40.18240\n", " 116.4142\n", " 14\n", " 22\n", @@ -410,10 +410,10 @@ " 411\n", " \n", " \n", - " 2\n", + " 2\n", " Chongqing\n", " Mainland China\n", - " 30.0572\n", + " 30.05720\n", " 107.8740\n", " 6\n", " 9\n", @@ -434,10 +434,10 @@ " 576\n", " \n", " \n", - " 3\n", + " 3\n", " Fujian\n", " Mainland China\n", - " 26.0789\n", + " 26.07890\n", " 117.9874\n", " 1\n", " 5\n", @@ -458,10 +458,10 @@ " 296\n", " \n", " \n", - " 4\n", + " 4\n", " Gansu\n", " Mainland China\n", - " 36.0611\n", + " 36.06110\n", " 103.8343\n", " 0\n", " 2\n", @@ -482,7 +482,607 @@ " 91\n", " \n", " \n", + " 5\n", + " Guangdong\n", + " Mainland China\n", + " 23.34170\n", + " 113.4244\n", + " 26\n", + " 32\n", + " 53\n", + " 78\n", + " 111\n", + " 151\n", " ...\n", + " 1332\n", + " 1333\n", + " 1339\n", + " 1342\n", + " 1345\n", + " 1347\n", + " 1347\n", + " 1347\n", + " 1348\n", + " 1349\n", + " \n", + " \n", + " 6\n", + " Guangxi\n", + " Mainland China\n", + " 23.82980\n", + " 108.7881\n", + " 2\n", + " 5\n", + " 23\n", + " 23\n", + " 36\n", + " 46\n", + " ...\n", + " 245\n", + " 246\n", + " 249\n", + " 249\n", + " 251\n", + " 252\n", + " 252\n", + " 252\n", + " 252\n", + " 252\n", + " \n", + " \n", + " 7\n", + " Guizhou\n", + " Mainland China\n", + " 26.81540\n", + " 106.8748\n", + " 1\n", + " 3\n", + " 3\n", + " 4\n", + " 5\n", + " 7\n", + " ...\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " 146\n", + " \n", + " \n", + " 8\n", + " Hainan\n", + " Mainland China\n", + " 19.19590\n", + " 109.7453\n", + " 4\n", + " 5\n", + " 8\n", + " 19\n", + " 22\n", + " 33\n", + " ...\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " 168\n", + " \n", + " \n", + " 9\n", + " Hebei\n", + " Mainland China\n", + " 38.04280\n", + " 114.5149\n", + " 1\n", + " 1\n", + " 2\n", + " 8\n", + " 13\n", + " 18\n", + " ...\n", + " 307\n", + " 308\n", + " 309\n", + " 311\n", + " 311\n", + " 311\n", + " 312\n", + " 317\n", + " 318\n", + " 318\n", + " \n", + " \n", + " 10\n", + " Heilongjiang\n", + " Mainland China\n", + " 47.86200\n", + " 127.7615\n", + " 0\n", + " 2\n", + " 4\n", + " 9\n", + " 15\n", + " 21\n", + " ...\n", + " 476\n", + " 479\n", + " 479\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " 480\n", + " \n", + " \n", + " 11\n", + " Henan\n", + " Mainland China\n", + " 33.88202\n", + " 113.6140\n", + " 5\n", + " 5\n", + " 9\n", + " 32\n", + " 83\n", + " 128\n", + " ...\n", + " 1265\n", + " 1267\n", + " 1270\n", + " 1271\n", + " 1271\n", + " 1271\n", + " 1271\n", + " 1272\n", + " 1272\n", + " 1272\n", + " \n", + " \n", + " 12\n", + " Hubei\n", + " Mainland China\n", + " 30.97560\n", + " 112.2707\n", + " 444\n", + " 444\n", + " 549\n", + " 761\n", + " 1058\n", + " 1423\n", + " ...\n", + " 62442\n", + " 62662\n", + " 64084\n", + " 64084\n", + " 64287\n", + " 64786\n", + " 65187\n", + " 65596\n", + " 65914\n", + " 66337\n", + " \n", + " \n", + " 13\n", + " Hunan\n", + " Mainland China\n", + " 27.61040\n", + " 111.7088\n", + " 4\n", + " 9\n", + " 24\n", + " 43\n", + " 69\n", + " 100\n", + " ...\n", + " 1010\n", + " 1011\n", + " 1013\n", + " 1016\n", + " 1016\n", + " 1016\n", + " 1016\n", + " 1017\n", + " 1017\n", + " 1018\n", + " \n", + " \n", + " 14\n", + " Inner Mongolia\n", + " Mainland China\n", + " 44.09350\n", + " 113.9448\n", + " 0\n", + " 0\n", + " 1\n", + " 7\n", + " 7\n", + " 11\n", + " ...\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " 75\n", + " \n", + " \n", + " 15\n", + " Jiangsu\n", + " Mainland China\n", + " 32.97110\n", + " 119.4550\n", + " 1\n", + " 5\n", + " 9\n", + " 18\n", + " 33\n", + " 47\n", + " ...\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " 631\n", + " \n", + " \n", + " 16\n", + " Jiangxi\n", + " Mainland China\n", + " 27.61400\n", + " 115.7221\n", + " 2\n", + " 7\n", + " 18\n", + " 18\n", + " 36\n", + " 72\n", + " ...\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 934\n", + " 935\n", + " 935\n", + " \n", + " \n", + " 17\n", + " Jilin\n", + " Mainland China\n", + " 43.66610\n", + " 126.1923\n", + " 0\n", + " 1\n", + " 3\n", + " 4\n", + " 4\n", + " 6\n", + " ...\n", + " 91\n", + " 91\n", + " 91\n", + " 91\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " 93\n", + " \n", + " \n", + " 18\n", + " Liaoning\n", + " Mainland China\n", + " 41.29560\n", + " 122.6085\n", + " 2\n", + " 3\n", + " 4\n", + " 17\n", + " 21\n", + " 27\n", + " ...\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " 121\n", + " \n", + " \n", + " 19\n", + " Ningxia\n", + " Mainland China\n", + " 37.26920\n", + " 106.1655\n", + " 1\n", + " 1\n", + " 2\n", + " 3\n", + " 4\n", + " 7\n", + " ...\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 71\n", + " 72\n", + " 72\n", + " 73\n", + " \n", + " \n", + " 20\n", + " Qinghai\n", + " Mainland China\n", + " 35.74520\n", + " 95.9956\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " ...\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " 18\n", + " \n", + " \n", + " 21\n", + " Shaanxi\n", + " Mainland China\n", + " 35.19170\n", + " 108.8701\n", + " 0\n", + " 3\n", + " 5\n", + " 15\n", + " 22\n", + " 35\n", + " ...\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " 245\n", + " \n", + " \n", + " 22\n", + " Shandong\n", + " Mainland China\n", + " 36.34270\n", + " 118.1498\n", + " 2\n", + " 6\n", + " 15\n", + " 27\n", + " 46\n", + " 75\n", + " ...\n", + " 546\n", + " 749\n", + " 750\n", + " 754\n", + " 755\n", + " 756\n", + " 756\n", + " 756\n", + " 756\n", + " 756\n", + " \n", + " \n", + " 23\n", + " Shanghai\n", + " Mainland China\n", + " 31.20200\n", + " 121.4491\n", + " 9\n", + " 16\n", + " 20\n", + " 33\n", + " 40\n", + " 53\n", + " ...\n", + " 334\n", + " 334\n", + " 335\n", + " 335\n", + " 335\n", + " 336\n", + " 337\n", + " 337\n", + " 337\n", + " 337\n", + " \n", + " \n", + " 24\n", + " Shanxi\n", + " Mainland China\n", + " 37.57770\n", + " 112.2922\n", + " 1\n", + " 1\n", + " 1\n", + " 6\n", + " 9\n", + " 13\n", + " ...\n", + " 132\n", + " 132\n", + " 132\n", + " 132\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " 133\n", + " \n", + " \n", + " 25\n", + " Sichuan\n", + " Mainland China\n", + " 30.61710\n", + " 102.7103\n", + " 5\n", + " 8\n", + " 15\n", + " 28\n", + " 44\n", + " 69\n", + " ...\n", + " 520\n", + " 525\n", + " 526\n", + " 526\n", + " 527\n", + " 529\n", + " 531\n", + " 534\n", + " 538\n", + " 538\n", + " \n", + " \n", + " 26\n", + " Tianjin\n", + " Mainland China\n", + " 39.30540\n", + " 117.3230\n", + " 4\n", + " 4\n", + " 8\n", + " 10\n", + " 14\n", + " 23\n", + " ...\n", + " 131\n", + " 132\n", + " 135\n", + " 135\n", + " 135\n", + " 135\n", + " 135\n", + " 136\n", + " 136\n", + " 136\n", + " \n", + " \n", + " 27\n", + " Tibet\n", + " Mainland China\n", + " 31.69270\n", + " 88.0924\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 28\n", + " Xinjiang\n", + " Mainland China\n", + " 41.11290\n", + " 85.2401\n", + " 0\n", + " 2\n", + " 2\n", + " 3\n", + " 4\n", + " 5\n", + " ...\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " 76\n", + " \n", + " \n", + " 29\n", + " Yunnan\n", + " Mainland China\n", + " 24.97400\n", + " 101.4870\n", + " 1\n", + " 2\n", + " 5\n", + " 11\n", + " 16\n", + " 26\n", + " ...\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " 174\n", + " \n", + " \n", + " ...\n", " ...\n", " ...\n", " ...\n", @@ -506,10 +1106,610 @@ " ...\n", " \n", " \n", - " 114\n", + " 89\n", + " NaN\n", + " Algeria\n", + " 28.03390\n", + " 1.6596\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 90\n", + " NaN\n", + " Croatia\n", + " 45.10000\n", + " 15.2000\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 3\n", + " 3\n", + " 5\n", + " 6\n", + " \n", + " \n", + " 91\n", + " NaN\n", + " Switzerland\n", + " 46.81820\n", + " 8.2275\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 8\n", + " 8\n", + " 18\n", + " \n", + " \n", + " 92\n", + " NaN\n", + " Austria\n", + " 47.51620\n", + " 14.5501\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " 2\n", + " 3\n", + " 3\n", + " 9\n", + " \n", + " \n", + " 93\n", + " NaN\n", + " Israel\n", + " 31.00000\n", + " 35.0000\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " 2\n", + " 3\n", + " 4\n", + " 7\n", + " \n", + " \n", + " 94\n", + " NaN\n", + " Pakistan\n", + " 30.37530\n", + " 69.3451\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " 2\n", + " 2\n", + " 4\n", + " \n", + " \n", + " 95\n", + " NaN\n", + " Brazil\n", + " -14.23500\n", + " -51.9253\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 2\n", + " \n", + " \n", + " 96\n", + " NaN\n", + " Georgia\n", + " 42.31540\n", + " 43.3569\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 97\n", + " NaN\n", + " Greece\n", + " 39.07420\n", + " 21.8243\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 3\n", + " 4\n", + " 4\n", + " \n", + " \n", + " 98\n", + " NaN\n", + " North Macedonia\n", + " 41.60860\n", + " 21.7453\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 99\n", + " NaN\n", + " Norway\n", + " 60.47200\n", + " 8.4689\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " 15\n", + " \n", + " \n", + " 100\n", + " NaN\n", + " Romania\n", + " 45.94320\n", + " 24.9668\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 3\n", + " 3\n", + " \n", + " \n", + " 101\n", + " NaN\n", + " Denmark\n", + " 56.26390\n", + " 9.5018\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 3\n", + " \n", + " \n", + " 102\n", + " NaN\n", + " Estonia\n", + " 58.59530\n", + " 25.0136\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 103\n", + " NaN\n", + " Netherlands\n", + " 52.13260\n", + " 5.2913\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 6\n", + " \n", + " \n", + " 104\n", + " NaN\n", + " San Marino\n", + " 43.94240\n", + " 12.4578\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 105\n", + " NaN\n", + " Belarus\n", + " 53.70980\n", + " 27.9534\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 106\n", + " Montreal, QC\n", + " Canada\n", + " 45.50170\n", + " -73.5673\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 107\n", + " NaN\n", + " Iceland\n", + " 64.96310\n", + " -19.0208\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 108\n", + " NaN\n", + " Lithuania\n", + " 55.16940\n", + " 23.8813\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 109\n", + " NaN\n", + " Mexico\n", + " 23.63450\n", + " -102.5528\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 4\n", + " \n", + " \n", + " 110\n", + " NaN\n", + " New Zealand\n", + " -40.90060\n", + " 174.8860\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 111\n", + " NaN\n", + " Nigeria\n", + " 9.08200\n", + " 8.6753\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " 1\n", + " \n", + " \n", + " 112\n", + " Western Australia\n", + " Australia\n", + " -31.95050\n", + " 115.8605\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 2\n", + " \n", + " \n", + " 113\n", + " NaN\n", + " Ireland\n", + " 53.14240\n", + " -7.6921\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " ...\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 0\n", + " 1\n", + " \n", + " \n", + " 114\n", " NaN\n", " Luxembourg\n", - " 49.8153\n", + " 49.81530\n", " 6.1296\n", " 0\n", " 0\n", @@ -530,10 +1730,10 @@ " 1\n", " \n", " \n", - " 115\n", + " 115\n", " NaN\n", " Monaco\n", - " 43.7333\n", + " 43.73330\n", " 7.4167\n", " 0\n", " 0\n", @@ -554,10 +1754,10 @@ " 1\n", " \n", " \n", - " 116\n", + " 116\n", " NaN\n", " Qatar\n", - " 25.3548\n", + " 25.35480\n", " 51.1839\n", " 0\n", " 0\n", @@ -578,10 +1778,10 @@ " 1\n", " \n", " \n", - " 117\n", + " 117\n", " Portland, OR\n", " US\n", - " 45.5051\n", + " 45.50510\n", " -122.6750\n", " 0\n", " 0\n", @@ -602,10 +1802,10 @@ " 1\n", " \n", " \n", - " 118\n", + " 118\n", " Snohomish County, WA\n", " US\n", - " 48.0330\n", + " 48.03300\n", " -121.8339\n", " 0\n", " 0\n", @@ -631,18 +1831,68 @@ "" ], "text/plain": [ - " Province/State Country/Region Lat Long 1/22/20 \\\n", - "0 Anhui Mainland China 31.8257 117.2264 1 \n", - "1 Beijing Mainland China 40.1824 116.4142 14 \n", - "2 Chongqing Mainland China 30.0572 107.8740 6 \n", - "3 Fujian Mainland China 26.0789 117.9874 1 \n", - "4 Gansu Mainland China 36.0611 103.8343 0 \n", - ".. ... ... ... ... ... \n", - "114 NaN Luxembourg 49.8153 6.1296 0 \n", - "115 NaN Monaco 43.7333 7.4167 0 \n", - "116 NaN Qatar 25.3548 51.1839 0 \n", - "117 Portland, OR US 45.5051 -122.6750 0 \n", - "118 Snohomish County, WA US 48.0330 -121.8339 0 \n", + " Province/State Country/Region Lat Long 1/22/20 \\\n", + "0 Anhui Mainland China 31.82570 117.2264 1 \n", + "1 Beijing Mainland China 40.18240 116.4142 14 \n", + "2 Chongqing Mainland China 30.05720 107.8740 6 \n", + "3 Fujian Mainland China 26.07890 117.9874 1 \n", + "4 Gansu Mainland China 36.06110 103.8343 0 \n", + "5 Guangdong Mainland China 23.34170 113.4244 26 \n", + "6 Guangxi Mainland China 23.82980 108.7881 2 \n", + "7 Guizhou Mainland China 26.81540 106.8748 1 \n", + "8 Hainan Mainland China 19.19590 109.7453 4 \n", + "9 Hebei Mainland China 38.04280 114.5149 1 \n", + "10 Heilongjiang Mainland China 47.86200 127.7615 0 \n", + "11 Henan Mainland China 33.88202 113.6140 5 \n", + "12 Hubei Mainland China 30.97560 112.2707 444 \n", + "13 Hunan Mainland China 27.61040 111.7088 4 \n", + "14 Inner Mongolia Mainland China 44.09350 113.9448 0 \n", + "15 Jiangsu Mainland China 32.97110 119.4550 1 \n", + "16 Jiangxi Mainland China 27.61400 115.7221 2 \n", + "17 Jilin Mainland China 43.66610 126.1923 0 \n", + "18 Liaoning Mainland China 41.29560 122.6085 2 \n", + "19 Ningxia Mainland China 37.26920 106.1655 1 \n", + "20 Qinghai Mainland China 35.74520 95.9956 0 \n", + "21 Shaanxi Mainland China 35.19170 108.8701 0 \n", + "22 Shandong Mainland China 36.34270 118.1498 2 \n", + "23 Shanghai Mainland China 31.20200 121.4491 9 \n", + "24 Shanxi Mainland China 37.57770 112.2922 1 \n", + "25 Sichuan Mainland China 30.61710 102.7103 5 \n", + "26 Tianjin Mainland China 39.30540 117.3230 4 \n", + "27 Tibet Mainland China 31.69270 88.0924 0 \n", + "28 Xinjiang Mainland China 41.11290 85.2401 0 \n", + "29 Yunnan Mainland China 24.97400 101.4870 1 \n", + ".. ... ... ... ... ... \n", + "89 NaN Algeria 28.03390 1.6596 0 \n", + "90 NaN Croatia 45.10000 15.2000 0 \n", + "91 NaN Switzerland 46.81820 8.2275 0 \n", + "92 NaN Austria 47.51620 14.5501 0 \n", + "93 NaN Israel 31.00000 35.0000 0 \n", + "94 NaN Pakistan 30.37530 69.3451 0 \n", + "95 NaN Brazil -14.23500 -51.9253 0 \n", + "96 NaN Georgia 42.31540 43.3569 0 \n", + "97 NaN Greece 39.07420 21.8243 0 \n", + "98 NaN North Macedonia 41.60860 21.7453 0 \n", + "99 NaN Norway 60.47200 8.4689 0 \n", + "100 NaN Romania 45.94320 24.9668 0 \n", + "101 NaN Denmark 56.26390 9.5018 0 \n", + "102 NaN Estonia 58.59530 25.0136 0 \n", + "103 NaN Netherlands 52.13260 5.2913 0 \n", + "104 NaN San Marino 43.94240 12.4578 0 \n", + "105 NaN Belarus 53.70980 27.9534 0 \n", + "106 Montreal, QC Canada 45.50170 -73.5673 0 \n", + "107 NaN Iceland 64.96310 -19.0208 0 \n", + "108 NaN Lithuania 55.16940 23.8813 0 \n", + "109 NaN Mexico 23.63450 -102.5528 0 \n", + "110 NaN New Zealand -40.90060 174.8860 0 \n", + "111 NaN Nigeria 9.08200 8.6753 0 \n", + "112 Western Australia Australia -31.95050 115.8605 0 \n", + "113 NaN Ireland 53.14240 -7.6921 0 \n", + "114 NaN Luxembourg 49.81530 6.1296 0 \n", + "115 NaN Monaco 43.73330 7.4167 0 \n", + "116 NaN Qatar 25.35480 51.1839 0 \n", + "117 Portland, OR US 45.50510 -122.6750 0 \n", + "118 Snohomish County, WA US 48.03300 -121.8339 0 \n", "\n", " 1/23/20 1/24/20 1/25/20 1/26/20 1/27/20 ... 2/20/20 2/21/20 \\\n", "0 9 15 39 60 70 ... 987 988 \n", @@ -650,7 +1900,57 @@ "2 9 27 57 75 110 ... 567 572 \n", "3 5 10 18 35 59 ... 293 293 \n", "4 2 2 4 7 14 ... 91 91 \n", + "5 32 53 78 111 151 ... 1332 1333 \n", + "6 5 23 23 36 46 ... 245 246 \n", + "7 3 3 4 5 7 ... 146 146 \n", + "8 5 8 19 22 33 ... 168 168 \n", + "9 1 2 8 13 18 ... 307 308 \n", + "10 2 4 9 15 21 ... 476 479 \n", + "11 5 9 32 83 128 ... 1265 1267 \n", + "12 444 549 761 1058 1423 ... 62442 62662 \n", + "13 9 24 43 69 100 ... 1010 1011 \n", + "14 0 1 7 7 11 ... 75 75 \n", + "15 5 9 18 33 47 ... 631 631 \n", + "16 7 18 18 36 72 ... 934 934 \n", + "17 1 3 4 4 6 ... 91 91 \n", + "18 3 4 17 21 27 ... 121 121 \n", + "19 1 2 3 4 7 ... 71 71 \n", + "20 0 0 1 1 6 ... 18 18 \n", + "21 3 5 15 22 35 ... 245 245 \n", + "22 6 15 27 46 75 ... 546 749 \n", + "23 16 20 33 40 53 ... 334 334 \n", + "24 1 1 6 9 13 ... 132 132 \n", + "25 8 15 28 44 69 ... 520 525 \n", + "26 4 8 10 14 23 ... 131 132 \n", + "27 0 0 0 0 0 ... 1 1 \n", + "28 2 2 3 4 5 ... 76 76 \n", + "29 2 5 11 16 26 ... 174 174 \n", ".. ... ... ... ... ... ... ... ... \n", + "89 0 0 0 0 0 ... 0 0 \n", + "90 0 0 0 0 0 ... 0 0 \n", + "91 0 0 0 0 0 ... 0 0 \n", + "92 0 0 0 0 0 ... 0 0 \n", + "93 0 0 0 0 0 ... 0 1 \n", + "94 0 0 0 0 0 ... 0 0 \n", + "95 0 0 0 0 0 ... 0 0 \n", + "96 0 0 0 0 0 ... 0 0 \n", + "97 0 0 0 0 0 ... 0 0 \n", + "98 0 0 0 0 0 ... 0 0 \n", + "99 0 0 0 0 0 ... 0 0 \n", + "100 0 0 0 0 0 ... 0 0 \n", + "101 0 0 0 0 0 ... 0 0 \n", + "102 0 0 0 0 0 ... 0 0 \n", + "103 0 0 0 0 0 ... 0 0 \n", + "104 0 0 0 0 0 ... 0 0 \n", + "105 0 0 0 0 0 ... 0 0 \n", + "106 0 0 0 0 0 ... 0 0 \n", + "107 0 0 0 0 0 ... 0 0 \n", + "108 0 0 0 0 0 ... 0 0 \n", + "109 0 0 0 0 0 ... 0 0 \n", + "110 0 0 0 0 0 ... 0 0 \n", + "111 0 0 0 0 0 ... 0 0 \n", + "112 0 0 0 0 0 ... 0 0 \n", + "113 0 0 0 0 0 ... 0 0 \n", "114 0 0 0 0 0 ... 0 0 \n", "115 0 0 0 0 0 ... 0 0 \n", "116 0 0 0 0 0 ... 0 0 \n", @@ -663,7 +1963,57 @@ "2 573 575 576 576 576 576 576 576 \n", "3 293 293 293 294 294 296 296 296 \n", "4 91 91 91 91 91 91 91 91 \n", + "5 1339 1342 1345 1347 1347 1347 1348 1349 \n", + "6 249 249 251 252 252 252 252 252 \n", + "7 146 146 146 146 146 146 146 146 \n", + "8 168 168 168 168 168 168 168 168 \n", + "9 309 311 311 311 312 317 318 318 \n", + "10 479 480 480 480 480 480 480 480 \n", + "11 1270 1271 1271 1271 1271 1272 1272 1272 \n", + "12 64084 64084 64287 64786 65187 65596 65914 66337 \n", + "13 1013 1016 1016 1016 1016 1017 1017 1018 \n", + "14 75 75 75 75 75 75 75 75 \n", + "15 631 631 631 631 631 631 631 631 \n", + "16 934 934 934 934 934 934 935 935 \n", + "17 91 91 93 93 93 93 93 93 \n", + "18 121 121 121 121 121 121 121 121 \n", + "19 71 71 71 71 71 72 72 73 \n", + "20 18 18 18 18 18 18 18 18 \n", + "21 245 245 245 245 245 245 245 245 \n", + "22 750 754 755 756 756 756 756 756 \n", + "23 335 335 335 336 337 337 337 337 \n", + "24 132 132 133 133 133 133 133 133 \n", + "25 526 526 527 529 531 534 538 538 \n", + "26 135 135 135 135 135 136 136 136 \n", + "27 1 1 1 1 1 1 1 1 \n", + "28 76 76 76 76 76 76 76 76 \n", + "29 174 174 174 174 174 174 174 174 \n", ".. ... ... ... ... ... ... ... ... \n", + "89 0 0 0 1 1 1 1 1 \n", + "90 0 0 0 1 3 3 5 6 \n", + "91 0 0 0 1 1 8 8 18 \n", + "92 0 0 0 2 2 3 3 9 \n", + "93 1 1 1 1 2 3 4 7 \n", + "94 0 0 0 0 2 2 2 4 \n", + "95 0 0 0 0 1 1 1 2 \n", + "96 0 0 0 0 1 1 1 1 \n", + "97 0 0 0 0 1 3 4 4 \n", + "98 0 0 0 0 1 1 1 1 \n", + "99 0 0 0 0 1 1 6 15 \n", + "100 0 0 0 0 1 1 3 3 \n", + "101 0 0 0 0 0 1 1 3 \n", + "102 0 0 0 0 0 1 1 1 \n", + "103 0 0 0 0 0 1 1 6 \n", + "104 0 0 0 0 0 1 1 1 \n", + "105 0 0 0 0 0 0 1 1 \n", + "106 0 0 0 0 0 0 1 1 \n", + "107 0 0 0 0 0 0 1 1 \n", + "108 0 0 0 0 0 0 1 1 \n", + "109 0 0 0 0 0 0 1 4 \n", + "110 0 0 0 0 0 0 1 1 \n", + "111 0 0 0 0 0 0 1 1 \n", + "112 0 0 0 0 0 0 0 2 \n", + "113 0 0 0 0 0 0 0 1 \n", "114 0 0 0 0 0 0 0 1 \n", "115 0 0 0 0 0 0 0 1 \n", "116 0 0 0 0 0 0 0 1 \n", @@ -673,7 +2023,7 @@ "[119 rows x 43 columns]" ] }, - "execution_count": 454, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } @@ -684,7 +2034,7 @@ }, { "cell_type": "code", - "execution_count": 455, + "execution_count": 100, "metadata": {}, "outputs": [ { @@ -731,7 +2081,7 @@ " 1128]" ] }, - "execution_count": 455, + "execution_count": 100, "metadata": {}, "output_type": "execute_result" } @@ -749,7 +2099,7 @@ }, { "cell_type": "code", - "execution_count": 456, + "execution_count": 101, "metadata": {}, "outputs": [], "source": [ @@ -769,7 +2119,7 @@ }, { "cell_type": "code", - "execution_count": 457, + "execution_count": 102, "metadata": {}, "outputs": [ { @@ -800,31 +2150,31 @@ " \n", " \n", " \n", - " 0\n", + " 0\n", " 1/22/20\n", " 0\n", " 1\n", " \n", " \n", - " 1\n", + " 1\n", " 1/23/20\n", " 0\n", " 2\n", " \n", " \n", - " 2\n", + " 2\n", " 1/24/20\n", " 0\n", " 3\n", " \n", " \n", - " 3\n", + " 3\n", " 1/25/20\n", " 0\n", " 4\n", " \n", " \n", - " 4\n", + " 4\n", " 1/26/20\n", " 0\n", " 5\n", @@ -842,7 +2192,7 @@ "4 1/26/20 0 5" ] }, - "execution_count": 457, + "execution_count": 102, "metadata": {}, "output_type": "execute_result" } @@ -853,7 +2203,7 @@ }, { "cell_type": "code", - "execution_count": 458, + "execution_count": 103, "metadata": {}, "outputs": [ { @@ -1989,20 +3339,20 @@ "
\n", " \n", " \n", - "
\n", + "
\n", "