McMasterAI / CoviDash

1 stars 2 forks source link

Create rolling average of cases #35

Closed cczarnuch closed 4 years ago

cczarnuch commented 4 years ago

Inputs: dictionary created from process_csv() function in app.py. (You will need to put the csv file in the folder manually) link Outputs: 7-day moving average of cases on per-day basis. Stored in the same format as the input dict.

For now just create the function, once we get the heatmap data linked with the raw case data we can add the data generated by this function(s) to the heatmap or other visualizations.

jaymody commented 4 years ago

@cczarnuch Finished the rolling mean code. Where do you want me to commit the code (ie in a separate file or in one of predictions.py or preprocess.py). I have code for the function, reproducing the below plot, and a unit test for the rolling ave function (I can put all those into a single file or we can separate it out into a tests folder, depends on what you want to do). Here's an example of the results using a 7 day window on the covid csv data:

Screen Shot 2020-08-20 at 7 40 04 PM