spatial domain
coords <- read.csv("~/drone/data/drone_data_lagBaomer_points.csv", header = TRUE) %>% data.table()
colnames(coords) <- c("id","height","lat","lon","time","session")
coords$time <- hm(coords$time)
## Warning in .parse_hms(..., order = "HM", quiet = quiet): Some strings failed to
## parse, or all strings are NAs
m <- leaflet() %>% addTiles()
m %>% addCircleMarkers(
lng = coords$lon, lat = coords$lat,
stroke = FALSE,
fillOpacity = 0.5) %>%
addProviderTiles(providers$Esri.WorldImagery)
POM
all sessions
pom1 <- read.csv("~/drone/data/pom_lagBaomer_2022-05-19_04-08-10.csv", header = TRUE)%>% data.table()
pom2 <- read.csv("~/drone/data/pom_lagBaomer2_2022-05-19_05-02-55.csv", header = TRUE) %>% data.table()
pom3 <- read.csv("~/drone/data/pom_lagBaomer3_2022-05-19_05-32-09.csv", header = TRUE) %>% data.table()
pom <- rbind(pom1,pom2,pom3)
pom$db <- c(rep(1,nrow(pom1)),rep(2,nrow(pom2)),rep(3,nrow(pom3)))
pom$pom_longitude <- pom$pom_longitude/100
pom$pom_latitude <- pom$pom_latitude/100
pom$date_time <- ymd_hms(pom$date_time)
pom[pom$pom_ozone>100,"pom_ozone"] <- 12.0
plot_ly(data = pom, x= ~pom_latitude, y= ~pom_longitude, z= ~pom_altitude, color = ~pom_ozone,
mode="markers", type='scatter3d')
session 1
print(range(pom[["date_time"]][pom$db==1]))
## [1] "2022-05-19 04:08:30 UTC" "2022-05-19 05:02:43 UTC"
plot_ly(data = pom[pom$db==1], x= ~pom_latitude, y= ~pom_longitude,
z= ~pom_altitude, color = ~pom_ozone,
mode="markers", type='scatter3d')
session 2
print(range(pom[["date_time"]][pom$db==2]))
## [1] "2022-05-19 05:03:15 UTC" "2022-05-19 05:31:51 UTC"
plot_ly(data = pom[pom$db==2], x= ~pom_latitude, y= ~pom_longitude,
z= ~pom_altitude, color = ~pom_ozone,
mode="markers", type='scatter3d')
session 3
print(range(pom[["date_time"]][pom$db==3]))
## [1] "2022-05-19 05:32:29 UTC" "2022-05-19 07:13:51 UTC"
plot_ly(data = pom[pom$db==3], x= ~pom_latitude, y= ~pom_longitude,
z= ~pom_altitude, color = ~pom_ozone,
mode="markers", type='scatter3d')
patterns
plot(pom[,c(3,1,8:10)])

coordinates - needs to be calibrated
m <- leaflet() %>% addTiles()
m %>% addCircleMarkers(pom$pom_longitude, pom$pom_latitude)
Ground station
ground <- read.csv("~/drone/data/Project_name_2022-05-18_22-25-23.csv",
header = TRUE)[-1,] %>% data.table()
ground$date_time <- ymd_hms(ground$date_time)
ground$opc_temperature <- ground$opc_temperature %>% as.character() %>% as.numeric()
ground$opc_pm2dot5 <- ground$opc_pm2dot5 %>% as.character() %>% as.numeric()
ground$opc_pm10 <- ground$opc_pm10 %>% as.character() %>% as.numeric()
par(mfrow=c(3,1), mar=c(2,2,2,1))
plot(opc_temperature~date_time, ground, type="l", main = "Temp")
plot(log(opc_pm10)~date_time, ground, type="l", main = "PM10 (log scale)")
plot(log(opc_pm2dot5)~date_time, ground, type="l", main = "PM2.5 (log scale)")

