## Loading required package: openair
## Loading required package: lazyeval
## Loading required package: dplyr
## 
## Attaching package: 'dplyr'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## 
## Loading required package: maps
## Loading required package: reshape2

Introduction

The purpose of this analysis is to document the performance of the ODIN during their pre-CONA deployment in Christchurch.

ODIN data

The units ODIN_02-07 were deployed at Rangiora. The following summaries are intended to describe the performance of the units.

ODIN 02

odin_02 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_02.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_02$date=as.POSIXct(paste(odin_02$Date,odin_02$Time),tz='GMT')
odin_02$Time<-NULL
odin_02$Date<-NULL
odin_02$Battery<-5*odin_02$Battery/1024

The summary table of this unit is:

summary(odin_02)
##       Dust          Humidity      Temperature      Battery      
##  Min.   :53.00   Min.   :41.40   Min.   :23.2   Min.   :0.3418  
##  1st Qu.:63.00   1st Qu.:41.75   1st Qu.:23.2   1st Qu.:0.3662  
##  Median :73.00   Median :42.10   Median :23.2   Median :0.3906  
##  Mean   :69.67   Mean   :41.97   Mean   :23.2   Mean   :0.4427  
##  3rd Qu.:78.00   3rd Qu.:42.25   3rd Qu.:23.2   3rd Qu.:0.4932  
##  Max.   :83.00   Max.   :42.40   Max.   :23.2   Max.   :0.5957  
##       date                    
##  Min.   :2015-08-04 09:22:19  
##  1st Qu.:2015-08-04 09:22:32  
##  Median :2015-08-04 09:22:46  
##  Mean   :2015-08-05 10:18:28  
##  3rd Qu.:2015-08-05 22:46:32  
##  Max.   :2015-08-07 12:10:19

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_02,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_02,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_02$Temperature,odin_02$Dust)

ODIN_03

odin_03 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_03.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_03$date=as.POSIXct(paste(odin_03$Date,odin_03$Time),tz='GMT')
odin_03$Time<-NULL
odin_03$Date<-NULL
odin_03$Battery<-5*odin_03$Battery/1024

The summary table of this unit is:

summary(odin_03)
##       Dust           Humidity        Battery           Temperature   
##  Min.   : 341.0   Min.   :27.40   Min.   :-0.009277   Min.   :106.0  
##  1st Qu.: 375.0   1st Qu.:50.70   1st Qu.: 0.009277   1st Qu.:158.0  
##  Median : 395.0   Median :59.80   Median : 0.021973   Median :168.0  
##  Mean   : 403.1   Mean   :60.21   Mean   : 0.034420   Mean   :163.6  
##  3rd Qu.: 419.0   3rd Qu.:68.10   3rd Qu.: 0.052246   3rd Qu.:172.0  
##  Max.   :1230.0   Max.   :87.60   Max.   : 0.139648   Max.   :198.0  
##       date                    
##  Min.   :2015-08-04 09:12:00  
##  1st Qu.:2015-08-06 03:40:15  
##  Median :2015-08-07 22:09:30  
##  Mean   :2015-08-07 22:09:30  
##  3rd Qu.:2015-08-09 16:38:45  
##  Max.   :2015-08-11 11:08:00

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_03,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_03,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_03$Temperature,odin_03$Dust)

ODIN_04

odin_04 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_04.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_04$date=as.POSIXct(paste(odin_04$Date,odin_04$Time),tz='GMT')
odin_04$Time<-NULL
odin_04$Date<-NULL
odin_04$Battery<-5*odin_04$Battery/1024

The summary table of this unit is:

summary(odin_04)
##       Dust             Humidity      Temperature        Battery      
##  Min.   :0.000000   Min.   :31.60   Min.   :-2.400   Min.   :0.6592  
##  1st Qu.:0.000000   1st Qu.:54.30   1st Qu.: 1.700   1st Qu.:0.8154  
##  Median :0.000000   Median :61.00   Median : 4.100   Median :0.8691  
##  Mean   :0.000392   Mean   :60.64   Mean   : 6.269   Mean   :0.8449  
##  3rd Qu.:0.000000   3rd Qu.:68.00   3rd Qu.: 9.000   3rd Qu.:0.8936  
##  Max.   :4.000000   Max.   :81.50   Max.   :27.000   Max.   :0.9619  
##       date                    
##  Min.   :2015-08-04 08:57:00  
##  1st Qu.:2015-08-06 03:28:15  
##  Median :2015-08-07 21:58:30  
##  Mean   :2015-08-07 21:58:56  
##  3rd Qu.:2015-08-09 16:29:45  
##  Max.   :2015-08-11 11:00:23

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_04,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_04,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_04$Temperature,odin_04$Dust)

ODIN_05

odin_05 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_05.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_05$date=as.POSIXct(paste(odin_05$Date,odin_05$Time),tz='GMT')
odin_05$Time<-NULL
odin_05$Date<-NULL
odin_05$Battery<-5*odin_05$Battery/1024

The summary table of this unit is:

summary(odin_05)
##       Dust           Humidity      Temperature        Battery      
##  Min.   : 14.00   Min.   :26.90   Min.   :-2.500   Min.   :0.5469  
##  1st Qu.: 43.00   1st Qu.:51.30   1st Qu.: 1.700   1st Qu.:0.7764  
##  Median : 48.00   Median :56.90   Median : 4.100   Median :0.8105  
##  Mean   : 47.33   Mean   :55.55   Mean   : 6.327   Mean   :0.7924  
##  3rd Qu.: 48.00   3rd Qu.:62.10   3rd Qu.: 9.200   3rd Qu.:0.8252  
##  Max.   :141.00   Max.   :73.80   Max.   :27.700   Max.   :1.3281  
##       date                    
##  Min.   :2000-01-01 00:00:03  
##  1st Qu.:2000-01-02 18:33:15  
##  Median :2000-01-04 13:07:30  
##  Mean   :2000-01-08 10:39:42  
##  3rd Qu.:2000-01-06 07:40:45  
##  Max.   :2015-08-04 08:39:00

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_05,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_05,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_05$Temperature,odin_05$Dust)

