Skip to content

Commit

Permalink
Merge pull request #32 from statistikZH/hotfix-31
Browse files Browse the repository at this point in the history
Hotfix for issue #31 - LF1: change in time series
  • Loading branch information
gma-lks authored May 17, 2024
2 parents ba26ebc + 8c0ebe3 commit 2662677
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Binary file modified 2773 Monitoring.xlsx
Binary file not shown.
8 changes: 7 additions & 1 deletion R/download_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ get_bfs_asset_info <- function(ds) {
get_px_query_list <- function(ds) {

query_list <- list()
query_list[[ds$year_col]] <- as.character(ds$year_start:ds$year_end)
# In some cases, the year is not referred to by the value of the year, e.g. "2023", but by an index where the most recent year is "0".
# For those cases, the column year_start contains the number of years to pull, e.g. 2023 - 1996 = 27 --> so it calls index 0:27
if (ds$year_start > 1000) {
query_list[[ds$year_col]] <- as.character(ds$year_start:ds$year_end)
} else {
query_list[[ds$year_col]] <- as.character(0:ds$year_start)
}

# excel coerces comma to decimal point in gebiet_id
if(stringr::str_detect(ds$gebiet_id, pattern = "\\.")){
Expand Down

0 comments on commit 2662677

Please sign in to comment.