Humidity
hum <- read.csv("~/drone/data/Project_hum_name_2022-05-19_04-28-39.csv", header = TRUE) %>% data.table()
hum$hum_longitude <- hum$hum_longitude/100
hum$hum_latitude <- hum$hum_latitude/100
hum$date_time <- ymd_hms(hum$date_time)
real humidity
plot_ly(data = hum, x= ~hum_latitude, y= ~hum_longitude,
z= ~hum_altitude, color = ~hum_rel_hum,
mode="markers", type='scatter3d')
## Warning: Ignoring 107 observations
pressure
plot_ly(data = hum, x= ~hum_latitude, y= ~hum_longitude,
z= ~hum_altitude, color = ~hum_pressure,
mode="markers", type='scatter3d')
## Warning: Ignoring 107 observations
temperature
plot_ly(data = hum, x= ~hum_latitude, y= ~hum_longitude,
z= ~hum_altitude, color = ~hum_temp,
mode="markers", type='scatter3d')
## Warning: Ignoring 107 observations
over time
g1 <- ggplot(data=hum, aes(y=hum_rel_hum, x=date_time, color=hum_altitude)) +
geom_point()
g2 <- ggplot(data=hum, aes(y=hum_pressure, x=date_time, color=hum_altitude)) +
geom_point()
g3 <- ggplot(data=hum, aes(y=hum_temp, x=date_time, color=hum_altitude)) +
geom_point()
grid.arrange(g1,g2,g3, ncol=1)
## Warning: Removed 107 rows containing missing values (geom_point).
## Warning: Removed 107 rows containing missing values (geom_point).
## Warning: Removed 107 rows containing missing values (geom_point).

POPS
HK1 <- read.csv("~/drone/data/HK_20220518x001.csv", header = TRUE) %>% data.table()
HK2 <- read.csv("~/drone/data/HK_20220518x002.csv", header = TRUE) %>% data.table()
HK3 <- read.csv("~/drone/data/HK_20220518x003.csv", header = TRUE) %>% data.table()
colnames(HK2) <- colnames(HK1)
colnames(HK3) <- colnames(HK1)
HK <- rbind(HK1,HK2,HK3)
hum$hum_longitude <- hum$hum_longitude/100
hum$hum_latitude <- hum$hum_latitude/100
HK$DateTime..Drone.timezone. <- mdy_hm(HK$DateTime..Drone.timezone.)
HK$session <- c(rep(1,nrow(HK1)),rep(2,nrow(HK2)),rep(3,nrow(HK3))) %>% as.factor()
Particle Count (#/s)
ggplot(data=HK, aes(y=PartCt, x=DateTime..Drone.timezone.,
color = session)) +
geom_point()

Particle concentration (#/cm^3)
ggplot(data=HK, aes(y=PartCon, x=DateTime..Drone.timezone.,
color = session)) +
geom_point()

Particle concentration (#/cm^3) - remove outliers
HK_out <- HK[HK$PartCon<20000,]
ggplot(data=HK_out, aes(y=PartCon, x=DateTime..Drone.timezone.,
color = session)) +
geom_point()

POPS 1
par(mfrow=c(4,4), mar = c(2,2,1,1))
for (i in 37:52){
boxplot(HK1[[i]]~HK1$DateTime..Drone.timezone., main=colnames(HK1)[i])
}

POPS 2
par(mfrow=c(4,4), mar = c(2,2,1,1))
for (i in 37:52){
boxplot(HK2[[i]]~HK2$DateTime..Drone.timezone., main=colnames(HK1)[i])
}

POPS 3
par(mfrow=c(4,4), mar = c(2,2,1,1))
for (i in 37:52){
boxplot(HK3[[i]]~HK3$DateTime..Drone.timezone., main=colnames(HK3)[i])
}

ambient pressure measured by POPS (hPa)
ggplot(data=HK, aes(y=P, x=DateTime..Drone.timezone.,color=session)) +
geom_point()

ambient pressure measured by POPS (hPa)
ggplot(data=HK, aes(y=POPS_Flow, x=DateTime..Drone.timezone.)) +
geom_point() + facet_grid(session~.) + ylim(2.75, 3.2)
## Warning: Removed 6 rows containing missing values (geom_point).

current basline of the detector (raw analog-to-digital counts)
ggplot(data=HK, aes(y=BL, x=DateTime..Drone.timezone., color=session)) +
geom_point()
