Nitrogen oxide pollution episodes in winter

Levels of nitrogen oxides (NOx) vary widely across the different seasons and are highest in the winter months. Episodes of high NOx concentrations may arise during the winter when the ground is cold and winds are light, causing emissions to be trapped near the ground. This effect is shown by a 3D scatter plot:

In early-mid December 2013, many sites in London recorded some of their highest values of recent years. Time series plots of concentrations alongside wind speed and temperature also clearly shows how poor dispersion conditions can underlie high NOx pollution events in winter:

Analysis in Python

As previously described, the csv files contain strings for missing values which need to be replaced and the datatypes changed to numeric. In order to plot the time series graph, datatypes need to be changed to datetime values, by using pandas to_datetime method. This requires changing the values of 24:00 to 00:00, by using the replace method.

Looking at the rows for the midnight time points, it can be noticed that the date for this hour reads one day behind. This is a problem when plotting time series and requires changing. This is done using the timedelta method.

This date change can be applied specifically to the midnight time points by creating a subset of the data and then recombining it using the concat method. Applying the interpolation function fills in NaN entries using the linear interpolation method, which connects a straight line across the missing data points. The default method is linear but other methods can be specified.

In this example, the time series data containing the pandas datetime format is plotted using the Bokeh library:

Leave a Reply