# basic use
timeVariation(mydata, pollutant = "nox")
# for a subset of conditions
timeVariation(subset(mydata, ws > 3 & wd > 100 & wd < 270),
pollutant = "pm10", ylab = "pm10 (ug/m3)")
# multiple pollutants with concentrations normalised
timeVariation(mydata, pollutant = c("nox", "co"), normalise = TRUE)
# show BST/GMT variation (see ?cutData for more details)
# the NOx plot shows the profiles are very similar when expressed in
# local time, showing that the profile is dominated by a local source
# that varies by local time and not by GMT i.e. road vehicle emissions
timeVariation(mydata, pollutant = "nox", type = "gmtbst")
# By contrast, a variable such as wind speed shows a clear shift when
# expressed in local time. These two plots can help show whether the
# variation is dominated by man-made influences or natural processes
timeVariation(mydata, pollutant = "ws", type = "gmtbst")
## sub plots can be extracted, in which case set key = TRUE
## plots are retruned in a list e.g. to get the diurnal plot of NO2:
results <- timeVariation(mydata, pollutant = "no2", key = TRUE)
results[[6]] ## plots diurnal plot on its own
## results[[5]] is the weekday and hour plot
## results[[7]] is the weekday plot
## results[[8]] is the monthly plot
## numerical results (mean, lower/upper uncertainties)
## results[[1]] are the weekday and hour results
## results[[2]] are the diurnal results
## results[[3]] are the weekday results
## results[[4]] are the monthly results
Run the code above in your browser using DataLab