ODIN_06

odin_06 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_06.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_06$date=as.POSIXct(paste(odin_06$Date,odin_06$Time),tz='GMT')
odin_06$Time<-NULL
odin_06$Date<-NULL
odin_06$Battery<-5*odin_06$Battery/1024

The summary table of this unit is:

summary(odin_06)
##       Dust           Humidity      Temperature        Battery       
##  Min.   : 14.00   Min.   :29.30   Min.   :-2.100   Min.   :0.03906  
##  1st Qu.: 53.00   1st Qu.:53.40   1st Qu.: 1.800   1st Qu.:0.42969  
##  Median : 53.00   Median :60.40   Median : 4.300   Median :0.54688  
##  Mean   : 54.94   Mean   :59.94   Mean   : 6.368   Mean   :0.51142  
##  3rd Qu.: 58.00   3rd Qu.:67.00   3rd Qu.: 9.200   3rd Qu.:0.62500  
##  Max.   :122.00   Max.   :83.80   Max.   :26.800   Max.   :0.96191  
##       date                    
##  Min.   :2015-08-04 08:30:58  
##  1st Qu.:2015-08-06 03:01:30  
##  Median :2015-08-07 21:33:00  
##  Mean   :2015-08-07 21:33:26  
##  3rd Qu.:2015-08-09 16:05:30  
##  Max.   :2015-08-11 10:38:00

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_06,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_06,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_06$Temperature,odin_06$Dust)

ODIN_07

odin_07 <- read.table("/home/gustavo/data/CONA/ODIN/pre_test/odin_07.data",
                      header=T, quote="")
#force GMT as the time zone to avoid openair issues with daylight saving switches
#The actual time zone is 'NZST'
odin_07$date=as.POSIXct(paste(odin_07$Date,odin_07$Time),tz='GMT')
odin_07$Time<-NULL
odin_07$Date<-NULL
odin_07$Battery<-5*odin_07$Battery/1024

The summary table of this unit is:

summary(odin_07)
##       Dust           Humidity      Temperature        Battery      
##  Min.   : 29.00   Min.   :28.80   Min.   :-2.300   Min.   :0.3271  
##  1st Qu.: 53.00   1st Qu.:46.90   1st Qu.: 1.800   1st Qu.:0.6641  
##  Median : 58.00   Median :52.10   Median : 4.300   Median :0.7617  
##  Mean   : 57.57   Mean   :51.71   Mean   : 6.475   Mean   :0.7228  
##  3rd Qu.: 63.00   3rd Qu.:57.90   3rd Qu.: 9.300   3rd Qu.:0.8203  
##  Max.   :156.00   Max.   :69.60   Max.   :28.000   Max.   :1.0352  
##       date                    
##  Min.   :2015-08-04 08:29:47  
##  1st Qu.:2015-08-06 03:00:30  
##  Median :2015-08-07 21:32:00  
##  Mean   :2015-08-07 21:31:59  
##  3rd Qu.:2015-08-09 16:03:30  
##  Max.   :2015-08-11 10:33:31

A graphic summary for this unit is:

did.it.work<- try(timePlot(odin_07,pollutant = c('Dust','Humidity','Temperature'), avg.time = '1 hour'))

did.it.work<- try(timeVariation(odin_07,pollutant = c('Dust','Humidity','Temperature')))

plot(odin_07$Temperature,odin_07$Dust)

ECan data

The data from the Rangiora site was obtained from Environment Canterbury’s data catalogue and then corrected for proper date handling.

download.file(url = "http://data.ecan.govt.nz/data/29/Air/Air%20quality%20data%20for%20a%20monitored%20site%20(Hourly)/CSV?SiteId=5&StartDate=04%2F08%2F2015&EndDate=07%2F08%2F2015",destfile = "ecan_data.csv",method = "curl")
system("sed -i 's/a.m./AM/g' ecan_data.csv")
system("sed -i 's/p.m./PM/g' ecan_data.csv")
ecan_data_raw <- read.csv("ecan_data.csv",stringsAsFactors=FALSE)
ecan_data_raw$date<-as.POSIXct(ecan_data_raw$DateTime,format = "%d/%m/%Y %I:%M:%S %p",tz='GMT')
ecan_data<-as.data.frame(ecan_data_raw[,c('date','PM10.FDMS','Temperature..2m')])
names(ecan_data)<-c('date','PM10.FDMS','Temperature..1m')

Summary of ECan data:

summary(ecan_data)
##       date                       PM10.FDMS       Temperature..1m 
##  Min.   :2015-08-04 00:00:00   Min.   :  2.285   Min.   :-2.642  
##  1st Qu.:2015-08-04 18:00:00   1st Qu.: 11.960   1st Qu.: 1.417  
##  Median :2015-08-05 12:00:00   Median : 21.233   Median : 7.328  
##  Mean   :2015-08-05 12:00:00   Mean   : 28.843   Mean   : 7.559  
##  3rd Qu.:2015-08-06 06:00:00   3rd Qu.: 31.849   3rd Qu.:13.398  
##  Max.   :2015-08-07 00:00:00   Max.   :135.460   Max.   :20.903
timePlot(ecan_data,pollutant = c('PM10.FDMS','Temperature..1m'),avg.time = '1 hour')

timeVariation(ecan_data,pollutant = c('PM10.FDMS','Temperature..1m'))