R scripts to process/cleanup data from the repo: https://github.com/CSSEGISandData/COVID-19 into tidy datasets[1]
Last updated on 2020-03-06 08:00:49
Data source commit reference: e1c41f13e907e3828fb40cb542148b6430426199
Notes
- For the cases, I’ve used the filename to to get the timestamp, because that is more reliable
- 2020-02-14: the original data source has changed its data structure, the timeseries data is empty as of the commit referred below.
- 2020-02-27: changed code to reflect changes in source data files.
- 2020-03-04: added Continents and ISO-3 country codes, using the
countrycode
R package. - 2020-03-05:
- Latitude and longitude information started appearing in cases files in March, used that to add that information the rest of the cases.
- Added code to tidy the WHO situation report timeseries
Here are couple of quick tables:
continent | iso3c | country_region | province_state | confirmed | deaths | recovered | confirmed_pct |
---|---|---|---|---|---|---|---|
Asia | CHN | Mainland China | Hubei | 67466 | 2902 | 40592 | 68.92 |
Asia | CHN | Mainland China | Guangdong | 1351 | 7 | 1181 | 1.38 |
Asia | CHN | Mainland China | Henan | 1272 | 22 | 1239 | 1.30 |
Asia | CHN | Mainland China | Zhejiang | 1215 | 1 | 1124 | 1.24 |
Asia | CHN | Mainland China | Hunan | 1018 | 4 | 938 | 1.04 |
Asia | CHN | Mainland China | Anhui | 990 | 6 | 970 | 1.01 |
Asia | CHN | Mainland China | Jiangxi | 935 | 1 | 901 | 0.96 |
Asia | CHN | Mainland China | Shandong | 758 | 6 | 578 | 0.77 |
Asia | CHN | Mainland China | Jiangsu | 631 | 0 | 583 | 0.64 |
Asia | CHN | Mainland China | Chongqing | 576 | 6 | 512 | 0.59 |
Asia | CHN | Mainland China | Sichuan | 539 | 3 | 425 | 0.55 |
Asia | CHN | Mainland China | Heilongjiang | 481 | 13 | 379 | 0.49 |
Asia | CHN | Mainland China | Beijing | 418 | 8 | 297 | 0.43 |
Asia | CHN | Mainland China | Shanghai | 339 | 3 | 303 | 0.35 |
Asia | CHN | Mainland China | Hebei | 318 | 6 | 304 | 0.32 |
Asia | CHN | Mainland China | Fujian | 296 | 1 | 277 | 0.30 |
Asia | CHN | Mainland China | Guangxi | 252 | 2 | 214 | 0.26 |
Asia | CHN | Mainland China | Shaanxi | 245 | 1 | 224 | 0.25 |
Asia | CHN | Mainland China | Yunnan | 174 | 2 | 169 | 0.18 |
Asia | CHN | Mainland China | Hainan | 168 | 6 | 158 | 0.17 |
Asia | CHN | Mainland China | Guizhou | 146 | 2 | 114 | 0.15 |
Asia | CHN | Mainland China | Tianjin | 136 | 3 | 128 | 0.14 |
Asia | CHN | Mainland China | Shanxi | 133 | 0 | 126 | 0.14 |
Asia | CHN | Mainland China | Liaoning | 125 | 1 | 106 | 0.13 |
Asia | CHN | Mainland China | Gansu | 102 | 2 | 87 | 0.10 |
Asia | CHN | Mainland China | Jilin | 93 | 1 | 88 | 0.10 |
Asia | CHN | Mainland China | Xinjiang | 76 | 3 | 70 | 0.08 |
Asia | CHN | Mainland China | Inner Mongolia | 75 | 1 | 65 | 0.08 |
Asia | CHN | Mainland China | Ningxia | 75 | 0 | 69 | 0.08 |
Asia | CHN | Mainland China | Qinghai | 18 | 0 | 18 | 0.02 |
Asia | CHN | Mainland China | Tibet | 1 | 0 | 1 | 0.00 |
continent | iso3c | country_region | province_state | confirmed | deaths | recovered | confirmed_pct |
---|---|---|---|---|---|---|---|
Asia | KOR | South Korea | NA | 6088 | 35 | 41 | 6.22 |
Europe | ITA | Italy | NA | 3858 | 148 | 414 | 3.94 |
Asia | IRN | Iran | NA | 3513 | 107 | 739 | 3.59 |
Others | Others | Others | Diamond Princess cruise ship | 706 | 6 | 10 | 0.72 |
Europe | DEU | Germany | NA | 482 | 0 | 16 | 0.49 |
Europe | FRA | France | NA | 377 | 6 | 12 | 0.39 |
Asia | JPN | Japan | NA | 360 | 6 | 43 | 0.37 |
Europe | ESP | Spain | NA | 259 | 3 | 2 | 0.26 |
Asia | SGP | Singapore | NA | 117 | 0 | 78 | 0.12 |
Europe | GBR | UK | NA | 115 | 1 | 8 | 0.12 |
Europe | CHE | Switzerland | NA | 114 | 1 | 3 | 0.12 |
Asia | HKG | Hong Kong | Hong Kong | 105 | 2 | 43 | 0.11 |
Europe | SWE | Sweden | NA | 94 | 0 | 0 | 0.10 |
Europe | NOR | Norway | NA | 87 | 0 | 0 | 0.09 |
Europe | NLD | Netherlands | NA | 82 | 0 | 0 | 0.08 |
Asia | KWT | Kuwait | NA | 58 | 0 | 0 | 0.06 |
Asia | BHR | Bahrain | NA | 55 | 0 | 0 | 0.06 |
Americas | USA | US | King County, WA | 51 | 10 | 1 | 0.05 |
Europe | BEL | Belgium | NA | 50 | 0 | 1 | 0.05 |
Asia | MYS | Malaysia | NA | 50 | 0 | 22 | 0.05 |
Asia | THA | Thailand | NA | 47 | 1 | 31 | 0.05 |
Americas | USA | US | Unassigned Location (From Diamond Princess) | 45 | 0 | 0 | 0.05 |
Asia | TWN | Taiwan | Taiwan | 44 | 1 | 12 | 0.04 |
Europe | AUT | Austria | NA | 41 | 0 | 0 | 0.04 |
Asia | IRQ | Iraq | NA | 35 | 2 | 0 | 0.04 |
Europe | ISL | Iceland | NA | 34 | 0 | 0 | 0.03 |
Europe | GRC | Greece | NA | 31 | 0 | 0 | 0.03 |
Asia | IND | India | NA | 30 | 0 | 3 | 0.03 |
Asia | ARE | United Arab Emirates | NA | 29 | 0 | 5 | 0.03 |
Oceania | AUS | Australia | New South Wales | 22 | 1 | 4 | 0.02 |
Americas | CAN | Canada | Toronto, ON | 21 | 0 | 2 | 0.02 |
Europe | SMR | San Marino | NA | 21 | 1 | 0 | 0.02 |
Americas | USA | US | Santa Clara, CA | 20 | 0 | 1 | 0.02 |
Americas | USA | US | Snohomish County, WA | 18 | 1 | 0 | 0.02 |
Americas | USA | US | Westchester County, NY | 18 | 0 | 0 | 0.02 |
Asia | ISR | Israel | NA | 16 | 0 | 1 | 0.02 |
Asia | LBN | Lebanon | NA | 16 | 0 | 1 | 0.02 |
Asia | OMN | Oman | NA | 16 | 0 | 2 | 0.02 |
Asia | VNM | Vietnam | NA | 16 | 0 | 16 | 0.02 |
Oceania | AUS | Australia | Queensland | 13 | 0 | 8 | 0.01 |
Americas | CAN | Canada | British Columbia | 13 | 0 | 3 | 0.01 |
Americas | ECU | Ecuador | NA | 13 | 0 | 0 | 0.01 |
Africa | DZA | Algeria | NA | 12 | 0 | 0 | 0.01 |
Europe | CZE | Czech Republic | NA | 12 | 0 | 0 | 0.01 |
Europe | FIN | Finland | NA | 12 | 0 | 1 | 0.01 |
Americas | USA | US | Los Angeles, CA | 11 | 0 | 0 | 0.01 |
Oceania | AUS | Australia | Victoria | 10 | 0 | 7 | 0.01 |
Europe | HRV | Croatia | NA | 10 | 0 | 0 | 0.01 |
Europe | DNK | Denmark | NA | 10 | 0 | 0 | 0.01 |
Asia | MAC | Macau | Macau | 10 | 0 | 9 | 0.01 |
Europe | PRT | Portugal | NA | 8 | 0 | 0 | 0.01 |
Asia | QAT | Qatar | NA | 8 | 0 | 0 | 0.01 |
Asia | AZE | Azerbaijan | NA | 6 | 0 | 0 | 0.01 |
Europe | BLR | Belarus | NA | 6 | 0 | 0 | 0.01 |
Europe | IRL | Ireland | NA | 6 | 0 | 0 | 0.01 |
Europe | ROU | Romania | NA | 6 | 0 | 1 | 0.01 |
Oceania | AUS | Australia | South Australia | 5 | 0 | 2 | 0.01 |
Americas | MEX | Mexico | NA | 5 | 0 | 1 | 0.01 |
Asia | PAK | Pakistan | NA | 5 | 0 | 0 | 0.01 |
Asia | SAU | Saudi Arabia | NA | 5 | 0 | 0 | 0.01 |
Americas | USA | US | Cook County, IL | 5 | 0 | 2 | 0.01 |
Americas | BRA | Brazil | NA | 4 | 0 | 0 | 0.00 |
Americas | CHL | Chile | NA | 4 | 0 | 0 | 0.00 |
Asia | GEO | Georgia | NA | 4 | 0 | 0 | 0.00 |
Asia | PSE | Palestine | NA | 4 | 0 | 0 | 0.00 |
Europe | RUS | Russia | NA | 4 | 0 | 2 | 0.00 |
Africa | SEN | Senegal | NA | 4 | 0 | 0 | 0.00 |
Americas | USA | US | New York City, NY | 4 | 0 | 0 | 0.00 |
Oceania | AUS | Australia | Western Australia | 3 | 1 | 0 | 0.00 |
Africa | EGY | Egypt | NA | 3 | 0 | 1 | 0.00 |
Europe | EST | Estonia | NA | 3 | 0 | 0 | 0.00 |
Oceania | NZL | New Zealand | NA | 3 | 0 | 0 | 0.00 |
Asia | PHL | Philippines | NA | 3 | 1 | 1 | 0.00 |
Americas | BLM | Saint Barthelemy | NA | 3 | 0 | 0 | 0.00 |
Americas | USA | US | Orange County, CA | 3 | 0 | 0 | 0.00 |
Americas | USA | US | San Diego County, CA | 3 | 0 | 1 | 0.00 |
Europe | BIH | Bosnia and Herzegovina | NA | 2 | 0 | 0 | 0.00 |
Americas | CAN | Canada | Montreal, QC | 2 | 0 | 0 | 0.00 |
Europe | HUN | Hungary | NA | 2 | 0 | 0 | 0.00 |
Asia | IDN | Indonesia | NA | 2 | 0 | 0 | 0.00 |
Africa | MAR | Morocco | NA | 2 | 0 | 0 | 0.00 |
Europe | SVN | Slovenia | NA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Bergen County, NJ | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Fulton County, GA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Grafton County, NH | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Harris County, TX | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Hillsborough, FL | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Placer County, CA | 2 | 1 | 0 | 0.00 |
Americas | USA | US | Providence, RI | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Sacramento County, CA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | San Benito, CA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | San Francisco County, CA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | San Mateo, CA | 2 | 0 | 0 | 0.00 |
Americas | USA | US | Washington County, OR | 2 | 0 | 0 | 0.00 |
Asia | AFG | Afghanistan | NA | 1 | 0 | 0 | 0.00 |
Europe | AND | Andorra | NA | 1 | 0 | 0 | 0.00 |
Americas | ARG | Argentina | NA | 1 | 0 | 0 | 0.00 |
Asia | ARM | Armenia | NA | 1 | 0 | 0 | 0.00 |
Oceania | AUS | Australia | Northern Territory | 1 | 0 | 0 | 0.00 |
Oceania | AUS | Australia | Tasmania | 1 | 0 | 0 | 0.00 |
Asia | KHM | Cambodia | NA | 1 | 0 | 1 | 0.00 |
Americas | CAN | Canada | London, ON | 1 | 0 | 1 | 0.00 |
Americas | DOM | Dominican Republic | NA | 1 | 0 | 0 | 0.00 |
Europe | FRO | Faroe Islands | NA | 1 | 0 | 0 | 0.00 |
Europe | GIB | Gibraltar | NA | 1 | 0 | 0 | 0.00 |
Asia | JOR | Jordan | NA | 1 | 0 | 0 | 0.00 |
Europe | LVA | Latvia | NA | 1 | 0 | 0 | 0.00 |
Europe | LIE | Liechtenstein | NA | 1 | 0 | 0 | 0.00 |
Europe | LTU | Lithuania | NA | 1 | 0 | 0 | 0.00 |
Europe | LUX | Luxembourg | NA | 1 | 0 | 0 | 0.00 |
Europe | MCO | Monaco | NA | 1 | 0 | 0 | 0.00 |
Asia | NPL | Nepal | NA | 1 | 0 | 1 | 0.00 |
Africa | NGA | Nigeria | NA | 1 | 0 | 0 | 0.00 |
Europe | MKD | North Macedonia | NA | 1 | 0 | 0 | 0.00 |
Europe | POL | Poland | NA | 1 | 0 | 0 | 0.00 |
Africa | ZAF | South Africa | NA | 1 | 0 | 0 | 0.00 |
Asia | LKA | Sri Lanka | NA | 1 | 0 | 1 | 0.00 |
Africa | TUN | Tunisia | NA | 1 | 0 | 0 | 0.00 |
Europe | UKR | Ukraine | NA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Berkeley, CA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Boston, MA | 1 | 0 | 1 | 0.00 |
Americas | USA | US | Clark County, NV | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Contra Costa County, CA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Fort Bend County, TX | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Grant County, WA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Humboldt County, CA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Madison, WI | 1 | 0 | 1 | 0.00 |
Americas | USA | US | Maricopa County, AZ | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Norfolk County, MA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Queens County, NY | 1 | 0 | 0 | 0.00 |
Americas | USA | US | San Antonio, TX | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Santa Rosa County, FL | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Sarasota, FL | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Sonoma County, CA | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Tempe, AZ | 1 | 0 | 1 | 0.00 |
Americas | USA | US | Umatilla, OR | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Wake County, NC | 1 | 0 | 0 | 0.00 |
Americas | USA | US | Williamson County, TN | 1 | 0 | 0 | 0.00 |
Oceania | AUS | Australia | From Diamond Princess | 0 | 0 | 0 | 0.00 |
Americas | USA | US | Lackland, TX (From Diamond Princess) | 0 | 0 | 0 | 0.00 |
Americas | USA | US | Omaha, NE (From Diamond Princess) | 0 | 0 | 0 | 0.00 |
Americas | USA | US | Travis, CA (From Diamond Princess) | 0 | 0 | 0 | 0.00 |
[1] “Tidy Data” H. Wickham, https://www.jstatsoft.org/article/view/v059i10