# Explanation of Air Quality Data Using Takagi-Sugeno Fuzzy Inference System
## 2 Description of Used Data  
Several studies present the use of commercially available sensor networks (see [18; 19; 20]), which are commonly limited in terms of the quality of data collection. This insufficiency leads to the importance of the use of certified data and reputable data sources. Since, for the purposes of this work, we wanted to use official data, we focused on local traffic and weather conditions in the city of Prague. We used official data from certified sensors deployed by the Czech Hydrometeorological Institute (see [21]). We chose the locality Vrsovicka street, which has unique characteristics: it is a two-lane (per direction) road running from west to east and has one of the most significant traffic flows in the city centre area of Prague, with a speed limit of 50 km/h, and this road leads to the city centre, necessitating coordinated traffic flow management.  
We used three types of data--weather, traffic and emission data. Weather conditions can have significant effect on the values of emissions; for example, a strong wind could cause an area with strong polluting elements (factories, construction of buildings, power plants, etc.) to have a similar amount of emissions as windless quiet city streets. Another important factor is the wind direction. Temperature and the amount of rainfall are also important. In the case of long-term drought, the occurrence of emissions is much higher compared with the rainy seasons of the year. Therefore, variables used to model weather in our data were _Wind direction_, _Direction of maximum wind gust_, _Average wind speed_, _Speed of maximum wind gust_, _Total rainfall_ and _Air temperature_.  
It is well known that transportation is related to the local production of various kinds of emissions. Transportation includes not only the movement of people but also the transport of goods. Additionally, transportation encompasses commuting, as well as travel for holidays, which must also be accounted for. As traffic data, we used the variables _Intensity of vehicles_ and _Average speed of vehicles_. These variables were measured in both directions of traffic. Based on experience with traffic in large cities, where the number of cars in the city also depends on the day and hour under consideration, we decided to include the following two input variables: _Day of the week_ and _Hour of the day_.  
Emission data were used as the output variable. In this article, we demonstrate just the results for \(PM_{10}\) values. As mentioned before, for \(PM_{10}\), the limit value of 50 \(\mathrm{\SIUnitSymbolMicro g}/\mathrm{m}^{3}\) per day cannot be exceeded more than 35 times per calendar year. For our location, this variable reached values in the interval \([0,108]\). Let us also state that from the 3845 measurements that we had, there were just 2 values greater than 100 \(\mathrm{\SIUnitSymbolMicro g}/\mathrm{m}^{3}\), only 26 reached a value greater than 60 \(\mathrm{\SIUnitSymbolMicro g}/\mathrm{m}^{3}\) and, similarly, there were just 75 values greater than 50 \(\mathrm{\SIUnitSymbolMicro g}/\mathrm{m}^{3}\). Since this concerns the pollution of the urban area, the presence of a low number of high \(PM_{10}\) values is positive, but when processing and analysing data with all permissible values, this is a rather large deficiency.  
All variables were measured at hourly intervals. In the beginning, we had a matrix of the \(3845\times 11\) type, specifically 3845 data measurements with 11 variables. The order and units of the used variables are given in Table 1. After a short analysis of the data, we found out that there are some measurements with incorrect values of variables--specifically, the values were equal to \(-5009\). This value was set in the sensors to indicate a measurement error. We removed the rows of the matrix that contained these values; further, we worked with a data matrix of the \(3826\times 11\) type. These data were analysed with MATLAB software, version R2018a, in the graphical user interface Fuzzy Logic Toolbox (see [22]).