read_seepolizei: Reads historic data files of the Tecson meteo station placed...

View source: R/read-seepolizei.R

read_seepolizeiR Documentation

Reads historic data files of the Tecson meteo station placed at Tiefenbrunnen and Mythenquai water police station.

Description

Reads historic data files of the Tecson meteo station placed at Tiefenbrunnen and Mythenquai water police station.

Usage

read_seepolizei(
  fn,
  site = c("ZH_Mythenquai", "ZH_Tiefenbrunnen"),
  tz = "Etc/GMT-1",
  time_shift = NULL,
  na.rm = TRUE
)

Arguments

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

Value

data frame in rOstluft long format

Examples

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

Ostluft/rOstluft documentation built on Feb. 6, 2024, 1:26 a.m.