This notebook takes the data from the ATCHU campaign and generates plots for use in the presentation of the results.
library(librarian)
shelf(openair,
reshape2,
ggplot2,
readr)
data.wide <- read_delim("~/data/ATCHU/ATCHU_dataset.csv",delim = ',',
col_types = cols(col_datetime(format = ""),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double(),
col_double()),progress = FALSE)
number of columns of result is not a multiple of vector length (arg 1)16635 parsing failures.
row # A tibble: 5 x 5 col row col expected actual file expected <int> <chr> <chr> <chr> <chr> actual 1 1 <NA> 16 columns 17 columns '~/data/ATCHU/ATCHU_dataset.csv' file 2 2 <NA> 16 columns 17 columns '~/data/ATCHU/ATCHU_dataset.csv' row 3 3 <NA> 16 columns 17 columns '~/data/ATCHU/ATCHU_dataset.csv' col 4 4 <NA> 16 columns 17 columns '~/data/ATCHU/ATCHU_dataset.csv' expected 5 5 <NA> 16 columns 17 columns '~/data/ATCHU/ATCHU_dataset.csv'
... ................. ... .................................................................... ........ .................................................................... ...... .................................................................... .... .................................................................... ... .................................................................... ... .................................................................... ........ ....................................................................
See problems(...) for more details.
attr(data.wide$date,"tzone") <- "NZST"
data.wide$NOxHS <- data.wide$NOHS + data.wide$NO2HS
data.wide$NOxMP <- data.wide$NOMP + data.wide$NO2MP
data.wide$BC.NOxHS <- data.wide$BCHS / data.wide$NOxHS
All pollution roses are normalised so that the fraction of measurements of certain level is shown.
pollutionRose(data.wide,
pollutant = 'BCHS',
ws='wsHS',
wd='wdHS',
normalise = TRUE,
cols = 'heat',
breaks = c(0,500,1500,3000),
statistic = 'prop.count')
Some values are below minimum break.
pollutionRose(data.wide,
pollutant = 'NOHS',
ws='wsHS',
wd='wdHS',
normalise = TRUE,
cols = 'heat',
breaks = c(0,2,4,6),
statistic = 'prop.count')
pollutionRose(data.wide,
pollutant = 'BCUoA',
ws='wsHS',
wd='wdHS',
normalise = TRUE,
cols = 'heat',
breaks = c(0,500,1500,3000),
statistic = 'prop.count')
pollutionRose(data.wide,
pollutant = 'NOMP',
ws='wsMP',
wd='wdMP',
normalise = TRUE,
cols = 'heat',
breaks = c(0,2,4,6),
statistic = 'prop.count')
Some values are below minimum break.