Environmental-Data-Analysis
Analyzing the effect of Environmental Factors on Air quality of Shanghai-China for the last 10 Years
The goal was to analyse the effect of environmental factors like Temperature, Wind Direction, Wind Speed, Humidity and Pressure on Air Quality which is compromised by pollutants namely PM2.5, PM10, SO2,NO2 & CO
Data Extraction
The data for environmental conditions was feasibly extracted using Meteostat which is one of the largest vendors of open weather and climate data. The Meteostat Python library (https://github.com/meteostat/meteostat-python) provides simple access to open weather and climate data using Pandas The latitude and longitude values for Shanghai have been used to fetch Hourly data for the past 10 years, since daily or monthly APIs donot provide us with all the environmental data we need.
The data for air quality was not available through meteostat library. The monthly data for air quality was acquired from China’s air quality on-line monitoring and analysis platform https://www.aqistudy.cn/historydata/ and saved into an excel file. The data required a lot of preprocessing and imputation before it could be used for analysis all of which is done using python jupyter notebook environment and contained in notebook file data-extraction&cleaning.ipynb. The time series analysis has been done on data aggregated on monthly level and contained in file time_series_analysis.ipynb
Data Description:
Description of numerical variables are summarized in the table below:
Time Series Analysis
The overall Air Quality of Shanghai has improved since the last 10 years with a noticeable decline in the value of Air quality index (AQI)
All of the pollutants show a downward trend from 2014 till 2024 with a clear seasonal pattern of maximum concentration at the start of every year which decreases during the mid of every year. Similarly, the level of ozone declines during the period when the pollutants levels are high in the atmosphere. The pollutant levels are low when temperature is high and pressure is low
Correlation of Environmental factors with Air Quality
*Pollutants are highly correlated with temperature and pressure as compared to other environmental factors
*Temperature has a negative relation to all pollutants and pressure is positively correlated
*AQI (Air Quality Index) has the highest correlation with PM2.5, PM 10,CO, SO2 and then NO2