From f97e69047f7e28e4bfdc9ffc3f9bc8d78faf5912 Mon Sep 17 00:00:00 2001 From: Tobias Schieferdecker Date: Thu, 2 Dec 2021 16:29:45 +0100 Subject: [PATCH] just create mapping table until max this year --- R/write_tables.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/write_tables.R b/R/write_tables.R index 74120a07..80fc1436 100644 --- a/R/write_tables.R +++ b/R/write_tables.R @@ -1,8 +1,8 @@ # Municipality splits existed before 2005 write_all_mapping_tables <- function(source_year = 2005) { MAX_YEAR <- lubridate::year( - max(swc_get_municipality_mutations()$mAbolitionDate, na.rm = TRUE) - ) + 1L + max(swc_get_municipality_mutations()$mAdmissionDate, na.rm = TRUE) + ) years <- seq(source_year, MAX_YEAR, by = 1)