Skip to content

🔬📈 Model for predicting positive cases of COVID19 desease for the next days.

Notifications You must be signed in to change notification settings

ksteflovic/NN_Covid-19_Predictions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEURAL NETWORK for COVID-19

Note: This repository is written in slovak language.

What is Covid-19?

Coronavirus disease (COVID-19) is an infectious disease caused by a newly discovered coronavirus. Most people who fall sick with COVID-19 will experience mild to moderate symptoms and recover without special treatment.

How does it spreads?

The virus that causes COVID-19 is mainly transmitted through droplets generated when an infected person coughs, sneezes, or exhales. These droplets are too heavy to hang in the air, and quickly fall on floors or surfaces.

You can be infected by breathing in the virus if you are within close proximity of someone who has COVID-19, or by touching a contaminated surface and then your eyes, nose or mouth.

The virus caused a big pandemia, which started in China, in whe end of the year 2019. In the beggining of 2020 COVID-19 started spreading the whole world rapidly fast. See the map below.

world

Image source.

How to protect yourself?

  • wash your hands often 👏🧼
  • maintain a safe distance from anyone who is coughing or sneezing 🤧
  • wear face mask in public 😷
  • stay home if you feel unwell 🤒

Health care

What happens when you get the coronavirus disease?

People with COVID-19 generally develop signs and symptoms, including mild respiratory symptoms and fever, on an average of 5-6 days after infection (mean incubation period 5-6 days, range 1-14 days). Most people infected with COVID-19 virus have mild disease and recover.

Recovery

Using available preliminary data, the median time from onset to clinical recovery for mild cases is approximately 2 weeks and is 3-6 weeks for patients with severe or critical disease.

But what happens, if a lot of people get sick?

curve If you look at the image above, you can see two curves. The tall, skinny curve is bad – it means that a lot of people will get sick at once, in a short period of time because we don’t take enough steps to prevent the virus from spreading from person to person.

Most people won’t get sick enough to need a hospital. But those who do could overwhelm the number of beds and care teams that our nation’s hospitals have available.

Another key factor to consider: the doctors, nurses, pharmacists, technicians and many other staff who actually work in healthcare. The more cases of COVID-19 there are at any given time, the more likely some of them are to catch it, whether in the community or at work. Once they’re sick, they need to stay away from patients for weeks. Which means fewer people to take care of the patients who need care.

What we should do?

spreading

Or...

Help flatten the Coronavirus curve by self-isolating!

Think twice, do you really need to go outside?

transmission

The points that I mentions before like washing your hands, covering your nose and mouth when you cough or sneeze and staying home if you’re not feeling well all help slow the spread of the new coronavirus (COVID-19).

Keep strong world! Stay safe.

Famous quotes „“


"And then I see the disinfectant where it knocks it out in a minute. One minute. And is there a way we can do something like that, by injection inside or almost a cleaning? So it'd be interesting to check that."

Donald J. Trump, 24.4.2020

Image source.


"So what? What do you want me to do? My name's Messiah but I can't work miracles."

Jair Messias Bolsonaro, 29.4.2020


Image source.


"Zítra jdou děti do školy. Bylo by dobré, aby se učitelé zeptali, nebo spolužáci, jestli někdo ze spolužáků nebyl, i když u dětí samozřejmě ten výskyt není, ale v každém případě aby se zeptali, jestli nebyli na prázdninách v těch oblastech, které jsou vlastně nakaženy, a samozřejmě ten virus se šíří z Itálie. V Itálii to nezvládli..."

Andrej Babiš, 1.3.2020

Image source.


"I shook hands with everybody."

Boris Johnson, 3.3.2020


Image source.


Interesting websites 🌐


About this repository

This work represents Jupyter python project to predict the spread of COVID19 per given country for the next days.

Folder structure

📁data
 └──📁models - contains .csv datasets
     ├──📁by-days - used for data visualization
     ├──📁c19-week-1 - not used
     ├──📁c19-week-4 - used for neural network
     ├──📁c19-week-5 - newest data, but not used
     └──📃README.md
📁docs
 ├──📁custom
 │   └──📃coronavirus_disease_presentation.pptx - main powerpoint presentaton
 └──📁images - contains images for README files
📁src
 ├──📁notebooks
 │   ├──📁neural_network
 │   │   ├──📃__init__.py
 │   │   └──📃notebook_covid-19.ipynb - Neural network for Covid-19 predictions
 │   └──📁visualization
 │       ├──📃__init__.py
 │       ├──📃data_curve_visualization.ipynb
 │       ├──📃data_visualization_europe.ipynb
 │       └──📃map_visualization.ipynb
 └──📁python
     └──📃country_utils.py
📃.gitignore - nothing important
📃README.md - file you are reading right now

Working with data

Neural Network dataset

Datasets used in this project:

https://www.kaggle.com/c/covid19-global-forecasting-week-4/data

This dataset contains three files:

I used sklearn for predicting a new cases.

from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures, StandardScaler

Here's a look for a graph, on which we can see prediction of four counries for the future days.

Slovakia Albania
India Hungary

We can see errors on India's graph. Line of onfirmed cases is growing very fast (exponentialy), predicte cases are growing linearly.

Visualization dataset

Only for days comparison:

https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_daily_reports

I used two files from this dataset:

Comparing new cases of COVID-19 in Europe for different months.

First day of April

April

First day of May

May

INTERACTIVE world map visualization

px.choropleth(df_map, 
              locations="iso_alpha", 
              color="ln(ConfirmedCases)", 
              hover_name="Country_Region", 
              hover_data=["ConfirmedCases"] ,
              animation_frame="Date",
              color_continuous_scale=px.colors.sequential.dense, 
              title='Celkové potvrdené prípady nákazy vo svete (podľa dní)')


world

About

🔬📈 Model for predicting positive cases of COVID19 desease for the next days.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published