Patient Medical Data for Novel Coronavirus COVID-19

Source Notebook

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

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

The primary content includes medical records with patient characteristics information, but excluding the records in which only location information is available.

Records that contain only location information are accessible in the sub-element set ResourceData["Patient Medical Data for Novel Coronavirus COVID-19", "ReportedRecordCountByLocation"].

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", All]["ReportedRecordCountByLocation"]
Out[3]=

Combine these two datasets into one:

In[4]:=
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[5]:=
ResourceData["Patient Medical Data for Novel Coronavirus COVID-19"][
  Select[DateObjectQ[#DateOfConfirmation] &]][Max, \
#DateOfConfirmation &]
Out[5]=

Compare the age distributions between male and female patients:

In[6]:=
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[6]=

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

In[7]:=
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[8]:=
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[8]=

Explore links between the incidence of chronic diseases and deaths:

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

Find the top chronic conditions:

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

Find locations that infected individuals recently visited:

In[11]:=
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[11]=

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

Publisher Information