Wolfram Research

Patient Medical Data for Novel Coronavirus COVID-19

Medical records of patients infected with novel coronavirus COVID-19 (This data was imported and made computable on July 6, 2020.)

Patient record including age, sex, location, date of onset, symptoms, travel history, chronic diseases, and date of discharge or death.

Examples

Basic Examples

Retrieve the resource:

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

Retrieve the default content, which includes medical records with patient characteristics information (excluding the records in which only location information is available):

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

Retrieve counts of additional cases where only location and confirmation date is available:

In[3]:=
locationcountDataset = ResourceData["Patient Medical Data for Novel Coronavirus COVID-19", "ReportedRecordCountByLocation"]
Out[4]=

Combine these two datasets into one:

In[5]:=
alldataset = Dataset[KeyUnion[
    Join[Normal[
      ResourceData[
       "Patient Medical Data for Novel Coronavirus COVID-19"]], Flatten@Normal[
       locationcountDataset[All, Table[Rest[#], #Counts] &]]]]];

Latest update date:

In[6]:=
ResourceData["Patient Medical Data for Novel Coronavirus COVID-19"][
  Select[DateObjectQ[#DateOfConfirmation] &]][Max, \
#DateOfConfirmation &]
Out[6]=

Compare the age distributions between male and female patients:

In[7]:=
PairedHistogram[Sequence @@ (Most@Normal@#[Values]), ChartLabels -> Most@Normal@#[Keys], Sequence[
   PlotLabel -> "age distribution", PlotTheme -> "Business"]] &@
 ResourceData["Patient Medical Data for Novel Coronavirus COVID-19"][
  GroupBy["Sex"], Select[NumberQ[#Age] &], "Age"]
Out[7]=

Plot the disease caused events including the onset of symptoms and the dates of confirmation or discharge for individual patients:

In[8]:=
timelines = ResourceData["Patient Medical Data for Novel Coronavirus COVID-19"][
   Select[(! MissingQ[#DateOfDeath] || ! MissingQ[#DateOfDischarge]) && ! MissingQ[#DateOfOnsetSymptoms] && ! MissingQ[#DateOfConfirmation] && ! MissingQ[#Age] &], {"DateOfOnsetSymptoms", "DateOfAdmissionHospital", "DateOfConfirmation", "DateOfDischarge", "DateOfDeath", "Age", "Sex"}];
In[9]:=
Grid[Partition[
  Labeled[TimelinePlot[Take[#, 5], Sequence[
      PlotRange -> {"Dec 20 2019", "Feb 21 2020"}, ImageSize -> 220]],
      StringTemplate["`Sex`, `Age` yrs old"][#], Bottom, LabelStyle -> Directive[FontFamily -> "Helvetica"]] & /@ Normal[Sort[timelines]][[;; 6]], 3], Alignment -> {{Left, Left}, {Bottom, Bottom}}]
Out[9]=

Explore links between the incidence of chronic diseases and deaths:

In[10]:=
diseases = ResourceData["Patient Medical Data for Novel Coronavirus COVID-19"][
  Select[! MissingQ[#ChronicDiseaseQ] && ! MissingQ[#DeathQ] &], {"ChronicDiseaseQ", "DeathQ", "ChronicDiseases"}]
Out[10]=

Find the top chronic conditions:

In[11]:=
Reverse@SortBy[
  Tally@DeleteMissing@Flatten@diseases[All, "ChronicDiseases"], Last]
Out[11]=

Find locations that infected individuals recently visited:

In[12]:=
travelPath = GeoGraphics[{Red, Thickness[.001], Arrowheads[0.015], ResourceData[
     "Patient Medical Data for Novel Coronavirus COVID-19"][
    Select[(FreeQ[#TravelHistoryLocation, _Missing] && ! MissingQ[#City]) &], Arrow@GeoPath@Append[#TravelHistoryLocation, #City] &]}, GeoRange -> "World"]
Out[12]=

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

Data Resource History

Source Metadata

See Also

Data Downloads

Publisher Information