"An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem."
-John Tukey
Integral Analysis: COVID
For this short analysis and repetitive tasks to be done such as downloading daily information and generating daily graphs, then fiit the model and generate useful statistical information that describes the model and the goodness of fitting. All these action could be simple autoatized by building a Python script.
​
For this purpose, I built a code that actually download up-to-date information* from around the world containing the following information:
​
Daily New Cases
​
Total Cases
​
Daily Deaths
​
Total Deaths
​
Downloading this data will allow us to make two type of fitting already explained in the past sections: the Sigmoidal Analysis for the accumulated cases/deaths and the Normal Distribution Analysis for the daily cases/deaths.
​
The final script is available to download at the end of the page, the code is ready to run. The only detail is the previous analysis that has to be done in order to download the data when the first confirmed cases is shown, if this step is not done the model could present fitting problems and the coefficients would not represent the actual phenomena.
The n shown is the value that can be modify on order to change the lenght of the data used for the model fitting. There is an option to save the figures done by the script.
![N.PNG](https://static.wixstatic.com/media/905dab_1cc6ee43995644cb930df185da796ee0~mv2.png/v1/fill/w_512,h_66,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/N_PNG.png)
![SpainEX.PNG](https://static.wixstatic.com/media/905dab_c67c3a33b6744960a7b9149db20c9b2c~mv2.png/v1/crop/x_1,y_256,w_395,h_301/fill/w_373,h_284,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpainEX_PNG.png)
The following images show an example of curve fitted to the daily confirmed cases in Spain (Update 3/5/2020).
The parameters are shown in the table beloww the graph, also values like: Kurtosis, Asymmetry and R^2 are shown.
![SpainPython.PNG](https://static.wixstatic.com/media/905dab_8ffbce3f3123426caa9afad8bad4f3a8~mv2.png/v1/fill/w_414,h_146,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpainPython_PNG.png)
![DeathsSpain.PNG](https://static.wixstatic.com/media/905dab_d0630d7530024ff399420f099dc13e82~mv2.png/v1/crop/x_7,y_179,w_392,h_290/fill/w_384,h_284,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/DeathsSpain_PNG.png)
Here is the example of the total death behavior in Spain, along with the simulation draw un blue.
Here is the table formulated by the model, for this model the parameters and R^2 are calculated.
![DeathsSpain.PNG](https://static.wixstatic.com/media/905dab_d0630d7530024ff399420f099dc13e82~mv2.png/v1/crop/x_0,y_0,w_456,h_143/fill/w_459,h_144,al_c,lg_1,q_85,enc_avif,quality_auto/DeathsSpain_PNG.png)
Downloadable Content
Enjoy the script, if you have any suggestions or detect any sort of problem, please SHARE!