Published in

Analytics Vidhya

# Understanding the impact of Weather conditions on corona virus spread using Data Science

World Health Organization(WHO) labelled Corona Virus as pandemic. 2,67,013 people from 185 countries tested positive for corona virus.

Data Scientists from all over the world explaining spread of corona virus with various techniques. In this article we will explore the impact of weather conditions on spread of corona virus.

Here are some insights from data of corona virus available in kaggle.

Let’s make some interesting plots from data.

Day wise distribution of cases received is

Day wise distribution of deaths observed is

Country-wise and state-wise lists of confirmed cases are

(very seriously effected counties and states are only plotted)

Weather condition of a city is explained from its temperature, pressure and humidity. In python, weather conditions of any city can be obtained using pyowm package.You just need an api key to avail amazing functions of pyowm. You can read official documentation here.

The code i used to extract weather conditions of city is

I have made a data frame from observations to visualise impact. The correlation of temperature , pressure and humidity with cases is :

Before concluding about correlation, Let’s make some more plots

Since these observations are from different countries , it is too fast to make conclusion. Let’s extend this analysis to observations from single country for better understanding.

India recently crossed starting stage of this pandemic. So let’s take data from India and repeat above analysis.

Data Frame made after pre-processing for analysis is

State-wise chart of active cases is

Data frame made with weather retrieved using pyowm package is

Visualisation of above data frame is

The heat map of correlation matrix is

From heat map, it is clear that temperature , pressure and humidity are not strongly correlated to active cases.

Though temperature is having small role in spread of virus , we can conclude that contact with effected people plays key role in spreading irrespective of weather conditions .

## Future Work

We can make more meaningful observations from day wise collected weather data of particular city. We can make use of this weather data as input to model to predict cases on next day.

# Conclusion

We have made exploratory data analysis on these datasets. We have seen the impact of weather conditions on spread of corona virus. Finally I have stated the idea of my next post.The code and data used to make plots and conclusion can be accessed here .

--

--

## More from Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

## Sai Durga Mahesh

Using Data Science to provide better solutions to real word problems