View source: R/read-seepolizei.R
read_seepolizei | R Documentation |
Reads historic data files of the Tecson meteo station placed at Tiefenbrunnen and Mythenquai water police station.
read_seepolizei(
fn,
site = c("ZH_Mythenquai", "ZH_Tiefenbrunnen"),
tz = "Etc/GMT-1",
time_shift = NULL,
na.rm = TRUE
)
fn |
file name containing historic data |
site |
measurement site of data. Should be "ZH_Mythenquai" or "ZH_Tiefenbrunnen" |
tz |
Output time zone. The file content is in CET. Default "Etc/GMT-1" |
time_shift |
a lubridate period to add to the time. Default NULL |
na.rm |
remove na (empty) values. Default TRUE |
data frame in rOstluft long format
input <- rOstluft.data::f("messwerte_tiefenbrunnen_2007-2019.csv")
data <- read_seepolizei(input, "ZH_Tiefenbrunnen")
# normalize data with meta informations
meta_data <- readRDS(rOstluft.data::f("meta_seepolizei.rds"))
# add units
data <- meta_apply(
data = data,
meta = meta_data,
data_src = "parameter",
data_dest = "unit",
meta_key = "parameter_original",
meta_val = "unit",
mode = "strict"
)
# rename parameters to Ostluft Conventions
data <- meta_apply(
data = data,
meta = meta_data,
data_src = "parameter",
data_dest = "parameter",
meta_key = "parameter_original",
meta_val = "parameter",
mode = "strict"
)
# show normalized data
data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.