Read MBR4.0 data from Martin Systems Webportal (As "tsv")
Usage
read_mbr4_latest(
url = Sys.getenv("MBR40_URL"),
target_dir = tempdir(),
locale = readr::locale(tz = "CET", decimal_mark = ".", grouping_mark = ","),
col_types = readr::cols(.default = readr::col_double(), zustand =
readr::col_character(), meldungen = readr::col_character(), Zeitstempel =
readr::col_datetime(format = "%Y-%m-%d %H:%M:%S")),
dbg = FALSE,
...
)
Arguments
- url
url to download site (default: Sys.getenv("MBR4.0_URL"), please use run edit_r_environ and define a key value pair "MBR40_URL" = "download-url-martin-systems") so that this function works automatically
- target_dir
directory to download data (default: tempdir())
- locale
locale (default:
locale
(tz = "CET", decimal_mark = ".", grouping_mark = ","))- col_types
col_types (default:
cols
( .default =col_double
, zustand =col_character
, meldungen =col_character
, Zeitstempel =col_datetime
(format = " )- dbg
print debug messages (default: FALSE)
- ...
additional arguments passed to read_tsv
Examples
url_mbr40 <- Sys.getenv("MBR40_URL")
if (url_mbr40 != "") {
mbr4_data_latest <- read_mbr4_latest(url = url_mbr40)
str(mbr4_data_latest)
}
#> New names:
#> • `` -> `...79`
#> tibble [21,530 × 79] (S3: tbl_df/tbl/data.frame)
#> $ h_grob : num [1:21530] 73.4 73.4 73.4 73.4 73.4 ...
#> $ h_bel : num [1:21530] 65.1 65.4 65.3 65.5 65.6 ...
#> $ h_filt : num [1:21530] 86.9 86.9 86.9 86.9 87 ...
#> $ q_filt : num [1:21530] 121 121 123 122 0 ...
#> $ p_filt : num [1:21530] -20.5 -21.1 -20.5 -19.9 14.6 ...
#> $ q_sg1 : num [1:21530] 12.6 12.6 12.6 12.7 12.6 ...
#> $ q_sg2 : num [1:21530] 12.5 12.5 12.5 12.5 12.5 ...
#> $ q_nitri : num [1:21530] 0.00163 0.0011 2.14386 2.16131 2.18071 ...
#> $ q_zp : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ q_rp : num [1:21530] 2968 2969 2952 2977 2972 ...
#> $ q_filtrat2 : num [1:21530] 123 123 120 125 0 ...
#> $ p_filtrat2 : num [1:21530] -21.3 -20.9 -21.5 -21.3 14.7 ...
#> $ p_sg1 : num [1:21530] 161 161 161 161 161 ...
#> $ p_sg2 : num [1:21530] 160 159 160 159 160 ...
#> $ ldo_nitri : num [1:21530] 6.86 6.92 6.65 6.32 6.19 ...
#> $ ldo_nitri_temp : num [1:21530] 21.4 21.4 21.4 21.4 21.4 ...
#> $ ldo_filter : num [1:21530] 8.67 8.69 8.56 8.52 8.58 ...
#> $ ldo_filter_temp : num [1:21530] 21.4 21.4 21.4 21.4 21.4 ...
#> $ redox_deni : num [1:21530] 335 334 333 332 330 ...
#> $ redox_deni_temp : num [1:21530] 22.1 22.1 22.1 22.1 22.1 ...
#> $ ts_filter : num [1:21530] 4.66 4.65 4.65 4.7 4.69 ...
#> $ ts_nitri : num [1:21530] 4.53 4.36 4.35 4.36 4.45 ...
#> $ ammonium_ablauf : num [1:21530] 139 139 138 138 139 ...
#> $ nitrat_ablauf : num [1:21530] 40.5 40.5 40.5 40.6 40.6 ...
#> $ kalium_ablauf : num [1:21530] 105 105 105 105 104 ...
#> $ chlorid_ablauf : num [1:21530] 1.28 1.27 1.28 1.28 1.27 ...
#> $ temp_ablauf : num [1:21530] 21.5 21.5 21.5 21.5 21.5 ...
#> $ ammonium_nitri : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ kalium_nitri : num [1:21530] 1550 1550 1550 1550 1550 ...
#> $ temp_nitri : num [1:21530] 21.2 21.1 21.1 21.1 21.1 ...
#> $ ammonium_zulauf : num [1:21530] 539 538 538 538 539 ...
#> $ kalium_zulauf : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ temp_zulauf : num [1:21530] 19.8 19.8 19.8 19.8 19.8 ...
#> $ leitf_zulauf : num [1:21530] 657 658 657 658 658 ...
#> $ leitf_zulauf_temp: num [1:21530] 19.7 19.7 19.7 19.7 19.7 ...
#> $ ph_filter : num [1:21530] 1.81 1.8 1.8 1.8 1.8 ...
#> $ ph_filter_temp : num [1:21530] 21.4 21.4 21.4 21.4 21.4 ...
#> $ ph_nitri : num [1:21530] 6.29 6.31 6.3 6.29 6.28 ...
#> $ ph_nitri_temp : num [1:21530] 21.5 21.5 21.5 21.5 21.5 ...
#> $ q_bypass_rezi : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ q_filter_rezi : num [1:21530] 2968 2968 2952 2976 2972 ...
#> $ p_komp : num [1:21530] 0.648 0.374 0.435 0.371 0.434 ...
#> $ p_zulauf : num [1:21530] 151 151 150 150 151 ...
#> $ p_filt1_diff : num [1:21530] 36.3 36.3 36.3 36.3 36.3 ...
#> $ p_filt2_diff : num [1:21530] 36.5 36.5 36.5 36.5 36.5 ...
#> $ trios_zulauf_no3n: num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ trios_zulauf_no2n: num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ trios_zulauf_csb : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ trios_zulauf_sak : num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ trios_ablauf_no3n: num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ trios_ablauf_no2n: num [1:21530] 0 0 0 0 0 0 0 0 0 0 ...
#> $ leistung : num [1:21530] 2314 2321 1717 1700 1519 ...
#> $ energie : num [1:21530] 22039 22039 22039 22039 22039 ...
#> $ q_gesamt : num [1:21530] 993367 993363 993359 993355 993353 ...
#> $ q_gestern : num [1:21530] 3025 3025 3025 3025 3025 ...
#> $ q_gesamt_filt2 : num [1:21530] 999139 999135 999131 999127 999125 ...
#> $ q_gestern_filt2 : num [1:21530] 3047 3047 3047 3047 3047 ...
#> $ q-nitri-gesamt : num [1:21530] 2 2 2 2 2 2 2 2 2 2 ...
#> $ q_sg1_gesamt : num [1:21530] 92375 92375 92375 92374 92374 ...
#> $ q_sg2_gesamt : num [1:21530] 90589 90589 90589 90588 90588 ...
#> $ q_zp_gesamt : num [1:21530] 2056890 2056890 2056890 2056890 2056890 ...
#> $ q_zp_gestern : num [1:21530] 6200 6200 6200 6200 6200 6200 6200 6200 6200 6200 ...
#> $ q_uss_gesamt : num [1:21530] 45200 45200 45200 45200 45200 45200 45200 45200 45200 45200 ...
#> $ t_rechen : num [1:21530] 6502548 6502548 6502548 6502547 6502547 ...
#> $ t_nitri : num [1:21530] 41057890 41057890 41057795 41057675 41057554 ...
#> $ t_rp : num [1:21530] 64855884 64855764 64855644 64855524 64855403 ...
#> $ t_sg1 : num [1:21530] 54545232 54545112 54544992 54544872 54544751 ...
#> $ t_sg2 : num [1:21530] 54546923 54546803 54546683 54546563 54546442 ...
#> $ t_fp : num [1:21530] 49773806 49773686 49773566 49773446 49773392 ...
#> $ t_fp2 : num [1:21530] 49901848 49901728 49901608 49901488 49901434 ...
#> $ t_rw1 : num [1:21530] 39642407 39642287 39642262 39642262 39642262 ...
#> $ t_rw2 : num [1:21530] 66279276 66279156 66279036 66278916 66278795 ...
#> $ t_zp1 : num [1:21530] 2656308 2656308 2656308 2656308 2656308 ...
#> $ t_grobstoffp : num [1:21530] 13239 13239 13239 13239 13239 ...
#> $ zustand : chr [1:21530] "050005000500070007000700070000000000000000000700070007000000100000000000010087000100AFD8AB00" "050005000500070007000700070000000000000000000700070007000000100000000000010087000100AFD8AB00" "050005000700070007000700070000000000000000000500070007000000100000000000010087000100AFD8AB00" "050005000700070007000700070000000000000000000500070007000000100000000000010087000100AFD8AB00" ...
#> $ meldungen : chr [1:21530] "0000000000000000000000000000" "0000000000000000000000000000" "0000000000000000000000000000" "0000000000000000000000000000" ...
#> $ id : num [1:21530] 305554 305553 305552 305551 305550 ...
#> $ Zeitstempel : POSIXct[1:21530], format: "2023-09-15 09:20:12" "2023-09-15 09:18:11" ...
#> $ ...79 : num [1:21530] NA NA NA NA NA NA NA NA NA NA ...