Wolfram Research

Epidemic Data for Novel Coronavirus COVID-19

Estimated cases of novel coronavirus (COVID-19, formerly known as 2019-nCoV) infection by country or region

Estimated confirmed COVID-19 infection trend by country or region.

Data is based on WHO, U.S. CDC, ECDC, China CDC (CCDC), NHC and DXY.

Data for Hong Kong SAR, Macau SAR, and Taiwan is separate from data for China.

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Epidemic Data for Novel Coronavirus COVID-19"]
Out[1]=

Retrieve the default content:

In[2]:=
ResourceData["Epidemic Data for Novel Coronavirus COVID-19"]
Out[2]=

Latest update date:

In[3]:=
ResourceData[
  "Epidemic Data for Novel Coronavirus COVID-19"][Max, \
#ConfirmedCases["LastDate"] &]
Out[3]=

Color countries by the latest confirmed cases:

In[4]:=
GeoRegionValuePlot[
 Normal@ResourceData["Epidemic Data for Novel Coronavirus COVID-19"][
   GroupBy["Country"], Total, #ConfirmedCases["LastValue"] &]]
Out[4]=

Create a bubble chart of the confirmed cases for the regions in China:

In[5]:=
Manipulate[
 GeoBubbleChart[
  Normal@data[Select[MatchQ[Entity["Country", "China"], #Country] &]][
    All, {#AdministrativeDivision, #ConfirmedCases[date]} &], BubbleSizes -> ({.01 + #[[1]]/500, #[[2]]/60000} &@
     Normal@data[
        Select[MatchQ[Entity["Country", "China"], #Country] &]][
       MinMax, #ConfirmedCases[date] &])], {{date, dates[[1]], Dynamic[date]}, dates}, ControlType -> Slider, SynchronousInitialization -> False, SynchronousUpdating -> False, TrackedSymbols :> {date}, Initialization :> {data = ResourceData["Epidemic Data for Novel Coronavirus COVID-19"]; dates = Sort@
     Union@Flatten@Normal@data[All, #ConfirmedCases["DateList"] &]}]
Out[5]=

Plot estimated confirmed cases in the regions of China over the past few days:

In[6]:=
cases = ResourceData["Epidemic Data for Novel Coronavirus COVID-19"][
    Select[MemberQ[{Entity[
         "AdministrativeDivision", {"Hubei", "China"}], Entity["AdministrativeDivision", {"Zhejiang", "China"}], Entity["AdministrativeDivision", {"Guangdong", "China"}]}, #AdministrativeDivision] &]][
   All, {"AdministrativeDivision", "ConfirmedCases"}];
In[7]:=
Row[{DateListPlot[Legended[#[[2]], #[[1]]] & /@ cases, PlotTheme -> "Business", PlotLabel -> "estimated confirmed cases", ImageSize -> 300, PlotRange -> Full], DateListLogPlot[Legended[#[[2]], #[[1]]] & /@ cases, PlotTheme -> "Business", PlotLabel -> "estimated confirmed cases (log scale)", ImageSize -> 300, PlotRange -> Full]}]
Out[7]=

Wolfram Research, "Epidemic Data for Novel Coronavirus COVID-19" from the Wolfram Data Repository (2020) https://doi.org/10.24097/wolfram.04123.data

Data Resource History

Source Metadata

See Also

Data Downloads

Publisher Information