Skip to content

Commit

Permalink
test(obs_1min): attributes
Browse files Browse the repository at this point in the history
fixes #10
  • Loading branch information
dimfalk committed Jan 3, 2025
1 parent 6e64f67 commit 21aad3e
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: HPBdata
Title: Meteorological observations at 'Hohenpeißenberg' site (Bavaria, Germany)
Version: 0.1.5
Date: 2025-01-02
Version: 0.1.6
Date: 2025-01-03
Authors@R:
person("Dimitri", "Falk", , "falk.dimitri@eglv.de", role = c("aut", "cre"))
Description: Historical quality-assured meteorological observation data at
Expand Down
6 changes: 3 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' \item{RWH_RS_01}{xts object. Precipitation depth \code{[mm]}.}
#' }
#' @source <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/1_minute/precipitation/historical/>
#' @note Last access: 2025-01-02
#' @note Last access: 2025-01-03
#' @description <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/1_minute/precipitation/DESCRIPTION_obsgermany-climate-1min-rr_en.pdf>
#' @note License: CC BY 4.0
#' @note Copyright: Deutscher Wetterdienst 2025
Expand All @@ -34,7 +34,7 @@
#' \item{RWS_10}{xts object. Precipitation depth \code{[mm]}.}
#' }
#' @source <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/10_minutes/air_temperature/historical/>
#' @note Last access: 2025-01-02
#' @note Last access: 2025-01-03
#' @description <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/10_minutes/air_temperature/DESCRIPTION_obsgermany_climate_10min_air_temperature_en.pdf>
#' @note License: CC BY 4.0
#' @note Copyright: Deutscher Wetterdienst 2025
Expand Down Expand Up @@ -62,7 +62,7 @@
#' \item{TGK}{xts object. Minimum air temperature at 5 cm above ground \code{[°C]}.}
#' }
#' @source <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/daily/kl/historical/>
#' @note Last access: 2025-01-02
#' @note Last access: 2025-01-03
#' @description <https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/daily/kl/DESCRIPTION_obsgermany-climate-daily-kl_en.pdf>
#' @note License: CC BY 4.0
#' @note Copyright: Deutscher Wetterdienst 2025
Expand Down
2 changes: 1 addition & 1 deletion data-raw/obs_10min.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## code to prepare `obs_10min` dataset goes here

library(timeseriesIO)
#> 0.7.129
#> 0.7.133

obs_10min <- list()

Expand Down
2 changes: 1 addition & 1 deletion data-raw/obs_1d.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## code to prepare `obs_1d` dataset goes here

library(timeseriesIO)
#> 0.7.129
#> 0.7.133

station <- timeseriesIO::get_cdc_stations(res = "daily",
par = "kl",
Expand Down
2 changes: 1 addition & 1 deletion data-raw/obs_1min.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## code to prepare `obs_1min` dataset goes here

library(timeseriesIO)
#> 0.7.129
#> 0.7.133

station <- timeseriesIO::get_cdc_stations(res = "1_minute",
par = "precipitation",
Expand Down
Binary file modified data/obs_1min.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/obs_10min.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/obs_1d.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/obs_1min.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test-obs_1min.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test_that("Attributes are unchanged.", {

expect_equal(attr(obs_1min[[1]], "TZONE"), "UTC")

expect_equal(attr(obs_1min[[1]], "PARAMETER"), NULL)
expect_equal(attr(obs_1min[[1]], "PARAMETER"), "Niederschlagshoehe")

expect_equal(attr(obs_1min[[1]], "TS_START"), structure(773043600, class = c("POSIXct", "POSIXt"), tzone = "UTC"))

Expand All @@ -74,7 +74,7 @@ test_that("Attributes are unchanged.", {

expect_equal(attr(obs_1min[[1]], "MEAS_RESOLUTION"), 1)

expect_equal(attr(obs_1min[[1]], "MEAS_UNIT"), NULL)
expect_equal(attr(obs_1min[[1]], "MEAS_UNIT"), "mm")

expect_equal(attr(obs_1min[[1]], "MEAS_STATEMENT"), NULL)
expect_equal(attr(obs_1min[[1]], "MEAS_STATEMENT"), "sum")
})

0 comments on commit 21aad3e

Please sign in to comment.