Giter Club home page Giter Club logo

covid-19_italy's Introduction

covid-19_italy

Analisi dati del COVID 19 in Italia

Utilizzo i dati forniti dalla protezione civile: https://github.com/pcm-dpc/COVID-19

Il file covid19_italy.py è il programma che genera otto immagini grafici: "data"_1.png e "data"_2.png, "data"_dead_1.png e "data"_dead_2.png, nuovi_infetti.png, nuovi_deceduti.png, growth_fanctor.png e growth_fanctor_dead.png.

La prima e la terza immagine, mostrano (rispettivamente per i contagiati ed i deceduti) il fit dei dati fino al giorno specificato. La seconda e la quarta, mostrano (rispettivamente per i contagiati ed i deceduti) lo stesso grafico ma sul lungo periodo. La quinta mostra i nuovi infetti al giorno, definita come la differenza tra gli infetti totali al giorno X meno gli infetti totali al giorno X-1. La sesta mostra i nuovi deceduti al giorno, definita come la differenza tra i deceduti totali al giorno X meno i deceduti totali al giorno X-1. La settima mostra il fattore di crescita, definito come il rapporto tra gli infetti al giorno X e gli infetti al giorno X-1. L0ottava mostra il fattore di crescita, definito come il rapporto tra i deceduti al giorno X e i deceduti al giorno X-1.

In più è presente una mappa per ogni regione raffigurante i casi totali in ogni provincia.

I fit sono stati eseguiti considerando diverse tipologie di funzioni: Sigmoide, Gompertz, Richards e S.I.R. Modificata. L'ultima è una modifica del modello S.I.R. in cui è stata aggiunta l'azione di lockdown, per maggiori chiarimenti vedere l'articolo originale: https://www.sciencedirect.com/science/article/pii/S0960077920301636

covid-19_italy's People

Contributors

albertomercurio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

covid-19_italy's Issues

Keep getting this error

Hello. GREAT JOB first of all.
I installed all the needed packages, but I still get this error and I can't figure out why. Could you please give me some advice? I run Python3 on MacOS Catalina. It calculates correctly all the variables of the equations, but then it looks like it has a problem saving the image file.

Traceback (most recent call last):
File "/Users/PFB/Downloads/covid-19_italy-master/covid19_italy.py", line 303, in
plt.savefig('img_italia/'+str(date)+"_1.png",dpi=200,bbox_inches='tight')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/pyplot.py", line 723, in savefig
res = fig.savefig(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/figure.py", line 2203, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 2098, in print_figure
result = print_method(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 535, in print_png
with cbook.open_file_cm(filename_or_obj, "wb") as fh:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in enter
return next(self.gen)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/cbook/init.py", line 418, in open_file_cm
fh, opened = to_filehandle(path_or_file, mode, True, encoding)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/cbook/init.py", line 403, in to_filehandle
fh = open(fname, flag, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'img_italia/2020-03-28_1.png'

What is the correct way to run this?

Mysterious

$ python.exe covid19_italy.py
Traceback (most recent call last):
  File "covid19_italy.py", line 8, in <module>
    import geopandas as gpd
  File "C:\Python37\lib\site-packages\geopandas\__init__.py", line 5, in <module>
    from geopandas.io.file import read_file  # noqa
  File "C:\Python37\lib\site-packages\geopandas\io\file.py", line 6, in <module>
    import fiona
  File "C:\Python37\lib\site-packages\fiona\__init__.py", line 87, in <module>
    from fiona.collection import BytesCollection, Collection
  File "C:\Python37\lib\site-packages\fiona\collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified procedure could not be found.

Possible error in SIR Model

Buongiorno Alberto,
sto effettuando alcuni studi sui modelli matematici che simulano l'evoluzione del covid.
Nel tuo codice, mi trovo che nel calcolo del fit del modello SIR, vengono passati i dati della colonna
"totale casi", invece dovrebbero essere passati quelli della colonna "totale positivi".
Ovvero:
Popolazione = S+I+R
In questo caso stiamo trascurando i recovered, che dovrebbero essere pari ai guariti + i decessi.
Pertanto le equazioni differenziali non vengono rispettate.
Ti torna?
Grazie dell'attenzione

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.