Skip to content

Commit

Permalink
update mar 16
Browse files Browse the repository at this point in the history
  • Loading branch information
paaatcha committed Mar 17, 2020
1 parent ea2961a commit 78b782e
Show file tree
Hide file tree
Showing 62 changed files with 27,263 additions and 25,868 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ On March 11, 2020, the World Health Organization (WHO) declared the Covid-19 (a.

For Portuguese speakers, I wrote a post in my blog about this analysis: [O que os dados dizem sobre o Coronavírus?](http://computacaointeligente.com.br/coolstuffs/analisando-coronavirus/)

## Some plots and tables got during the analysis (updated on March 15, 2020)
## Some plots and tables got during the analysis (updated on March 16, 2020)
### Covid-19 worldwide (without China):
![covid-19-wo-chinha](figures/en/conf_cases_worldwide_no_china.png)

Expand All @@ -16,16 +16,16 @@ For Portuguese speakers, I wrote a post in my blog about this analysis: [O que o
### Top 10 infected countries
| Country/Region | Confirmed | Deaths | Recovered | % Deaths | % Population |
|:-----------------|------------:|---------:|------------:|------------:|-----------:|
| China | 81003 | 3203 | 67017 | 3.95417 | 0.00581613 |
| Italy | 24747 | 1809 | 2335 | 7.30998 | 0.0409506 |
| Iran | 13938 | 724 | 4590 | 5.19443 | 0.0170391 |
| Korea, South | 8162 | 75 | 510 | 0.918892 | 0.015807 |
| Spain | 7798 | 289 | 517 | 3.70608 | 0.0166896 |
| Germany | 5795 | 11 | 46 | 0.189819 | 0.006988 |
| France | 4513 | 91 | 12 | 2.0164 | 0.0067371 |
| US | 3499 | 63 | 12 | 1.80051 | 0.00106948 |
| China | 81033 | 3217 | 67910 | 3.96999 | 0.00581828 |
| Italy | 27980 | 2158 | 2749 | 7.71265 | 0.0463005 |
| Iran | 14991 | 853 | 4590 | 5.69008 | 0.0183263 |
| Spain | 9942 | 342 | 530 | 3.43995 | 0.0212783 |
| Korea, South | 8236 | 75 | 1137 | 0.910636 | 0.0159503 |
| Germany | 7272 | 17 | 67 | 0.233773 | 0.00876906 |
| France | 6650 | 148 | 12 | 2.22556 | 0.00992726 |
| US | 4632 | 85 | 17 | 1.83506 | 0.00141579 |
| Switzerland | 2200 | 14 | 4 | 0.636364 | 0.0258321 |
| Norway | 1221 | 3 | 1 | 0.2457 | 0.0229756 |
| United Kingdom | 1551 | 56 | 21 | 3.61057 | 0.00233272 |

### Comparing confirmed cases around the world

Expand Down
462 changes: 231 additions & 231 deletions analysis.ipynb

Large diffs are not rendered by default.

49,681 changes: 25,423 additions & 24,258 deletions data/clean_data.csv

Large diffs are not rendered by default.

915 changes: 464 additions & 451 deletions data/raw/Confirmed_cases.csv

Large diffs are not rendered by default.

915 changes: 464 additions & 451 deletions data/raw/Deaths_cases.csv

Large diffs are not rendered by default.

915 changes: 464 additions & 451 deletions data/raw/Recovered_cases.csv

Large diffs are not rendered by default.

Binary file modified figures/en/conf_cases_countries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_USA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_brazil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_canada.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_china.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_france.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_germany.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_iran.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_italy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_in_span.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_worldwide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_cases_worldwide_no_china.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/conf_early_cases_countries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_USA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_brazil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_canada.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_france.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_germany.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_iran.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_italy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_korea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_in_spain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_worldwide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/deaths_worldwide_no_china.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/early_cases_conf_brazil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/en/early_cases_conf_canada.png
Binary file modified figures/en/mortes_in_china.png
Binary file modified figures/pt/casos_conf_EUA.png
Binary file modified figures/pt/casos_conf_alemanha.png
Binary file modified figures/pt/casos_conf_brasil.png
Binary file modified figures/pt/casos_conf_canada.png
Binary file modified figures/pt/casos_conf_coreia.png
Binary file modified figures/pt/casos_conf_espanha.png
Binary file modified figures/pt/casos_conf_france.png
Binary file modified figures/pt/casos_conf_iran.png
Binary file modified figures/pt/casos_conf_italia.png
Binary file modified figures/pt/casos_conf_mundo.png
Binary file modified figures/pt/casos_conf_mundo_sem_china.png
Binary file modified figures/pt/casos_conf_na_china.png
Binary file modified figures/pt/casos_confirmados_paises.png
Binary file modified figures/pt/mortes_china.png
Binary file modified figures/pt/mortes_mundo.png
Binary file modified figures/pt/mortes_mundo_sem_china.png
Binary file modified figures/pt/mortes_na_EUA.png
Binary file modified figures/pt/mortes_na_alemanha.png
Binary file modified figures/pt/mortes_na_brasil.png
Binary file modified figures/pt/mortes_na_canada.png
Binary file modified figures/pt/mortes_na_coreia.png
Binary file modified figures/pt/mortes_na_espanha.png
Binary file modified figures/pt/mortes_na_franca.png
Binary file modified figures/pt/mortes_na_iran.png
Binary file modified figures/pt/mortes_na_italia.png
Binary file modified figures/pt/prim_casos_conf_brasil.png
Binary file modified figures/pt/prim_casos_conf_canada.png
Binary file modified figures/pt/primeiros_casos_paises.png
223 changes: 207 additions & 16 deletions get_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -35,26 +35,217 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"- Downloading Confirmed ...\n"
"- Downloading Confirmed ...\n",
"- Downloading Recovered ...\n",
"- Downloading Deaths ...\n",
"- Done!\n"
]
},
{
"ename": "NameError",
"evalue": "name 'urllib' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-2-dd4935cb1b7b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0murl_key\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mURLS\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"- Downloading\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0murl_key\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"...\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0murllib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrequest\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0murlretrieve\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mURLS\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0murl_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'data/raw/{}_cases.csv'\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl_key\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"- Done!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: name 'urllib' is not defined"
]
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Province/State</th>\n",
" <th>Country/Region</th>\n",
" <th>Lat</th>\n",
" <th>Long</th>\n",
" <th>1/22/20</th>\n",
" <th>1/23/20</th>\n",
" <th>1/24/20</th>\n",
" <th>1/25/20</th>\n",
" <th>1/26/20</th>\n",
" <th>1/27/20</th>\n",
" <th>...</th>\n",
" <th>3/7/20</th>\n",
" <th>3/8/20</th>\n",
" <th>3/9/20</th>\n",
" <th>3/10/20</th>\n",
" <th>3/11/20</th>\n",
" <th>3/12/20</th>\n",
" <th>3/13/20</th>\n",
" <th>3/14/20</th>\n",
" <th>3/15/20</th>\n",
" <th>3/16/20</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>NaN</td>\n",
" <td>Thailand</td>\n",
" <td>15.0000</td>\n",
" <td>101.0000</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>5</td>\n",
" <td>7</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" <td>...</td>\n",
" <td>50</td>\n",
" <td>50</td>\n",
" <td>50</td>\n",
" <td>53</td>\n",
" <td>59</td>\n",
" <td>70</td>\n",
" <td>75</td>\n",
" <td>82</td>\n",
" <td>114</td>\n",
" <td>147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>NaN</td>\n",
" <td>Japan</td>\n",
" <td>36.0000</td>\n",
" <td>138.0000</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>...</td>\n",
" <td>461</td>\n",
" <td>502</td>\n",
" <td>511</td>\n",
" <td>581</td>\n",
" <td>639</td>\n",
" <td>639</td>\n",
" <td>701</td>\n",
" <td>773</td>\n",
" <td>839</td>\n",
" <td>825</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>NaN</td>\n",
" <td>Singapore</td>\n",
" <td>1.2833</td>\n",
" <td>103.8333</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>5</td>\n",
" <td>...</td>\n",
" <td>138</td>\n",
" <td>150</td>\n",
" <td>150</td>\n",
" <td>160</td>\n",
" <td>178</td>\n",
" <td>178</td>\n",
" <td>200</td>\n",
" <td>212</td>\n",
" <td>226</td>\n",
" <td>243</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>NaN</td>\n",
" <td>Nepal</td>\n",
" <td>28.1667</td>\n",
" <td>84.2500</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>NaN</td>\n",
" <td>Malaysia</td>\n",
" <td>2.5000</td>\n",
" <td>112.5000</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>...</td>\n",
" <td>93</td>\n",
" <td>99</td>\n",
" <td>117</td>\n",
" <td>129</td>\n",
" <td>149</td>\n",
" <td>149</td>\n",
" <td>197</td>\n",
" <td>238</td>\n",
" <td>428</td>\n",
" <td>566</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 59 columns</p>\n",
"</div>"
],
"text/plain": [
" Province/State Country/Region Lat Long 1/22/20 1/23/20 1/24/20 \\\n",
"0 NaN Thailand 15.0000 101.0000 2 3 5 \n",
"1 NaN Japan 36.0000 138.0000 2 1 2 \n",
"2 NaN Singapore 1.2833 103.8333 0 1 3 \n",
"3 NaN Nepal 28.1667 84.2500 0 0 0 \n",
"4 NaN Malaysia 2.5000 112.5000 0 0 0 \n",
"\n",
" 1/25/20 1/26/20 1/27/20 ... 3/7/20 3/8/20 3/9/20 3/10/20 3/11/20 \\\n",
"0 7 8 8 ... 50 50 50 53 59 \n",
"1 2 4 4 ... 461 502 511 581 639 \n",
"2 3 4 5 ... 138 150 150 160 178 \n",
"3 1 1 1 ... 1 1 1 1 1 \n",
"4 3 4 4 ... 93 99 117 129 149 \n",
"\n",
" 3/12/20 3/13/20 3/14/20 3/15/20 3/16/20 \n",
"0 70 75 82 114 147 \n",
"1 639 701 773 839 825 \n",
"2 178 200 212 226 243 \n",
"3 1 1 1 1 1 \n",
"4 149 197 238 428 566 \n",
"\n",
"[5 rows x 59 columns]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -68,7 +259,7 @@
"\n",
"for url_key in URLS:\n",
" print (\"- Downloading\", url_key, \"...\")\n",
" urllib.request.urlretrieve(URLS[url_key], 'data/raw/{}_cases.csv'.format(url_key))\n",
" request.urlretrieve(URLS[url_key], 'data/raw/{}_cases.csv'.format(url_key))\n",
"print (\"- Done!\")\n",
"\n",
"\n",
Expand All @@ -88,7 +279,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 12,
"metadata": {
"scrolled": false
},
Expand Down Expand Up @@ -200,7 +391,7 @@
"4 0 0 "
]
},
"execution_count": 32,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -229,7 +420,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit 78b782e

Please sign in to comment.