Commit f22c26e3 by Jan Wijffels

Handle pm2,5, bc, no2

parent 64062625
......@@ -159,12 +159,12 @@ CitizenAir <- R6::R6Class("CitizenAir",
from <- unique(x)
from_cleaned <- trimws(tolower(from))
## ONLY PM-10/PM-2.5/PM1 and Temperature are covered in this setup
idx <- which(from_cleaned %in% c("pm10", "pm2.5", "pm1", "t"))
idx <- which(from_cleaned %in% c("pm10", "pm2.5", "pm2,5", "pm25", "pm1", "t", "bc", "no2"))
to <- from
if(length(idx) > 0){
to[idx] <- txt_recode(from_cleaned[idx],
from = c("pm10", "pm2.5", "pm1", "t"),
to = c("5", "6001", "6002", "62101"))
from = c("pm10", "pm2.5", "pm2,5", "pm25", "pm1", "t", "bc", "no2"),
to = c("5", "6001", "6001", "6001", "6002", "62101", "391", "8"))
}
txt_recode(x,
from = from,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment