You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1054 lines
72 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 2,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "# Reading data\n",
  10. "import os\n",
  11. "import git\n",
  12. "import shutil\n",
  13. "import tempfile\n",
  14. "\n",
  15. "# Create temporary dir\n",
  16. "t = tempfile.mkdtemp()\n",
  17. "d = 'lwc/topics/covid19/covid-model'\n",
  18. "# Clone into temporary dir\n",
  19. "git.Repo.clone_from('http://gmarx.jumpingcrab.com:8088/COVID-19/covid19-data.git', \n",
  20. " t, branch='master', depth=1)\n",
  21. "# Delete files\n",
  22. "#os.remove('README.txt')\n",
  23. "shutil.rmtree('data')\n",
  24. "#shutil.rmtree('secondTest')\n",
  25. "# Copy desired file from temporary dir\n",
  26. "shutil.move(os.path.join(t, 'data'), '.')\n",
  27. "# Remove temporary dir\n",
  28. "shutil.rmtree(t)"
  29. ]
  30. },
  31. {
  32. "cell_type": "code",
  33. "execution_count": 4,
  34. "metadata": {},
  35. "outputs": [],
  36. "source": [
  37. "import pandas as pd\n",
  38. "import numpy as np\n",
  39. "import os\n",
  40. "def loadData(path, file):\n",
  41. " csvPath=os.path.join(path, file)\n",
  42. " return pd.read_csv(csvPath)"
  43. ]
  44. },
  45. {
  46. "cell_type": "code",
  47. "execution_count": 5,
  48. "metadata": {},
  49. "outputs": [
  50. {
  51. "data": {
  52. "text/html": [
  53. "<div>\n",
  54. "<style scoped>\n",
  55. " .dataframe tbody tr th:only-of-type {\n",
  56. " vertical-align: middle;\n",
  57. " }\n",
  58. "\n",
  59. " .dataframe tbody tr th {\n",
  60. " vertical-align: top;\n",
  61. " }\n",
  62. "\n",
  63. " .dataframe thead th {\n",
  64. " text-align: right;\n",
  65. " }\n",
  66. "</style>\n",
  67. "<table border=\"1\" class=\"dataframe\">\n",
  68. " <thead>\n",
  69. " <tr style=\"text-align: right;\">\n",
  70. " <th></th>\n",
  71. " <th>Date</th>\n",
  72. " <th>Country/Region</th>\n",
  73. " <th>Province/State</th>\n",
  74. " <th>Lat</th>\n",
  75. " <th>Long</th>\n",
  76. " <th>Confirmed</th>\n",
  77. " <th>Recovered</th>\n",
  78. " <th>Deaths</th>\n",
  79. " </tr>\n",
  80. " </thead>\n",
  81. " <tbody>\n",
  82. " <tr>\n",
  83. " <th>0</th>\n",
  84. " <td>2020-01-22</td>\n",
  85. " <td>Afghanistan</td>\n",
  86. " <td>NaN</td>\n",
  87. " <td>33.0</td>\n",
  88. " <td>65.0</td>\n",
  89. " <td>0</td>\n",
  90. " <td>0.0</td>\n",
  91. " <td>0</td>\n",
  92. " </tr>\n",
  93. " <tr>\n",
  94. " <th>1</th>\n",
  95. " <td>2020-01-23</td>\n",
  96. " <td>Afghanistan</td>\n",
  97. " <td>NaN</td>\n",
  98. " <td>33.0</td>\n",
  99. " <td>65.0</td>\n",
  100. " <td>0</td>\n",
  101. " <td>0.0</td>\n",
  102. " <td>0</td>\n",
  103. " </tr>\n",
  104. " <tr>\n",
  105. " <th>2</th>\n",
  106. " <td>2020-01-24</td>\n",
  107. " <td>Afghanistan</td>\n",
  108. " <td>NaN</td>\n",
  109. " <td>33.0</td>\n",
  110. " <td>65.0</td>\n",
  111. " <td>0</td>\n",
  112. " <td>0.0</td>\n",
  113. " <td>0</td>\n",
  114. " </tr>\n",
  115. " <tr>\n",
  116. " <th>3</th>\n",
  117. " <td>2020-01-25</td>\n",
  118. " <td>Afghanistan</td>\n",
  119. " <td>NaN</td>\n",
  120. " <td>33.0</td>\n",
  121. " <td>65.0</td>\n",
  122. " <td>0</td>\n",
  123. " <td>0.0</td>\n",
  124. " <td>0</td>\n",
  125. " </tr>\n",
  126. " <tr>\n",
  127. " <th>4</th>\n",
  128. " <td>2020-01-26</td>\n",
  129. " <td>Afghanistan</td>\n",
  130. " <td>NaN</td>\n",
  131. " <td>33.0</td>\n",
  132. " <td>65.0</td>\n",
  133. " <td>0</td>\n",
  134. " <td>0.0</td>\n",
  135. " <td>0</td>\n",
  136. " </tr>\n",
  137. " </tbody>\n",
  138. "</table>\n",
  139. "</div>"
  140. ],
  141. "text/plain": [
  142. " Date Country/Region Province/State Lat Long Confirmed Recovered \\\n",
  143. "0 2020-01-22 Afghanistan NaN 33.0 65.0 0 0.0 \n",
  144. "1 2020-01-23 Afghanistan NaN 33.0 65.0 0 0.0 \n",
  145. "2 2020-01-24 Afghanistan NaN 33.0 65.0 0 0.0 \n",
  146. "3 2020-01-25 Afghanistan NaN 33.0 65.0 0 0.0 \n",
  147. "4 2020-01-26 Afghanistan NaN 33.0 65.0 0 0.0 \n",
  148. "\n",
  149. " Deaths \n",
  150. "0 0 \n",
  151. "1 0 \n",
  152. "2 0 \n",
  153. "3 0 \n",
  154. "4 0 "
  155. ]
  156. },
  157. "execution_count": 5,
  158. "metadata": {},
  159. "output_type": "execute_result"
  160. }
  161. ],
  162. "source": [
  163. "# import jtplot submodule from jupyterthemes\n",
  164. "from jupyterthemes import jtplot\n",
  165. "PATH=os.path.join(\"data\")\n",
  166. "covid_data=loadData(PATH,\"time-series-19-covid-combined.csv\")\n",
  167. "covid_data.head()"
  168. ]
  169. },
  170. {
  171. "cell_type": "code",
  172. "execution_count": 7,
  173. "metadata": {},
  174. "outputs": [],
  175. "source": [
  176. "from sklearn.model_selection import train_test_split \n",
  177. "train_set, test_set=train_test_split(covid_data,test_size=0.2,random_state=42)\n",
  178. "train_cp=train_set.copy()"
  179. ]
  180. },
  181. {
  182. "cell_type": "code",
  183. "execution_count": 8,
  184. "metadata": {},
  185. "outputs": [
  186. {
  187. "data": {
  188. "text/plain": [
  189. "array([[<matplotlib.axes._subplots.AxesSubplot object at 0x11e46ca50>,\n",
  190. " <matplotlib.axes._subplots.AxesSubplot object at 0x116caea90>],\n",
  191. " [<matplotlib.axes._subplots.AxesSubplot object at 0x11e65dd10>,\n",
  192. " <matplotlib.axes._subplots.AxesSubplot object at 0x11e6a16d0>],\n",
  193. " [<matplotlib.axes._subplots.AxesSubplot object at 0x11e6d3ed0>,\n",
  194. " <matplotlib.axes._subplots.AxesSubplot object at 0x11e716710>]],\n",
  195. " dtype=object)"
  196. ]
  197. },
  198. "execution_count": 8,
  199. "metadata": {},
  200. "output_type": "execute_result"
  201. },
  202. {
  203. "data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ZmY4GZiZGU4GZmaGk4GZmeFkYGZmOBmYmRlOBmZmhpOBmZlRomQgaYak5ZJ6Jc1pdzxmzeY6b2VSimQgaQxwGXA0MBU4SdLU9kZl1jyu81Y2pUgGwCFAb0Q8FBHPA9cBM9sck1kzuc5bqWzX7gCyycAjhdergEP7zyRpNjA7v9wkaXmFdU0Enqxm47qwmrlrVnVcLVTW2Jod115NXPdQ2lrnwfWe0RnbgHW+LMlgWCLiSuDKweaRtCQiprUopGEra1xQ3tjKGlcrdXKdB8dWq3bEVpZmokeBPQuvp+Qys5HKdd5KpSzJ4C5gX0l7S9oBOBFY0OaYzJrJdd5KpRTJICK2AGcDtwEPADdExH01rm7QU+o2amhcklZKenuVy/RIOqPCpFGxz8pklNR5qDG2Wup3DUbcfquHIqLV27QGkLQSOCMibq9imR7gGxHxlWbFZdYItdRvq08pzgysMSSNl3SzpCckPZ3Hp+RpnwT+GrhU0iZJl7Y3WrPqSToz36S3TtICSXsUpoWkf5K0QtJ6SZdJUp42RtJFkp6U9HtJZ+f5O6oTTTM5GYwsLwG+Ruo+9irgOeBSgIg4D/gZcHZE7BwRZ7ctSrMaSHob8GngBGAS8DDp/oyi44A3AW/M8x2Vy88k3eB3AHAQcHwLQu4oIyoZtOL2fkl7SrpT0v2S7pP0/lw+QdLCfFSyUNL4XC5Jl+SY7pF0UGFds/L8KyTNKpQfLGlZXuaSvqOboUTEU8D3gP8HXAt8EvgbSYsl9ZLudB2Tt7GjpOvzNhZL6i5s/9xcvlzSUYXymvavpHGSbpT0W0kPSHpzGfbXSNCKOt9ve02v/4M4GZgXEb+OiD8C5wJvLtZdYC7wDHAT8AJwgKS9gQt
  205. "text/plain": [
  206. "<Figure size 432x288 with 6 Axes>"
  207. ]
  208. },
  209. "metadata": {
  210. "needs_background": "light"
  211. },
  212. "output_type": "display_data"
  213. }
  214. ],
  215. "source": [
  216. "%matplotlib inline\n",
  217. "covid_data.hist()\n"
  218. ]
  219. },
  220. {
  221. "cell_type": "code",
  222. "execution_count": 52,
  223. "metadata": {},
  224. "outputs": [
  225. {
  226. "data": {
  227. "text/plain": [
  228. "(63, 8)"
  229. ]
  230. },
  231. "execution_count": 52,
  232. "metadata": {},
  233. "output_type": "execute_result"
  234. }
  235. ],
  236. "source": [
  237. "%matplotlib inline \n",
  238. "import matplotlib.pyplot as plt \n",
  239. "covid_mexico = covid_data[covid_data['Country/Region']=='Mexico']\n",
  240. "covid_mexico.shape"
  241. ]
  242. },
  243. {
  244. "cell_type": "code",
  245. "execution_count": null,
  246. "metadata": {},
  247. "outputs": [],
  248. "source": []
  249. },
  250. {
  251. "cell_type": "code",
  252. "execution_count": 134,
  253. "metadata": {},
  254. "outputs": [
  255. {
  256. "data": {
  257. "text/plain": [
  258. "<matplotlib.axes._subplots.AxesSubplot at 0x12b7c9910>"
  259. ]
  260. },
  261. "execution_count": 134,
  262. "metadata": {},
  263. "output_type": "execute_result"
  264. },
  265. {
  266. "data": {
  267. "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEGCAYAAACO8lkDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAcJUlEQVR4nO3dfaxlVXnH8e+jFI31BZDbCTKMQy011foGt0SLsVbwDUwHW2tIjOJLMm2qRqMWBk1am7bJqK1WbWuCqB0rFvGtThGr0trW1IDcoai8SBxxRmYywCCKWhIt+vSPsy8c7jn7nP2+Xvbvk9zM3H3OPWftfc5ez15rPWttc3dERESmPSB0AUREJD4KDiIiMkPBQUREZig4iIjIDAUHERGZcUToAnTh2GOP9a1bt4YuhohIUvbs2XOHu6/MeyyL4LB161bW1tZCF0NEJClmtr/sMXUriYjIDAUHERGZoeAgIiIzFBxERGSGgoOIiMzIIltJwtq647P3/n/fzrMClkREuqKWg7QyHRjm/S4iaVJwkMbKAoEChEj6FBx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udhN4K1HMzsOOA4d7/GzB4G7AHOBl4O3OnuO81sB3C0u5+/6LViaTn0RS2HYaV6vPsqd2wtk1Q/nxhF2XJw90Pufk3x/x8BNwLHA9uAXcXTdjEJGKNWNR1Ss0wlVVVaJsu+2woM3YpiQNrMtgJPAa4CNrn7oeKhW4FNgYoVjSb9zgoSkooqqa91u7GkveAD0mb2UOA/gb9090+Z2Q/c/aipx7/v7jPjDma2HdgOsGXLllP2798/WJmH1EU
  268. "text/plain": [
  269. "<Figure size 432x288 with 1 Axes>"
  270. ]
  271. },
  272. "metadata": {
  273. "needs_background": "light"
  274. },
  275. "output_type": "display_data"
  276. }
  277. ],
  278. "source": [
  279. "covid_data.plot(kind=\"scatter\", x=\"Long\", y=\"Lat\")"
  280. ]
  281. },
  282. {
  283. "cell_type": "code",
  284. "execution_count": 98,
  285. "metadata": {},
  286. "outputs": [
  287. {
  288. "data": {
  289. "text/html": [
  290. "<div>\n",
  291. "<style scoped>\n",
  292. " .dataframe tbody tr th:only-of-type {\n",
  293. " vertical-align: middle;\n",
  294. " }\n",
  295. "\n",
  296. " .dataframe tbody tr th {\n",
  297. " vertical-align: top;\n",
  298. " }\n",
  299. "\n",
  300. " .dataframe thead th {\n",
  301. " text-align: right;\n",
  302. " }\n",
  303. "</style>\n",
  304. "<table border=\"1\" class=\"dataframe\">\n",
  305. " <thead>\n",
  306. " <tr style=\"text-align: right;\">\n",
  307. " <th></th>\n",
  308. " <th>Date</th>\n",
  309. " <th>Country/Region</th>\n",
  310. " <th>Province/State</th>\n",
  311. " <th>Lat</th>\n",
  312. " <th>Long</th>\n",
  313. " <th>Confirmed</th>\n",
  314. " <th>Recovered</th>\n",
  315. " <th>Deaths</th>\n",
  316. " </tr>\n",
  317. " </thead>\n",
  318. " <tbody>\n",
  319. " <tr>\n",
  320. " <th>9954</th>\n",
  321. " <td>2020-01-22</td>\n",
  322. " <td>Mexico</td>\n",
  323. " <td>NaN</td>\n",
  324. " <td>23.6345</td>\n",
  325. " <td>-102.5528</td>\n",
  326. " <td>0</td>\n",
  327. " <td>0.0</td>\n",
  328. " <td>0</td>\n",
  329. " </tr>\n",
  330. " <tr>\n",
  331. " <th>9955</th>\n",
  332. " <td>2020-01-23</td>\n",
  333. " <td>Mexico</td>\n",
  334. " <td>NaN</td>\n",
  335. " <td>23.6345</td>\n",
  336. " <td>-102.5528</td>\n",
  337. " <td>0</td>\n",
  338. " <td>0.0</td>\n",
  339. " <td>0</td>\n",
  340. " </tr>\n",
  341. " <tr>\n",
  342. " <th>9956</th>\n",
  343. " <td>2020-01-24</td>\n",
  344. " <td>Mexico</td>\n",
  345. " <td>NaN</td>\n",
  346. " <td>23.6345</td>\n",
  347. " <td>-102.5528</td>\n",
  348. " <td>0</td>\n",
  349. " <td>0.0</td>\n",
  350. " <td>0</td>\n",
  351. " </tr>\n",
  352. " <tr>\n",
  353. " <th>9957</th>\n",
  354. " <td>2020-01-25</td>\n",
  355. " <td>Mexico</td>\n",
  356. " <td>NaN</td>\n",
  357. " <td>23.6345</td>\n",
  358. " <td>-102.5528</td>\n",
  359. " <td>0</td>\n",
  360. " <td>0.0</td>\n",
  361. " <td>0</td>\n",
  362. " </tr>\n",
  363. " <tr>\n",
  364. " <th>9958</th>\n",
  365. " <td>2020-01-26</td>\n",
  366. " <td>Mexico</td>\n",
  367. " <td>NaN</td>\n",
  368. " <td>23.6345</td>\n",
  369. " <td>-102.5528</td>\n",
  370. " <td>0</td>\n",
  371. " <td>0.0</td>\n",
  372. " <td>0</td>\n",
  373. " </tr>\n",
  374. " <tr>\n",
  375. " <th>...</th>\n",
  376. " <td>...</td>\n",
  377. " <td>...</td>\n",
  378. " <td>...</td>\n",
  379. " <td>...</td>\n",
  380. " <td>...</td>\n",
  381. " <td>...</td>\n",
  382. " <td>...</td>\n",
  383. " <td>...</td>\n",
  384. " </tr>\n",
  385. " <tr>\n",
  386. " <th>10012</th>\n",
  387. " <td>2020-03-20</td>\n",
  388. " <td>Mexico</td>\n",
  389. " <td>NaN</td>\n",
  390. " <td>23.6345</td>\n",
  391. " <td>-102.5528</td>\n",
  392. " <td>164</td>\n",
  393. " <td>4.0</td>\n",
  394. " <td>1</td>\n",
  395. " </tr>\n",
  396. " <tr>\n",
  397. " <th>10013</th>\n",
  398. " <td>2020-03-21</td>\n",
  399. " <td>Mexico</td>\n",
  400. " <td>NaN</td>\n",
  401. " <td>23.6345</td>\n",
  402. " <td>-102.5528</td>\n",
  403. " <td>203</td>\n",
  404. " <td>4.0</td>\n",
  405. " <td>2</td>\n",
  406. " </tr>\n",
  407. " <tr>\n",
  408. " <th>10014</th>\n",
  409. " <td>2020-03-22</td>\n",
  410. " <td>Mexico</td>\n",
  411. " <td>NaN</td>\n",
  412. " <td>23.6345</td>\n",
  413. " <td>-102.5528</td>\n",
  414. " <td>251</td>\n",
  415. " <td>4.0</td>\n",
  416. " <td>2</td>\n",
  417. " </tr>\n",
  418. " <tr>\n",
  419. " <th>10015</th>\n",
  420. " <td>2020-03-23</td>\n",
  421. " <td>Mexico</td>\n",
  422. " <td>NaN</td>\n",
  423. " <td>23.6345</td>\n",
  424. " <td>-102.5528</td>\n",
  425. " <td>316</td>\n",
  426. " <td>4.0</td>\n",
  427. " <td>3</td>\n",
  428. " </tr>\n",
  429. " <tr>\n",
  430. " <th>10016</th>\n",
  431. " <td>2020-03-24</td>\n",
  432. " <td>Mexico</td>\n",
  433. " <td>NaN</td>\n",
  434. " <td>23.6345</td>\n",
  435. " <td>-102.5528</td>\n",
  436. " <td>367</td>\n",
  437. " <td>NaN</td>\n",
  438. " <td>4</td>\n",
  439. " </tr>\n",
  440. " </tbody>\n",
  441. "</table>\n",
  442. "<p>63 rows × 8 columns</p>\n",
  443. "</div>"
  444. ],
  445. "text/plain": [
  446. " Date Country/Region Province/State Lat Long Confirmed \\\n",
  447. "9954 2020-01-22 Mexico NaN 23.6345 -102.5528 0 \n",
  448. "9955 2020-01-23 Mexico NaN 23.6345 -102.5528 0 \n",
  449. "9956 2020-01-24 Mexico NaN 23.6345 -102.5528 0 \n",
  450. "9957 2020-01-25 Mexico NaN 23.6345 -102.5528 0 \n",
  451. "9958 2020-01-26 Mexico NaN 23.6345 -102.5528 0 \n",
  452. "... ... ... ... ... ... ... \n",
  453. "10012 2020-03-20 Mexico NaN 23.6345 -102.5528 164 \n",
  454. "10013 2020-03-21 Mexico NaN 23.6345 -102.5528 203 \n",
  455. "10014 2020-03-22 Mexico NaN 23.6345 -102.5528 251 \n",
  456. "10015 2020-03-23 Mexico NaN 23.6345 -102.5528 316 \n",
  457. "10016 2020-03-24 Mexico NaN 23.6345 -102.5528 367 \n",
  458. "\n",
  459. " Recovered Deaths \n",
  460. "9954 0.0 0 \n",
  461. "9955 0.0 0 \n",
  462. "9956 0.0 0 \n",
  463. "9957 0.0 0 \n",
  464. "9958 0.0 0 \n",
  465. "... ... ... \n",
  466. "10012 4.0 1 \n",
  467. "10013 4.0 2 \n",
  468. "10014 4.0 2 \n",
  469. "10015 4.0 3 \n",
  470. "10016 NaN 4 \n",
  471. "\n",
  472. "[63 rows x 8 columns]"
  473. ]
  474. },
  475. "execution_count": 98,
  476. "metadata": {},
  477. "output_type": "execute_result"
  478. }
  479. ],
  480. "source": [
  481. "from datetime import datetime\n",
  482. "#covid_mexico['Date'] =pd.to_datetime(covid_mexico.Date, format=\"%Y-%m-%d\")\n",
  483. "mexico_sort=covid_mexico.sort_values(by='Date', ascending=True)\n",
  484. "mexico_sort"
  485. ]
  486. },
  487. {
  488. "cell_type": "code",
  489. "execution_count": 100,
  490. "metadata": {},
  491. "outputs": [
  492. {
  493. "data": {
  494. "text/html": [
  495. "<div>\n",
  496. "<style scoped>\n",
  497. " .dataframe tbody tr th:only-of-type {\n",
  498. " vertical-align: middle;\n",
  499. " }\n",
  500. "\n",
  501. " .dataframe tbody tr th {\n",
  502. " vertical-align: top;\n",
  503. " }\n",
  504. "\n",
  505. " .dataframe thead th {\n",
  506. " text-align: right;\n",
  507. " }\n",
  508. "</style>\n",
  509. "<table border=\"1\" class=\"dataframe\">\n",
  510. " <thead>\n",
  511. " <tr style=\"text-align: right;\">\n",
  512. " <th></th>\n",
  513. " <th>Date</th>\n",
  514. " <th>Country/Region</th>\n",
  515. " <th>Province/State</th>\n",
  516. " <th>Lat</th>\n",
  517. " <th>Long</th>\n",
  518. " <th>Confirmed</th>\n",
  519. " <th>Recovered</th>\n",
  520. " <th>Deaths</th>\n",
  521. " </tr>\n",
  522. " </thead>\n",
  523. " <tbody>\n",
  524. " <tr>\n",
  525. " <th>9991</th>\n",
  526. " <td>2020-02-28</td>\n",
  527. " <td>Mexico</td>\n",
  528. " <td>NaN</td>\n",
  529. " <td>23.6345</td>\n",
  530. " <td>-102.5528</td>\n",
  531. " <td>1</td>\n",
  532. " <td>0.0</td>\n",
  533. " <td>0</td>\n",
  534. " </tr>\n",
  535. " <tr>\n",
  536. " <th>9992</th>\n",
  537. " <td>2020-02-29</td>\n",
  538. " <td>Mexico</td>\n",
  539. " <td>NaN</td>\n",
  540. " <td>23.6345</td>\n",
  541. " <td>-102.5528</td>\n",
  542. " <td>4</td>\n",
  543. " <td>0.0</td>\n",
  544. " <td>0</td>\n",
  545. " </tr>\n",
  546. " <tr>\n",
  547. " <th>9993</th>\n",
  548. " <td>2020-03-01</td>\n",
  549. " <td>Mexico</td>\n",
  550. " <td>NaN</td>\n",
  551. " <td>23.6345</td>\n",
  552. " <td>-102.5528</td>\n",
  553. " <td>5</td>\n",
  554. " <td>0.0</td>\n",
  555. " <td>0</td>\n",
  556. " </tr>\n",
  557. " <tr>\n",
  558. " <th>9994</th>\n",
  559. " <td>2020-03-02</td>\n",
  560. " <td>Mexico</td>\n",
  561. " <td>NaN</td>\n",
  562. " <td>23.6345</td>\n",
  563. " <td>-102.5528</td>\n",
  564. " <td>5</td>\n",
  565. " <td>0.0</td>\n",
  566. " <td>0</td>\n",
  567. " </tr>\n",
  568. " <tr>\n",
  569. " <th>9995</th>\n",
  570. " <td>2020-03-03</td>\n",
  571. " <td>Mexico</td>\n",
  572. " <td>NaN</td>\n",
  573. " <td>23.6345</td>\n",
  574. " <td>-102.5528</td>\n",
  575. " <td>5</td>\n",
  576. " <td>1.0</td>\n",
  577. " <td>0</td>\n",
  578. " </tr>\n",
  579. " <tr>\n",
  580. " <th>9996</th>\n",
  581. " <td>2020-03-04</td>\n",
  582. " <td>Mexico</td>\n",
  583. " <td>NaN</td>\n",
  584. " <td>23.6345</td>\n",
  585. " <td>-102.5528</td>\n",
  586. " <td>5</td>\n",
  587. " <td>1.0</td>\n",
  588. " <td>0</td>\n",
  589. " </tr>\n",
  590. " <tr>\n",
  591. " <th>9997</th>\n",
  592. " <td>2020-03-05</td>\n",
  593. " <td>Mexico</td>\n",
  594. " <td>NaN</td>\n",
  595. " <td>23.6345</td>\n",
  596. " <td>-102.5528</td>\n",
  597. " <td>5</td>\n",
  598. " <td>1.0</td>\n",
  599. " <td>0</td>\n",
  600. " </tr>\n",
  601. " <tr>\n",
  602. " <th>9998</th>\n",
  603. " <td>2020-03-06</td>\n",
  604. " <td>Mexico</td>\n",
  605. " <td>NaN</td>\n",
  606. " <td>23.6345</td>\n",
  607. " <td>-102.5528</td>\n",
  608. " <td>6</td>\n",
  609. " <td>1.0</td>\n",
  610. " <td>0</td>\n",
  611. " </tr>\n",
  612. " <tr>\n",
  613. " <th>9999</th>\n",
  614. " <td>2020-03-07</td>\n",
  615. " <td>Mexico</td>\n",
  616. " <td>NaN</td>\n",
  617. " <td>23.6345</td>\n",
  618. " <td>-102.5528</td>\n",
  619. " <td>6</td>\n",
  620. " <td>1.0</td>\n",
  621. " <td>0</td>\n",
  622. " </tr>\n",
  623. " <tr>\n",
  624. " <th>10000</th>\n",
  625. " <td>2020-03-08</td>\n",
  626. " <td>Mexico</td>\n",
  627. " <td>NaN</td>\n",
  628. " <td>23.6345</td>\n",
  629. " <td>-102.5528</td>\n",
  630. " <td>7</td>\n",
  631. " <td>1.0</td>\n",
  632. " <td>0</td>\n",
  633. " </tr>\n",
  634. " <tr>\n",
  635. " <th>10001</th>\n",
  636. " <td>2020-03-09</td>\n",
  637. " <td>Mexico</td>\n",
  638. " <td>NaN</td>\n",
  639. " <td>23.6345</td>\n",
  640. " <td>-102.5528</td>\n",
  641. " <td>7</td>\n",
  642. " <td>1.0</td>\n",
  643. " <td>0</td>\n",
  644. " </tr>\n",
  645. " <tr>\n",
  646. " <th>10002</th>\n",
  647. " <td>2020-03-10</td>\n",
  648. " <td>Mexico</td>\n",
  649. " <td>NaN</td>\n",
  650. " <td>23.6345</td>\n",
  651. " <td>-102.5528</td>\n",
  652. " <td>7</td>\n",
  653. " <td>4.0</td>\n",
  654. " <td>0</td>\n",
  655. " </tr>\n",
  656. " <tr>\n",
  657. " <th>10003</th>\n",
  658. " <td>2020-03-11</td>\n",
  659. " <td>Mexico</td>\n",
  660. " <td>NaN</td>\n",
  661. " <td>23.6345</td>\n",
  662. " <td>-102.5528</td>\n",
  663. " <td>8</td>\n",
  664. " <td>4.0</td>\n",
  665. " <td>0</td>\n",
  666. " </tr>\n",
  667. " <tr>\n",
  668. " <th>10004</th>\n",
  669. " <td>2020-03-12</td>\n",
  670. " <td>Mexico</td>\n",
  671. " <td>NaN</td>\n",
  672. " <td>23.6345</td>\n",
  673. " <td>-102.5528</td>\n",
  674. " <td>12</td>\n",
  675. " <td>4.0</td>\n",
  676. " <td>0</td>\n",
  677. " </tr>\n",
  678. " <tr>\n",
  679. " <th>10005</th>\n",
  680. " <td>2020-03-13</td>\n",
  681. " <td>Mexico</td>\n",
  682. " <td>NaN</td>\n",
  683. " <td>23.6345</td>\n",
  684. " <td>-102.5528</td>\n",
  685. " <td>12</td>\n",
  686. " <td>4.0</td>\n",
  687. " <td>0</td>\n",
  688. " </tr>\n",
  689. " <tr>\n",
  690. " <th>10006</th>\n",
  691. " <td>2020-03-14</td>\n",
  692. " <td>Mexico</td>\n",
  693. " <td>NaN</td>\n",
  694. " <td>23.6345</td>\n",
  695. " <td>-102.5528</td>\n",
  696. " <td>26</td>\n",
  697. " <td>4.0</td>\n",
  698. " <td>0</td>\n",
  699. " </tr>\n",
  700. " <tr>\n",
  701. " <th>10007</th>\n",
  702. " <td>2020-03-15</td>\n",
  703. " <td>Mexico</td>\n",
  704. " <td>NaN</td>\n",
  705. " <td>23.6345</td>\n",
  706. " <td>-102.5528</td>\n",
  707. " <td>41</td>\n",
  708. " <td>4.0</td>\n",
  709. " <td>0</td>\n",
  710. " </tr>\n",
  711. " <tr>\n",
  712. " <th>10008</th>\n",
  713. " <td>2020-03-16</td>\n",
  714. " <td>Mexico</td>\n",
  715. " <td>NaN</td>\n",
  716. " <td>23.6345</td>\n",
  717. " <td>-102.5528</td>\n",
  718. " <td>53</td>\n",
  719. " <td>4.0</td>\n",
  720. " <td>0</td>\n",
  721. " </tr>\n",
  722. " <tr>\n",
  723. " <th>10009</th>\n",
  724. " <td>2020-03-17</td>\n",
  725. " <td>Mexico</td>\n",
  726. " <td>NaN</td>\n",
  727. " <td>23.6345</td>\n",
  728. " <td>-102.5528</td>\n",
  729. " <td>82</td>\n",
  730. " <td>4.0</td>\n",
  731. " <td>0</td>\n",
  732. " </tr>\n",
  733. " <tr>\n",
  734. " <th>10010</th>\n",
  735. " <td>2020-03-18</td>\n",
  736. " <td>Mexico</td>\n",
  737. " <td>NaN</td>\n",
  738. " <td>23.6345</td>\n",
  739. " <td>-102.5528</td>\n",
  740. " <td>93</td>\n",
  741. " <td>4.0</td>\n",
  742. " <td>0</td>\n",
  743. " </tr>\n",
  744. " <tr>\n",
  745. " <th>10011</th>\n",
  746. " <td>2020-03-19</td>\n",
  747. " <td>Mexico</td>\n",
  748. " <td>NaN</td>\n",
  749. " <td>23.6345</td>\n",
  750. " <td>-102.5528</td>\n",
  751. " <td>118</td>\n",
  752. " <td>4.0</td>\n",
  753. " <td>1</td>\n",
  754. " </tr>\n",
  755. " <tr>\n",
  756. " <th>10012</th>\n",
  757. " <td>2020-03-20</td>\n",
  758. " <td>Mexico</td>\n",
  759. " <td>NaN</td>\n",
  760. " <td>23.6345</td>\n",
  761. " <td>-102.5528</td>\n",
  762. " <td>164</td>\n",
  763. " <td>4.0</td>\n",
  764. " <td>1</td>\n",
  765. " </tr>\n",
  766. " <tr>\n",
  767. " <th>10013</th>\n",
  768. " <td>2020-03-21</td>\n",
  769. " <td>Mexico</td>\n",
  770. " <td>NaN</td>\n",
  771. " <td>23.6345</td>\n",
  772. " <td>-102.5528</td>\n",
  773. " <td>203</td>\n",
  774. " <td>4.0</td>\n",
  775. " <td>2</td>\n",
  776. " </tr>\n",
  777. " <tr>\n",
  778. " <th>10014</th>\n",
  779. " <td>2020-03-22</td>\n",
  780. " <td>Mexico</td>\n",
  781. " <td>NaN</td>\n",
  782. " <td>23.6345</td>\n",
  783. " <td>-102.5528</td>\n",
  784. " <td>251</td>\n",
  785. " <td>4.0</td>\n",
  786. " <td>2</td>\n",
  787. " </tr>\n",
  788. " <tr>\n",
  789. " <th>10015</th>\n",
  790. " <td>2020-03-23</td>\n",
  791. " <td>Mexico</td>\n",
  792. " <td>NaN</td>\n",
  793. " <td>23.6345</td>\n",
  794. " <td>-102.5528</td>\n",
  795. " <td>316</td>\n",
  796. " <td>4.0</td>\n",
  797. " <td>3</td>\n",
  798. " </tr>\n",
  799. " <tr>\n",
  800. " <th>10016</th>\n",
  801. " <td>2020-03-24</td>\n",
  802. " <td>Mexico</td>\n",
  803. " <td>NaN</td>\n",
  804. " <td>23.6345</td>\n",
  805. " <td>-102.5528</td>\n",
  806. " <td>367</td>\n",
  807. " <td>NaN</td>\n",
  808. " <td>4</td>\n",
  809. " </tr>\n",
  810. " </tbody>\n",
  811. "</table>\n",
  812. "</div>"
  813. ],
  814. "text/plain": [
  815. " Date Country/Region Province/State Lat Long Confirmed \\\n",
  816. "9991 2020-02-28 Mexico NaN 23.6345 -102.5528 1 \n",
  817. "9992 2020-02-29 Mexico NaN 23.6345 -102.5528 4 \n",
  818. "9993 2020-03-01 Mexico NaN 23.6345 -102.5528 5 \n",
  819. "9994 2020-03-02 Mexico NaN 23.6345 -102.5528 5 \n",
  820. "9995 2020-03-03 Mexico NaN 23.6345 -102.5528 5 \n",
  821. "9996 2020-03-04 Mexico NaN 23.6345 -102.5528 5 \n",
  822. "9997 2020-03-05 Mexico NaN 23.6345 -102.5528 5 \n",
  823. "9998 2020-03-06 Mexico NaN 23.6345 -102.5528 6 \n",
  824. "9999 2020-03-07 Mexico NaN 23.6345 -102.5528 6 \n",
  825. "10000 2020-03-08 Mexico NaN 23.6345 -102.5528 7 \n",
  826. "10001 2020-03-09 Mexico NaN 23.6345 -102.5528 7 \n",
  827. "10002 2020-03-10 Mexico NaN 23.6345 -102.5528 7 \n",
  828. "10003 2020-03-11 Mexico NaN 23.6345 -102.5528 8 \n",
  829. "10004 2020-03-12 Mexico NaN 23.6345 -102.5528 12 \n",
  830. "10005 2020-03-13 Mexico NaN 23.6345 -102.5528 12 \n",
  831. "10006 2020-03-14 Mexico NaN 23.6345 -102.5528 26 \n",
  832. "10007 2020-03-15 Mexico NaN 23.6345 -102.5528 41 \n",
  833. "10008 2020-03-16 Mexico NaN 23.6345 -102.5528 53 \n",
  834. "10009 2020-03-17 Mexico NaN 23.6345 -102.5528 82 \n",
  835. "10010 2020-03-18 Mexico NaN 23.6345 -102.5528 93 \n",
  836. "10011 2020-03-19 Mexico NaN 23.6345 -102.5528 118 \n",
  837. "10012 2020-03-20 Mexico NaN 23.6345 -102.5528 164 \n",
  838. "10013 2020-03-21 Mexico NaN 23.6345 -102.5528 203 \n",
  839. "10014 2020-03-22 Mexico NaN 23.6345 -102.5528 251 \n",
  840. "10015 2020-03-23 Mexico NaN 23.6345 -102.5528 316 \n",
  841. "10016 2020-03-24 Mexico NaN 23.6345 -102.5528 367 \n",
  842. "\n",
  843. " Recovered Deaths \n",
  844. "9991 0.0 0 \n",
  845. "9992 0.0 0 \n",
  846. "9993 0.0 0 \n",
  847. "9994 0.0 0 \n",
  848. "9995 1.0 0 \n",
  849. "9996 1.0 0 \n",
  850. "9997 1.0 0 \n",
  851. "9998 1.0 0 \n",
  852. "9999 1.0 0 \n",
  853. "10000 1.0 0 \n",
  854. "10001 1.0 0 \n",
  855. "10002 4.0 0 \n",
  856. "10003 4.0 0 \n",
  857. "10004 4.0 0 \n",
  858. "10005 4.0 0 \n",
  859. "10006 4.0 0 \n",
  860. "10007 4.0 0 \n",
  861. "10008 4.0 0 \n",
  862. "10009 4.0 0 \n",
  863. "10010 4.0 0 \n",
  864. "10011 4.0 1 \n",
  865. "10012 4.0 1 \n",
  866. "10013 4.0 2 \n",
  867. "10014 4.0 2 \n",
  868. "10015 4.0 3 \n",
  869. "10016 NaN 4 "
  870. ]
  871. },
  872. "execution_count": 100,
  873. "metadata": {},
  874. "output_type": "execute_result"
  875. }
  876. ],
  877. "source": [
  878. "mexico_filter = mexico_sort[mexico_sort['Confirmed']!=0]\n",
  879. "mexico_filter"
  880. ]
  881. },
  882. {
  883. "cell_type": "code",
  884. "execution_count": 118,
  885. "metadata": {},
  886. "outputs": [
  887. {
  888. "data": {
  889. "text/plain": [
  890. "array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
  891. " 18, 19, 20, 21, 22, 23, 24, 25, 26])"
  892. ]
  893. },
  894. "execution_count": 118,
  895. "metadata": {},
  896. "output_type": "execute_result"
  897. }
  898. ],
  899. "source": [
  900. "n=mexico_filter.shape[0]\n",
  901. "days=np.arange(1,n+1,1)\n",
  902. "days"
  903. ]
  904. },
  905. {
  906. "cell_type": "code",
  907. "execution_count": 119,
  908. "metadata": {},
  909. "outputs": [
  910. {
  911. "data": {
  912. "text/plain": [
  913. "<matplotlib.collections.PathCollection at 0x12acc8290>"
  914. ]
  915. },
  916. "execution_count": 119,
  917. "metadata": {},
  918. "output_type": "execute_result"
  919. },
  920. {
  921. "data": {
  922. "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29md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LOhfn+Sm4EfAjc06x4ErgNOAD8DPtHTFkuSlrRkuFfVt4AssPpD82xfwC0rbJckaQV8/IAktZDhLkktZLhLUgsZ7pLUQoa7JLWQ4S5JLWS4S1ILGe6S1EKGuyS1kOEuSS1kuEtSCzlBtqQ1Zz1OeN0tw13SmnJuwutz86Kem/AaMODnsFtG0pqyXie87pbhLmlNWa8TXnfLcJe0pqzXCa+7ZbhLWlPW64TX3fKGqqQ1Zb1OeN2tTibIvhf4J8DpqnpvU7sd+JfAdLPZZ6rqwWbdXuBm4Czwr6vqSB/aLWkdW48TXnerk26ZLwPXzFO/s6q2N1/ngv09wI3Abzb7/KckG+bZV5LUR0uGe1V9E3ilw/e7Hrivql6vqh8AJ4ArVtA+SdIyrOSG6q1Jnk5yb5ILmto48OKcbU42tV+SZHeSySST09PT820iSVqm5Yb7XcC7ge3AKeDz3b5BVd1dVRNVNTE2NrbMZkiS5rOscK+ql6vqbFX9HPgSv+h6mQK2zNn0kqYmSVpFywr3JJvmvPwI8EyzfBi4Mck7klwKXAY8vrImSpK61clQyK8BVwEXJTkJfBa4Ksl2oIAXgE8CVNWzSe4HngPeBG6pqrPzva8kqX9SVYNuAxMTEzU5OTnoZkjSmpLkiaqamG+djx+QpBYy3CWphQx3SWohw12SWshwl6QWMtwlqYUMd0lqIcNdklrIcJekFnK
  923. "text/plain": [
  924. "<Figure size 432x288 with 1 Axes>"
  925. ]
  926. },
  927. "metadata": {
  928. "needs_background": "light"
  929. },
  930. "output_type": "display_data"
  931. }
  932. ],
  933. "source": [
  934. "#mexico_filter = mexico_sort[mexico_sort['Confirmed']!=0]\n",
  935. "plt.scatter(x=days, y=mexico_filter['Confirmed'])"
  936. ]
  937. },
  938. {
  939. "cell_type": "code",
  940. "execution_count": 127,
  941. "metadata": {},
  942. "outputs": [],
  943. "source": []
  944. },
  945. {
  946. "cell_type": "code",
  947. "execution_count": 132,
  948. "metadata": {},
  949. "outputs": [
  950. {
  951. "data": {
  952. "text/plain": [
  953. "array([ 1.07768657, 0.22640743, -3.90363561])"
  954. ]
  955. },
  956. "execution_count": 132,
  957. "metadata": {},
  958. "output_type": "execute_result"
  959. }
  960. ],
  961. "source": [
  962. "from scipy.optimize import curve_fit\n",
  963. "def exponential(x, a,k, b):\n",
  964. " return a*np.exp(x*k) + b\n",
  965. "\n",
  966. "potp, pcov = curve_fit(exponential, days, mexico_filter['Confirmed'])\n",
  967. "potp"
  968. ]
  969. },
  970. {
  971. "cell_type": "code",
  972. "execution_count": null,
  973. "metadata": {},
  974. "outputs": [],
  975. "source": []
  976. },
  977. {
  978. "cell_type": "code",
  979. "execution_count": null,
  980. "metadata": {},
  981. "outputs": [],
  982. "source": []
  983. },
  984. {
  985. "cell_type": "code",
  986. "execution_count": null,
  987. "metadata": {},
  988. "outputs": [],
  989. "source": []
  990. },
  991. {
  992. "cell_type": "code",
  993. "execution_count": 122,
  994. "metadata": {},
  995. "outputs": [],
  996. "source": []
  997. },
  998. {
  999. "cell_type": "code",
  1000. "execution_count": 133,
  1001. "metadata": {},
  1002. "outputs": [
  1003. {
  1004. "data": {
  1005. "text/plain": [
  1006. "[<matplotlib.lines.Line2D at 0x12b888fd0>]"
  1007. ]
  1008. },
  1009. "execution_count": 133,
  1010. "metadata": {},
  1011. "output_type": "execute_result"
  1012. },
  1013. {
  1014. "data": {
  1015. "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD7CAYAAACRxdTpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de3wV9Z3/8dcnIVwCKqApIORCvVStdalG1C5br1y8ol212Fjx8jPdrba6tW7RrFu3boq2VtRqbUNFoR6L1iu6ritSWmtbL8EiImhFTQKIEEW5GCQk+fz+mImcQC4nyTmZk5P38/GYx3znOzPnfMbz8JPhO9/5fs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3eubv7Ond/JSxvAVYCo9s5ZSow3923u/u7wCpamWtVRCQdlZWVfZbYA8ET1Orq/4omoC7qVJu7mRURTJb9Ylh1uZktM7M5ZjYsrBsNrI47bQ3t/zEQEUkbNTU1cVtHAQcD71NbOy+iiLom4eRuZkOAh4Er3X0zcBewHzAOWAf8rDNfbGalZlZpZpW1tbWdOVVEJGUKCuKbXi4O17+hsLB33aMmlNzNLIcgscfc/REAd1/v7o3u3gTMZmfTy1ogP+70MWFdC+5e4e7F7l6cl5fXnWsQEUma8vJycnNzgUEEjw9h4MD5lJeXRxpXZ3X4QNXMDLgbWOnut8TVj3L3deHmWcDysLwAuN/MbiF4oHoA8FJSoxYRSZGSkhIArrjiZT78cE/691/Kr3/9vc/qe4tEesv8I/BN4DUzWxrWXQucZ2bjAAeqgG8BuPvrZvYgsIKgp81l6ikjIr3JN75Rwh13lPD
  1016. "text/plain": [
  1017. "<Figure size 432x288 with 1 Axes>"
  1018. ]
  1019. },
  1020. "metadata": {
  1021. "needs_background": "light"
  1022. },
  1023. "output_type": "display_data"
  1024. }
  1025. ],
  1026. "source": [
  1027. "# Plot outputs\n",
  1028. "plt.scatter(days, mexico_filter['Confirmed'], color='black')\n",
  1029. "plt.plot(days,exponential(days,*potp), color='blue', linewidth=2)"
  1030. ]
  1031. }
  1032. ],
  1033. "metadata": {
  1034. "kernelspec": {
  1035. "display_name": "Python 3",
  1036. "language": "python",
  1037. "name": "python3"
  1038. },
  1039. "language_info": {
  1040. "codemirror_mode": {
  1041. "name": "ipython",
  1042. "version": 3
  1043. },
  1044. "file_extension": ".py",
  1045. "mimetype": "text/x-python",
  1046. "name": "python",
  1047. "nbconvert_exporter": "python",
  1048. "pygments_lexer": "ipython3",
  1049. "version": "3.7.7"
  1050. }
  1051. },
  1052. "nbformat": 4,
  1053. "nbformat_minor": 4
  1054. }