Air Pollution

By way of summary, I have extracted the theory from the poster that I had to make so that it can be understood point by point and in the poster you can see more of the purpose of the project. In the poster I seek to represent the atmospheric pollution of my area.

MAIN PROBLEMS:

Before starting with the project I would like to tell you the series of problems I have had. Mainly, the term "mydata", since the base of the files were a GitHub of the professor (Dr. F Perez) which produced that my graphs were his data, by the fact that the term associated it to his database. So doing a "pivot wider" from my "cityall" and changing the columns to "PROSIXct" and "numeric" allowed me to redo all the graphs.
The positive point is that I had the knowledge and it allowed me to do it faster and at the same time knowing what I was doing.

OBJECTIVE

In this project the main objective is study the atmospheric pollution in the different catalan cities. By this way, try to create a poster alyzing air and weather pollution data from 1991 to 2021 hour by hour, day by day and obtain scientific conclusions with advanced statistics and graphs with Openair R and Rstudio. In my case, I have done it from Barcelona (Poblenou), my assigned city.

MATERIALS AND METHODS

R studio is an integrated development environment for R and Python, with a console, syntax-highlighting editor that supports direct code execution, and tools for plotting, history, debugging and workspace management (1). Openair is an R package developed for the purpose of analysing air quality data — or more generally atmospheric composition data (2). This is very useful to be able to analyze and order data, at the same time obtaining diagrams that will allow us to better understand the pollution situation in any part of the world (in my case, in my city).
To finish with the materials, it has also been necessary to use the "dades meteorologiques xema" database to be able to download the specific environmental data of my city (3).
We will use the weather data from the xema (which will need to be filtered relative to the city you want to study) in order to create our first CSV. These data, being out of order, will have to be ordered with a series of codes that are available in my Google Colab this creates the CSV called "City". What this first document collects is all the data of all the components and at all possible times. The next step is to create what we will call "City 2". That one, on the other hand, only has the data of a single chemical component with 3 variables as an example to observe and be able to analyze more easily. Once we have those two documents, we have to create another one. This will be composed of an element that we want, which is in our city (eg NO2) and thus generate a first graphic. Figure 1. that we will call "Time Variation". So then we create first of all another CSV document with the daily data of that component and then we order it in such a way that we only have the numerical value and the date (in PROSIXct). We then proceed to generate the first graph with a given line of code. In turn we have to transform this time variation into a document that we will call "daily" to create a calendar plot.
The next step we want to perform is to create a "cityall" where the data of all the components will be collected according to their code and in turn with the reading values next to it. For that, we need to generate a "wind" file (indicated in the code) and join it to the "city2 " document that we had at the beginning. This file (cityall) is very useful to us to be able to make a pollutionRose in such a way that it allows us to make an analysis of the wind directions and its main pollutants in such a way that it generates a graph with all the data that we have been collecting in the above documents.
Once the main graphs and diagrams are done, there is always the possibility of expanding. This can be in many ways:
  1. One of them has been making a table where the number of average exceedances of the component in that area is collected (screenshots). In this way, know how many times the contamination limit of a component is exceeded.
  2. The other way would be to create a graph which indicates how much this pollution exceedance is over the years indicated by a red line and in turn the average of this exceedance.

RESULTS AND DISCUSSIONS

- Principal components analyzed: [Figure 1]
The color diagram shows that the NO2 component is the most present in the pollution of Poble Nou. It exceeds the limit in certain years. PM10 incriced too.
-Study a dailyPlot: [Figure 2]
The diagram inticates that the most abundant component is PM10.
- The most abundant component over the years: [Figure 4]
Is the Nox (almost doubled in value).
- The evolution of nitrogen dioxide: [Figure 5]
It can be seen that over time it has been increasing over the years. It is observed that it increases during the winter months in 2009 and 2022.
- Frequency of air distribution: [Figure 6]
We can see that there are 4 graphs, corresponding to 4 main components in order to know where they come from. As we can see, the winds come from the west and east above all. PM10 and SO2 are those with the highest concentrations.

CONCLUSIONS

The highest values of pollutants in relation to the average of years is NOx, which does not exceed the WHO limits but does exceed the average of the other pollutants. [Figure 1]
The data collection shows that (making a "episode" of all components):
-NO2 is not exceeded at 99.98% (with 1 hour average values).
-O3 is not exceeded at 100% (with values averaged over 8 hours).
-NOx is not exceeded at 100% (with values averaged over 8 hours).
-SO2 is not exceeded by 100% (with values averaged over 1 hour).
-CO is not exceeded by 100% (with 1 hour average values)
-PM10 is not exceeded by 99.44% (with values averaged over 24 hours).
-PM2.5 is not exceeded by 82.74% (with 24-hour average values).
Regarding contamination over the time period (NO2), it increases during the end every year and the beggining of the following and with a timeVariation is the Nox the most relevant compound (especially during working days). [Figure 4-5]
This and much more from programming.

RESULTS

(1) R Studio: https://www.rstudio.com/products/rstudio/download/
(2) Library Openair: https://www.openairlib.net/
(3) Dades Meteorológiques XEMA:
https://analisi.transparenciacatalunya.cat/Medi-Ambient/Dades-meteorol-giques-de-la-XEMA/
(4) Google Colab (allcode):
https://colab.research.google.com/drive/1CO91fiUEVcZqOGW_g59pcRoVd6wjH6hO?usp=sharing
(5) A more extensive summary can be found on my website:
https://xgarrido1.neocities.org/cmc/index.html