Message Boards Message Boards

[CALL] Making COVID-19 Data Computable

Posted 4 years ago
POSTED BY: Alan Joyce
9 Replies

Please check out my post where I processed Facebook population density map and make them computable datasets in Wolfram Language. It can be very useful for epidemic models using population densities.

POSTED BY: Mads Bahrami

I've wrangled the US county data of Cases and Deaths from JHU dataset.

CloudGet[CloudObject[
  "https://www.wolframcloud.com/obj/47230f9f-9bc0-4682-9aff-bdde93e98544"]]

The dataset has this structure: enter image description here

Example:

CloudGet[CloudObject[
    "https://www.wolframcloud.com/obj/47230f9f-9bc0-4682-9aff-bdde93e98544"]][
  SelectFirst[#USCounty == 
     Entity["AdministrativeDivision", {"LosAngelesCounty", 
       "California", "UnitedStates"}] &]][
 DateListPlot[
   Through[{Differences, 
      MovingAverage[Differences[#], Quantity[1, "Weeks"]] &}[#Cases]],
    PlotRange -> All, 
   PlotLegends -> {"Daily new cases", "Filtered over 1 week"}] &]

enter image description here

POSTED BY: Mads Bahrami
Posted 4 years ago

This note gave me a warm fuzzy for sure! I don't have an immediate need, but it speaks to practical purposes for useful ends. Thank you! Brian W

POSTED BY: Brian Whatcott
Posted 4 years ago
Posted 4 years ago

I have tracked accumulated Case and Death data for Oklahoma from Worldometers.info.

Because these data are somewhat noisy, I used an exponential low pass on the input with time constant ~ 3 days and fit the series to a sigmoid function of this kind: cases = k / (1 + exp( A - b*days)) like this: OK Sum of Reported CV-19 Cases

I continue by presenting the logistic function (with best-fit parameters) to Wolfram Alpha to plot the differential : which is cases per day like this: Oklahoma  CV-19 Cases per Day

In the same way I fit deaths to a logistic like this: Ok UNSMOOTHED CV-19 Deaths

and the resulting Alpha plot of death rate like this:  OK CV-19 Death Rate

Here is a plot of residual errors in the case fitting function: enter image description here I noticed a growing 7 day oscillation in reported cases. This may be a clerical artifact - or some intyernal dynamic.

DISCUSSION.
The logistic function is just two model steps away from the initial exponential function, and for later days the intermediate Straight Line fit. It provides high R^2 values for the largely pre-peak data. The logistic function has a short-coming to balance its simplicity: it uses the same exponential parameters before AND after the peak. This may become less realistic if the post-peak data decays on a LONGER time constant as it may well do. I hope that this approach may dissuade modelers starting from case/day data which is inevitably more noisy than the sigmoid case progression. It is perfectly possible to require the non-linear regression application to refit the exponential rate after an established peak rate day, but I do not yet have sufficient data to make this practical.

POSTED BY: Brian Whatcott
POSTED BY: Alan Joyce
Posted 4 years ago

POSTED BY: Robert Rimmer

For United States data two nice sources are https://covidtracking.com/ and the NY Times git hub repo here: https://github.com/nytimes/covid-19-data. With some help I created resource functions for importing the latest data from each of them. They were both published in the Wolfram Function Repository today.

https://resources.wolframcloud.com/FunctionRepository/resources/COVIDTrackingData https://resources.wolframcloud.com/FunctionRepository/resources/NYTimesCOVID19Data

See the documentation pages above for examples on how to use them.

Unlike data repository entries where data is periodically updated but always good, these function repository entries are dependent on evolving third party services, so they could break. But they always grab the latest data from those services.

POSTED BY: Bob Sandheinrich
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract