diff --git a/1_Code/0000_General/0001_model_control-flow.r b/1_Code/0000_General/0001_model_control-flow.r deleted file mode 100644 index 7b7f41eb..00000000 --- a/1_Code/0000_General/0001_model_control-flow.r +++ /dev/null @@ -1,14 +0,0 @@ -source("1_code/0000_general/general_init.R") -params <- init("middle") - -time_start <- Sys.time() - -# run_scen( -# scenarios = c("lower", "middle", "upper"), -# modules = c("all")) - -# run_scen( -# scenarios = c("lower", "middle", "upper"), -# modules = c("out")) - -render_book(cache_refresh = TRUE) diff --git a/1_Code/0000_General/general_init.R b/1_Code/0000_General/general_init.R index 8269dc56..0c94352e 100644 --- a/1_Code/0000_General/general_init.R +++ b/1_Code/0000_General/general_init.R @@ -10,40 +10,44 @@ #' @export #' #' @examples util_gf("lower") + + init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.yml"){ + # packages - require(tidyverse) + require(ckanr) # download of open data directly from ckan require(dvmisc) # for expand_grid - require(gridExtra) # for ggplot on multiple pages - require(nlme) # needed for mgcv, see below - require(mgcv) # for gam - require(flexclust) # weighted kmeans clustering - require(ggrepel) # to label lines (when too many for a normal legend) - require(zoo) # moving average (no confusion with filter function in base R) - require(ckanr) # download of open data directly from ckan - require(scales) # for pretty axis breaks - require(rlang) # for functions: symbols, quasiquotation (!!, !!!, :=) - require(gtools) # invalid function (to check for NA, NULL, NaN), e.g. in constrained regression - # require(this.path) # to extract the current file name - require(modelr) # add_predictions + require(flexclust) # weighted kmeans clustering + require(ggrepel) # to label lines (when too many for a normal legend) + require(gridExtra) # for ggplot on multiple pages + require(gtools) # invalid function (to check for NA, NULL, NaN), e.g. in constrained regression + require(mgcv) # for gam + require(modelr) # add_predictions + require(nlme) # needed for mgcv require(quarto) #for programmatically rendering quarto + require(rlang) # for functions: symbols, quasiquotation (!!, !!!, :=) + require(scales) # for pretty axis breaks + require(this.path) #for this.dir function + require(tidyverse) #tidyverse functionality + require(zoo) # moving average (no confusion with filter function in base R) + # no scientic notation options(scipen = 999) - # general stuff (without dependency on parameters) ---------------------------------- + # general objects without dependency on parameters ---------------------------------- # read general variables for common use vars <- yaml::read_yaml(paste0(here::here(), var_file), eval.expr = TRUE, fileEncoding = "UTF-8") vars$i_scen <- i_scen # import parameters para <- read_delim(paste0(here::here(), vars$para_file), ";", lazy = FALSE) %>% - select(parameter, lower, middle, upper) %>% + select(parameter, lower, middle, middle_birth_lower, middle_birth_upper, upper) %>% pivot_longer(cols = lower:upper, names_to = "scenario") %>% filter(scenario == i_scen) %>% select(parameter, value) - # read parameters (depend on scenario) + # read parameters (depending on scenario) for (i_para in 1:nrow(para)) { assign(para$parameter[i_para], para$value[i_para], envir = .GlobalEnv) } @@ -53,11 +57,11 @@ init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.ym # create variables -------------------------------------------------------- + # lookup tables vars$look_dis <- read_csv2(paste0(here::here(), vars$dis_file), lazy = FALSE) %>% select(QuarCd, distr) - vars$look_reg <- mutate(vars$look_dis, distnum = if_else(distr == "Kreis 1", 10, as.numeric(QuarCd))) %>% select(distnum, distr) %>% unique() %>% @@ -105,6 +109,16 @@ init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.ym age < vars$age_4[5] ~ vars$age_4t[4], TRUE ~ vars$age_4t[5] ), levels = vars$age_4t)) + + vars$look_a5 <- tibble(age = 0:120) %>% + mutate(age_5 = factor(case_when( + age < vars$age_5[1] ~ vars$age_5t[1], + age < vars$age_5[2] ~ vars$age_5t[2], + age < vars$age_5[3] ~ vars$age_5t[3], + TRUE ~ vars$age_5t[4] + ), levels = vars$age_5t)) + + # unique levels vars$text_d <- unique(vars$look_dis$distr) @@ -118,6 +132,7 @@ init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.ym vars$uni_t <- factor(vars$pro_category, levels = vars$pro_category) vars$uni_i <- factor(vars$text_i, levels = vars$text_i) vars$uni_c <- factor(vars$text_c, levels = vars$text_c) + vars$uni_cb <- factor(vars$text_cb, levels = vars$text_cb) vars$look_own <- tibble(EigentumGrundstkCd = as.integer(labels(vars$uni_w)), owner = levels(vars$uni_w)) @@ -165,7 +180,10 @@ init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.ym # relocation functions source(paste0(vars$code_path, "/0000_general/general_relocation-function.r")) - # general stuff (with dependency on parameters) ---------------------------------- + + + + # general objects with dependency on parameters ---------------------------------- # path for results vars$res_path <- paste0(vars$res_path, i_scen) @@ -202,7 +220,7 @@ init <- function(i_scen = "middle", var_file = "/2_Data/3_Parameter/variables.ym # color for year (base period) vars$col_y_base <- colorRampPalette(vars$col_6)(length(vars$uniy_bir_base)) - # colour for time distributions + # colors for time distributions vars$col_time <- c( rep(vars$col_grey, length(vars$uniy_bir_base)), colorRampPalette(vars$col_6[1:5])(length(vars$uniy_scen)) diff --git a/1_Code/0000_General/general_utils.R b/1_Code/0000_General/general_utils.R index 11f0acba..20e1a30f 100644 --- a/1_Code/0000_General/general_utils.R +++ b/1_Code/0000_General/general_utils.R @@ -18,7 +18,6 @@ #' spa (living space) #' aca (allocation) #' pro (projects) -#' own (ownership) #' hou (housing model) #' deh (demography and housing model) #' out (model outputs) @@ -104,11 +103,6 @@ run_scen <- function(scenarios, modules, keep_log = TRUE) { source(paste0(code_path, "1100_Projects/1100_projects.r")) } - # ownership - if (modules %in% c("all", "alw", "how", "hom", "own")) { - source(paste0(code_path, "1200_Ownership/1200_ownership.r")) - } - # housing model if (modules %in% c("all", "alw", "how", "hom", "hou")) { source(paste0(code_path, "1300_Housing-Model/1300_housing-model.r")) @@ -246,20 +240,20 @@ dir_ex_create <- function(path){ } -#' check if 3 files are present +#' check if 5 files are present #' -#' @description checks if the input contains 3 values and stops execution if this is not the case +#' @description checks if the input contains 5 values and stops execution if this is not the case #' #' @param files character vector #' #' @return stops execution if condition is not met #' @export #' -#' @examples stop_3(c("a.csv", "b.csv", "c.csv")) -stop_3 <- function(files){ +#' @examples stop_5(c("a.csv", "b.csv", "c.csv", "d.csv", "e.csv")) +stop_5 <- function(files){ stopifnot("missing files;\ make sure to run the whole model (0001_model_control-flow.r) beforehand" = - length(read_files) == 3) + length(read_files) == 5) } diff --git a/1_Code/0000_General/model_control-flow.r b/1_Code/0000_General/model_control-flow.r new file mode 100644 index 00000000..81a6430e --- /dev/null +++ b/1_Code/0000_General/model_control-flow.r @@ -0,0 +1,19 @@ +source("1_code/0000_general/general_init.R") +params <- init("middle") + +time_start <- Sys.time() + +# run_scen( +# scenarios = c("lower", "middle", "middle_birth_lower", "middle_birth_upper", "upper"), +# modules = c("alw")) + +# run_scen( +# scenarios = c("lower", "middle", "middle_birth_lower", "middle_birth_upper", "upper"), +# modules = c("all")) + +Sys.time() - time_start + + +render_book(cache_refresh = TRUE) + + diff --git a/1_Code/0100_Birth/0100_birth-fertility.r b/1_Code/0100_Birth/0100_birth-fertility.r index 885c10e1..d5641cb0 100644 --- a/1_Code/0100_Birth/0100_birth-fertility.r +++ b/1_Code/0100_Birth/0100_birth-fertility.r @@ -146,7 +146,7 @@ fer_fit <- arrange(fer_tail, district, year, origin, age) %>% # constrained regression # (proportion of linear model and mean, within bandwidth) -fer_pred <- con_reg( +fer_pred_temp <- con_reg( data = fer_fit, x = "year", y = "fer_fit", group_cols = c("district", "age", "origin"), window = bir_window_thres, base_t0 = bir_base_begin, @@ -162,7 +162,30 @@ fer_pred <- con_reg( left_join(select(fer_dyao, district, year, age, origin, fer_dyao), by = c("district", "year", "age", "origin") ) %>% - mutate(fer_all = if_else(year <= bir_base_end, fer_dyao, pred_roll)) + mutate(fer_all_temp = if_else(year <= bir_base_end, fer_dyao, pred_roll)) + + +# fertility multiplier ---------------------------------------------------- + +# multiplier by year +fer_mult_dat <- tibble(year = c(scen_begin, scen_end), + mult = c(bir_mult_begin, bir_mult_end)) |> + mutate(year_new = (year - scen_begin + 1)^bir_mult_exp) + +fer_mult <- tibble(year = scen_begin:scen_end) |> + mutate(year_new = (year - scen_begin + 1)^bir_mult_exp) |> + add_predictions(lm(mult ~ year_new, data = fer_mult_dat), var = "mult") + +# ggplot(fer_mult) + +# geom_point(aes(x = year, y = mult)) + + + +# fertility rates with multiplier +fer_pred <- fer_pred_temp |> + left_join(fer_mult, by = "year") |> + mutate(fer_all = fer_all_temp * mult) + # plot 0140: the predictions: age distribution by district and year @@ -175,7 +198,7 @@ pred_fit <- filter(fer_pred, year >= scen_begin) %>% arrange(district, year, origin, age) %>% group_by(district, year, origin) %>% mutate(pred_fit = pmax(0, predict( - loess(pred_roll ~ age, span = bir_fer_span_pred, degree = 1, na.action = na.aggregate) + loess(fer_all ~ age, span = bir_fer_span_pred, degree = 1, na.action = na.aggregate) ))) %>% ungroup() diff --git a/1_Code/0200_Death/0200_death.r b/1_Code/0200_Death/0200_death.r index f70c3578..f1e2ad2f 100644 --- a/1_Code/0200_Death/0200_death.r +++ b/1_Code/0200_Death/0200_death.r @@ -51,7 +51,7 @@ pop <- read_csv(pop_od) %>% # FSO data (used in the prediction) # rate is converted to percent mor_fso <- read_csv(dea_fso_od) %>% - rename(year = EreignisDatJahr, age = AlterVCd) %>% + rename(year = EreignisDatJahr, age = AlterVCd, KategorieCd = KategorieDatenBFSCd) %>% filter(HerkunftCd == 0) %>% mutate( sex = fact_if(SexCd, uni_s), @@ -316,6 +316,18 @@ mor_zh_yas_past_future <- select(mor_zh_yas, year, age, sex, mor_yas) %>% # plot 0210 +# ZH and CH: past and future +mor_zh_ch_yas_past_future <- mor_zh_yas_past_future |> + mutate(region = factor(text_r[1], uni_r)) |> + right_join(mor_yasr, by = c("year", "age", "sex", "region")) |> + mutate(mor_new = if_else((year >= scen_begin) & (region == uni_r[1]), + mor_yas, mor_yasr)) |> + select(year, age, sex, region, mor_new) |> + rename(mor_yasr = mor_new) |> + arrange(year, age, sex, region) + +# plot 0210a + # export mortality rates -------------------------------------------------- # prepare the export data diff --git a/1_Code/0900_Living-Space/0900_living-space.r b/1_Code/0900_Living-Space/0900_living-space.r index 6e060ee2..df69a3fa 100644 --- a/1_Code/0900_Living-Space/0900_living-space.r +++ b/1_Code/0900_Living-Space/0900_living-space.r @@ -16,7 +16,7 @@ spa_dat <- read_csv(spa_od) %>% rename(year = StichtagDatJahr, area = Wohnflaeche, apartments = AnzWhgStat, people = AnzBestWir) %>% left_join(look_dis, by = "QuarCd") %>% mutate( - owner = fact_if(EigentuemerSSZPubl3Cd_noDM , uni_w), + owner = fact_if(EigentuemerSSZPubl3Cd_noDM, uni_w), district = factor(distr, uni_d) ) %>% group_by(year, district, owner) %>% diff --git a/1_Code/1100_Projects/1100_projects.r b/1_Code/1100_Projects/1100_projects.r index 5d522dac..73d74216 100644 --- a/1_Code/1100_Projects/1100_projects.r +++ b/1_Code/1100_Projects/1100_projects.r @@ -100,7 +100,7 @@ pro_delay <- as_tibble(expand_grid( owner = uni_w, status = pro_category, indicator = uni_i, - delay = as.double(0:5) + delay = as.double(0:pro_max_delay) )) %>% left_join(select(pro_not, c(district, year, owner, status, indicator, realized)), by = c("district", "year", "owner", "status", "indicator") diff --git a/1_Code/1200_Ownership/1200_ownership.r b/1_Code/1200_Ownership/1200_ownership.r deleted file mode 100644 index dd6aaa60..00000000 --- a/1_Code/1200_Ownership/1200_ownership.r +++ /dev/null @@ -1,106 +0,0 @@ -# header ------------------------------------------------------------------ -# ownership - -# paths, general ---------------------------------------------------------- - -# source(paste0(here::here(),"/1_code/0000_general/general_init.R")) -# init() - -# start time -t0 <- Sys.time() - -# import, data preparation ------------------------------------------------ - -# ownership: data -own_dat <- read_csv(spa_od) %>% - rename(year = StichtagDatJahr, apartments = AnzWhgStat, people = AnzBestWir) %>% - left_join(look_dis, by = "QuarCd") %>% - mutate( - owner = fact_if(EigentuemerSSZPubl3Cd_noDM, uni_w), - district = factor(distr, uni_d) - ) %>% - select(year, district, owner, apartments, people) %>% - group_by(district, year, owner) %>% - summarize( - apartments = sum_NA(apartments), - people = sum_NA(people), - .groups = "drop") - -# proportion of cooperative housing --------------------------------------- - -# proportions (based on apartments and people) -own_prop <- group_by(own_dat, district, year) %>% - mutate( - prop_apartments = round(apartments / sum_NA(apartments) * 100, round_prop), - prop_people = round(people / sum_NA(people) * 100, round_prop) - ) %>% - filter(owner == uni_w[1]) %>% - select(district, year, prop_apartments, prop_people) %>% - pivot_longer( - cols = starts_with("prop"), names_prefix = "prop_", - names_to = "category", values_to = "prop" - ) - -# plot 1200 - -# prediction -------------------------------------------------------------- - -# category: people -# WHY? prediction is based on different sources -# projects: apartments -# reserves: m2 -# however, the combined prediction is for persons -# therefore, the proportion based on people - -own_cat <- filter(own_prop, category == "people") %>% - select(district, year, prop) %>% - ungroup() -tail(own_cat) - -# base years -# WHY not in previous pipe? The previous tibble will be used later for plotting -own_base <- filter(own_cat, (year >= own_base_begin) & (year <= own_base_end)) - -# prediction -own_pred <- con_reg( - data = own_base, x = "year", y = "prop", - group_cols = "district", - window = own_window_thres, base_t0 = own_base_begin, - scen_t0 = scen_begin, scen_t1 = scen_end, - prop_trend = own_prop_trend, thres_percent = own_thres_percent, - lower_thres = own_lower_thres, upper_thres = own_upper_thres -) - -# past and prediction -own_past_pred <- as_tibble(expand_grid( - district = uni_d, - year = (min(own_cat$year)):scen_end -)) %>% - left_join(own_cat, by = c("district", "year")) %>% - left_join(select(own_pred, district, year, pred_roll), - by = c("district", "year") - ) %>% - mutate(own_all = if_else(year < scen_begin, prop, pred_roll)) - -# plot 1201 - -# export the results ------------------------------------------------------ - -# data of past and future -# WHY? to calculate population (by ownership) in the past -# since the people in the open data dataset (with ownership) -# is only people in apartments - -# export data -own_ex_data <- mutate(own_past_pred, prop = round(own_all, round_prop)) %>% - select(district, year, prop) %>% - arrange(district, year) - -# export -write_csv(own_ex_data, paste0(exp_path, "/ownership_past_future.csv")) - -# log info -cat_log(paste0( - "ownership: ", - capture.output(Sys.time() - t0) -)) diff --git a/1_Code/1300_Housing-Model/1300_housing-model.r b/1_Code/1300_Housing-Model/1300_housing-model.r index e9229e98..2ef3ce6b 100644 --- a/1_Code/1300_Housing-Model/1300_housing-model.r +++ b/1_Code/1300_Housing-Model/1300_housing-model.r @@ -17,21 +17,40 @@ pro_dat <- read_csv(paste0(exp_path, "/projects_future.csv"), lazy = FALSE) # allocation (persons per apartment, dyw) aca_dat <- read_csv(paste0(exp_path, "/allocation_future.csv"), lazy = FALSE) -# capacity/reserves (m2, dyw) +# car_dat car_dat <- read_csv(paste0(exp_path, "/usage_area.csv"), lazy = FALSE) # living space (m2 per person, dyw) spa_dat <- read_csv(paste0(exp_path, "/living-space_future.csv"), lazy = FALSE) -# ownership (% cooperative housing) -own_dat <- read_csv(paste0(exp_path, "/ownership_past_future.csv"), lazy = FALSE) +# ownership (proportion of people living in cooperative housing, past) +own_dat <- read_csv(spa_od) %>% + rename(year = StichtagDatJahr, apartments = AnzWhgStat, people = AnzBestWir) %>% + left_join(look_dis, by = "QuarCd") %>% + mutate( + owner = fact_if(EigentuemerSSZPubl3Cd_noDM, uni_w), + district = factor(distr, uni_d) + ) %>% + select(year, district, owner, people) %>% + group_by(district, year, owner) %>% + summarize( + people = sum_NA(people), + .groups = "drop") %>% + group_by(district, year) %>% + mutate( + prop = round(people / sum_NA(people) * 100, round_prop), + .groups = "drop" + ) %>% + filter(owner == uni_w[1]) %>% + select(district, year, prop) # population # why population not from the housing open data file? -# there only people in apartments (and not in care centers etc) +# this file only contains people in apartments (and not in care centers etc) # the population number in the housing open data is below the total # amount of people in Zurich +# dy (past years) pop <- read_csv(pop_od, lazy = FALSE) %>% rename(year = StichtagDatJahr, pop = AnzBestWir) %>% left_join(look_dis, by = "QuarCd") %>% @@ -45,7 +64,9 @@ pop <- read_csv(pop_od, lazy = FALSE) %>% # projects and allocation (from apartments to people; future) ------------- -# calculate amount of people +# calculate amount of people from +# - projects 'pro' (num of apartments) +# - allocation 'aca' (number of pop per apartment) pro_aca <- left_join(pro_dat, aca_dat, by = c("district", "year", "owner") ) %>% @@ -53,14 +74,14 @@ pro_aca <- left_join(pro_dat, aca_dat, select(district, year, owner, indicator, people) %>% pivot_wider(names_from = indicator, values_from = people) -# if additional information is available on new projects (e.g. amount of people) -# this could be incorporated here - # capacity/reserves and living space (from m2 to people; future) ---------- # combine: calculate amount of people # units: ha * 10,000 m2/ha / (m2/person) = person +# calculate amount of people from ... +# - capacity 'car' (area) +# - living space 'spa' (area consumption) car_spa <- left_join(car_dat, spa_dat, by = c("district", "year", "owner") ) %>% @@ -70,6 +91,7 @@ car_spa <- left_join(car_dat, spa_dat, # population by ownership (past) ------------------------------------------ # join pop on ownership (since this data set begins later) +# OUT: population of past year per ownership > this ownership information is still necessary pop_w <- left_join(own_dat, pop, by = c("district", "year")) %>% filter(year <= date_end) %>% mutate( @@ -83,15 +105,16 @@ pop_w <- left_join(own_dat, pop, by = c("district", "year")) %>% mutate(owner = fact_if(owner_text, uni_w, "cooperative")) %>% select(district, year, owner, pop) -# last year of data -pop_last <- filter(pop_w, year == date_end) +# last year of data +pop_last <- pop_w %>% + ungroup() %>% + filter(year == date_end) # combine: capacity/reserves and ownership prediction --------------------- # proportion of cooperative housing according to capacity/reserves # capacity/reserves contains only people due to additional (!) yearly (!) usage of reserves # therefore, add the cumulative values to the past population - pop_total <- car_spa %>% arrange(district, owner, year) %>% group_by(district, owner) %>% @@ -104,58 +127,27 @@ pop_total <- car_spa %>% select(district, year, owner, total) %>% rename(pop = total) -# with past (for plot) -# why? for plotting -# why a plot? to check if capacity/reserves population values are... -# ...meaningful in comparison to the past - +# row-binding past_pop and pop_total (which is today's pop + cumulative car_spa) +# Why doing so? +# For plotting reasons, to for plotting to check if capacity/reserves population +# values are meaningful in comparison to the past pop_with_past <- bind_rows(pop_w, pop_total) %>% rename(distr = district) %>% mutate(district = factor(distr, uni_d)) %>% select(district, year, owner, pop) -# plot 1300 - -# proportion cooperative housing (according to capacity/reserves vs. district trends) -prop_coop <- pop_with_past %>% - mutate(simple = if_else(owner == uni_w[1], "cooperative", "private")) %>% - select(-owner) %>% - pivot_wider(names_from = simple, values_from = pop) %>% - mutate(prop_car = cooperative / (cooperative + private) * 100) %>% - select(district, year, prop_car) %>% - left_join(own_dat, by = c("district", "year")) %>% - rename(prop_trend = prop) - -# plot 1301 - -# new proportion of cooperative housing; apply the parameter (% from capacity/reserves) -new_prop <- prop_coop %>% - mutate(prop = prop_car * car_coop / 100 + prop_trend * (1 - car_coop / 100)) %>% - filter(year >= scen_begin) %>% - select(district, year, prop) -# apply the new proportion +# factorize and subset - form final output tibble new_pop_car <- pop_total %>% - group_by(district, year) %>% - summarize(pop = sum(pop), - .groups = "drop") %>% - left_join(new_prop, by = c("district", "year")) %>% - mutate( - pop_cooperative = pop * prop / 100, - pop_private = pop * (1 - prop / 100) - ) %>% - select(-c(pop, prop)) %>% - pivot_longer( - cols = c("pop_cooperative", "pop_private"), - names_prefix = "pop_", - names_to = "category", values_to = "car" - ) %>% - mutate(owner = if_else(category == "cooperative", uni_w[1], uni_w[2])) %>% - select(district, year, owner, car) + mutate(owner = if_else(owner == "cooperative housing", uni_w[1], uni_w[2])) %>% + select(district, year, owner, pop) %>% + mutate(car = pop) %>% + select(-pop) # combine: projects and capacity (with new prop of cooperative) ----------- -# combine +# Combining all prepared data in one tibble +# dyo with pop (current year), new, removed and car (from capacity) pro_car <- as_tibble(expand_grid( district = uni_d, year = date_end:scen_end, @@ -246,17 +238,30 @@ project_reserves <- function(x, ...) { } -# Check -x <- filter(pro_car, (district == "Escher Wyss") & (owner == "private housing")) -plot(x$year, x$car, type = "o") -project_reserves(x) - # consider projects and reserves (apply the function) pro_res_all <- pro_car %>% group_split(district, owner) %>% map(project_reserves) %>% bind_rows() +# check: car vs. car/projects +car_pop_y <- new_pop_car |> + left_join(pro_res_all, by = c("district", "year", "owner")) |> + group_by(year) |> + summarize(car = sum(car), + pop = sum(pop), .groups = "drop") |> + mutate(diff = pop - car) + +tail(car_pop_y) + +ggplot(car_pop_y) + + geom_line(aes(x = year, y = diff)) + + + + + + # apply the parameter of empty apartments --------------------------------- # parameter can be applied directly to the population @@ -295,11 +300,13 @@ pop_all <- pop_fut_past %>% # plots 1305, 1306, 1307, 1308, 1309: compare projects and reserves + + + # export the results ------------------------------------------------------ # per district and ownership -write_csv(pop_fut_past %>% arrange(district, year, owner), - paste0(exp_path, "/housing_model_population_dw")) +write_csv(pop_fut_past %>% arrange(district, year, owner),paste0(exp_path, "/housing_model_population_dw.csv")) # per district ex_data_d <- arrange(pop_d, district, year) @@ -314,4 +321,4 @@ write_csv(ex_data_all, paste0(exp_path, "/housing-model_population_all.csv")) cat_log(paste0( "housing model: ", capture.output(Sys.time() - t0) -)) +)) \ No newline at end of file diff --git a/1_Code/1400_Demography-Housing/1400_demography-housing.r b/1_Code/1400_Demography-Housing/1400_demography-housing.r index d42cb018..de72bf88 100644 --- a/1_Code/1400_Demography-Housing/1400_demography-housing.r +++ b/1_Code/1400_Demography-Housing/1400_demography-housing.r @@ -151,7 +151,7 @@ out_pop_smooth <- NULL # WHY? for smoothing checks # loop over years for (iyear in future) { - # iyear <- 2022 + # iyear <- 2024 # population at the begin of the year = population at the end of the previous year if (iyear == min(future)) { @@ -161,27 +161,27 @@ for (iyear in future) { } # births (fertility rate * women in the population) - bir_do <- fer %>% + bir_dao <- fer %>% filter(year == iyear) %>% left_join(popu, by = c("district", "age", "sex", "origin")) %>% replace_na(list(fer = 0, pop = 0)) %>% - mutate(bir = pop * fer / 100) %>% - group_by(district, origin) %>% + mutate(bir = pop * fer / 100) |> + group_by(district, age, origin) %>% summarize(bir = sum(bir), .groups = "drop") - # sum(bir_do$bir) + # sum(bir_dao$bir) # births: origin changes (from mother to baby) - bir_do_new <- cha %>% + bir_dao_new <- cha %>% filter(year == iyear) %>% select(-year) %>% - right_join(bir_do, by = c("district", "origin")) %>% + right_join(bir_dao, by = c("district", "origin")) %>% mutate( change = bir * cha / 100, keep = bir - change ) %>% - select(district, origin, change, keep) %>% + select(district, age, origin, change, keep) %>% pivot_longer( cols = c("change", "keep"), names_to = "category", values_to = "bir" @@ -191,11 +191,15 @@ for (iyear in future) { origin == uni_o[1] ~ uni_o[2], TRUE ~ uni_o[1] )) %>% - select(district, new_origin, bir) %>% + select(district, age, new_origin, bir) %>% rename(origin = new_origin) %>% - group_by(district, origin) %>% + group_by(district, age, origin) %>% summarize(bir = sum(bir), - .groups = "drop") + .groups = "drop") |> + rename(age_mother = age) + + # sum(bir_dao_new$bir) + # births: with variable 'sex' @@ -205,7 +209,7 @@ for (iyear in future) { pro_male_value <- filter(pro_male, year == iyear) - bir <- bir_do_new %>% + bir_temp <- bir_dao_new %>% mutate( pro_male = pro_male_value$pro_male, male = bir * pro_male / 100, @@ -220,13 +224,27 @@ for (iyear in future) { age = -1, sex = factor(sex, levels = uni_s) ) %>% - select(district, age, sex, origin, bir) %>% - arrange(district, sex, origin) + select(district, age, age_mother, sex, origin, bir) - # sum(bir_do$bir) - # sum(bir_do_new$bir) - # sum(bir$bir) + # birth with age of the mother (used for TFR) + bir_age_mother <- bir_temp |> + select(district, age_mother, sex, origin, bir) |> + arrange(district, age_mother, sex, origin) + + # birth without the age of the mother (used in this model) + bir <- bir_temp |> + select(-age_mother) |> + group_by(district, age, sex, origin) %>% + summarize(bir = sum(bir), + .groups = "drop") |> + arrange(district, sex, origin) + + # sum(bir_dao$bir) + # sum(bir_dao_new$bir) + # sum(bir_age_mother$bir) + # sum(bir$bir) + # deaths (mortality rate * population) dea <- mor %>% filter(year == iyear) %>% @@ -494,9 +512,9 @@ for (iyear in future) { select(-pop_end_year) # outputs: birth (separate, since no 'age' variable), with variable 'year' - out_bir <- bir %>% + out_bir <- bir_age_mother %>% mutate(year = iyear) %>% - select(district, year, sex, origin, bir) %>% + select(district, year, age_mother, sex, origin, bir) %>% bind_rows(out_bir) # outputs: demographic processes, with variable 'year' @@ -563,7 +581,7 @@ out_bal %>% # births out_bir %>% - arrange(district, year, sex, origin) %>% + arrange(district, year, age_mother, sex, origin) %>% write_csv(paste0(out_path, "/births_future.csv")) # demographic processes diff --git a/1_Code/1500_Model/1501_model_outputs.r b/1_Code/1500_Model/1501_model_outputs.r index 3e203580..d3a35f1f 100644 --- a/1_Code/1500_Model/1501_model_outputs.r +++ b/1_Code/1500_Model/1501_model_outputs.r @@ -29,19 +29,20 @@ pop_past <- read_csv(pop_od) %>% # births bir_past <- read_csv(bir_od) %>% - rename(year = EreignisDatJahr, bir = AnzGebuWir) %>% + rename(year = EreignisDatJahr, age_mother = AlterVMutterCd, bir = AnzGebuWir) %>% left_join(look_dis, by = "QuarCd") %>% mutate( district = factor(distr, uni_d), sex = fact_if(SexCd, uni_s), origin = fact_if(HerkunftCd, uni_o) ) %>% - select(district, year, sex, origin, bir) %>% - group_by(district, year, sex, origin) %>% + select(district, year, age_mother, sex, origin, bir) %>% + group_by(district, year, age_mother, sex, origin) %>% summarize(bir = sum(bir), .groups = "drop") %>% mutate(scenario = uni_c[1]) + # deaths dea_past <- read_csv(dea_od) %>% rename(year = EreignisDatJahr, age = AlterVCd, dea = AnzSterWir) %>% @@ -153,6 +154,7 @@ sce <- read_csv(sce_od) %>% summarize(pop = sum(pop), .groups = "drop") + # data import: future (lower, middle, upper scenario) --------------------- # population @@ -165,6 +167,16 @@ pop_middle <- read_csv(paste0(data_path, "5_Outputs/middle/population_future.csv pop_upper <- read_csv(paste0(data_path, "5_Outputs/upper/population_future.csv")) %>% mutate(scenario = uni_c[4]) + +# population for birth versions +pop_middle_birth_lower <- read_csv(paste0(data_path, "5_Outputs/middle_birth_lower/population_future.csv")) %>% + mutate(scenario = uni_cb[2]) + +pop_middle_birth_upper <- read_csv(paste0(data_path, "5_Outputs/middle_birth_upper/population_future.csv")) %>% + mutate(scenario = uni_cb[4]) + + + # births bir_lower <- read_csv(paste0(data_path, "5_Outputs/lower/births_future.csv")) %>% mutate(scenario = uni_c[2]) @@ -175,6 +187,15 @@ bir_middle <- read_csv(paste0(data_path, "5_Outputs/middle/births_future.csv")) bir_upper <- read_csv(paste0(data_path, "5_Outputs/upper/births_future.csv")) %>% mutate(scenario = uni_c[4]) + +# births for birth versions +bir_middle_birth_lower <- read_csv(paste0(data_path, "5_Outputs/middle_birth_lower/births_future.csv")) %>% + mutate(scenario = uni_cb[2]) + +bir_middle_birth_upper <- read_csv(paste0(data_path, "5_Outputs/middle_birth_upper/births_future.csv")) %>% + mutate(scenario = uni_cb[4]) + + # demographic processes dem_lower <- read_csv(paste0(data_path, "5_Outputs/lower/demographic-processes_future.csv")) %>% mutate(scenario = uni_c[2]) @@ -203,9 +224,9 @@ nat_future <- nat_lower %>% bind_rows(nat_middle) %>% bind_rows(nat_upper) -# # population -------------------------------------------------------------- -# -# past and future +# population -------------------------------------------------------------- + +# past and future (scenarios) pop <- pop_past %>% bind_rows(pop_lower) %>% bind_rows(pop_middle) %>% @@ -216,6 +237,19 @@ pop <- pop_past %>% origin = factor(origin, levels = uni_o) ) +# past and future (birth versions) +pop_birth_versions <- pop_past %>% + bind_rows(pop_middle_birth_lower) %>% + bind_rows(pop_middle) %>% + bind_rows(pop_middle_birth_upper) %>% + mutate( + district = factor(district, uni_d), + sex = factor(sex, levels = uni_s), + origin = factor(origin, levels = uni_o) + ) + + + # selected years (e.g. for population pyramids) y_sel1 <- c(date_end, scen_end_public) y_sel2 <- c(date_end, rev(seq(scen_end, scen_begin, by = -10))) @@ -326,6 +360,26 @@ text_pop_dy_prep %>% # plot 1509 +# population (children) for the scenarios +pop_yac_children <- pop |> + filter(age < age_5[3]) |> + left_join(look_a5, by = "age") |> + group_by(year, scenario, age_5) |> + summarize(pop = sum_NA(pop), .groups = "drop") + +# plot 1509a + +# population (children) for the birth versions +pop_yav_children <- pop_birth_versions |> + filter(age < age_5[3]) |> + mutate(scenario = factor(scenario, levels = uni_cb)) |> + left_join(look_a5, by = "age") |> + group_by(year, scenario, age_5) |> + summarize(pop = sum_NA(pop), .groups = "drop") + +# plot 1509b + + # population: new and previous scenarios ---------------------------------- # total population diff --git a/1_Code/1500_Model/1503_output_dwh.r b/1_Code/1500_Model/1503_output_dwh.r index 3e14a0e2..1f116ebf 100644 --- a/1_Code/1500_Model/1503_output_dwh.r +++ b/1_Code/1500_Model/1503_output_dwh.r @@ -11,16 +11,6 @@ params <- init("middle") dwh_path <- paste0(data_path, "7_DWH/") dir_ex_create(dwh_path) -# population data --------------------------------------------------------- - -# get list of model output files as input data for DWH -files_output <- paste0(paste0(data_path, "5_Outputs/"), - list.files(path = paste0(data_path, "5_Outputs/"), recursive = TRUE)) - -# read birth data and adapt structure ------------------------------------- - -dwh_path <- paste0(data_path, "7_DWH/") -dir_ex_create(dwh_path) # population data --------------------------------------------------------- @@ -35,7 +25,7 @@ bir_past <- read_csv(bir_od, lazy = FALSE) %>% left_join(look_dis, by = "QuarCd") %>% rename("Jahr" = EreignisDatJahr, "district" = distr) %>% - mutate(BasisSzenarienCd = basis_fact, # de facto value from past + mutate(BasisSzenarienCd = 1, # de facto value from past AlterVCd = 0) %>% group_by(Jahr, SexCd, @@ -48,19 +38,37 @@ bir_past <- read_csv(bir_od, lazy = FALSE) %>% # scenario data read_files <- files_output[str_detect(files_output, "births_future")] -stop_3(read_files) +stop_5(read_files) + +# VersionArtCd (in all publication years) +# 1: lower scenario +# 2: middle scenario +# 3: upper scenario + +# VersionArtCd (as of publication year 2024) +# 4: lower birth version +# 5: upper birth versions births <- - # lower scenario (VersionArtCd = 1) + # lower scenario read_csv(read_files[1], lazy = FALSE) %>% mutate(VersionArtCd = 1) %>% # middle scenario bind_rows(read_csv(read_files[2], lazy = FALSE) %>% mutate(VersionArtCd = 2)) %>% # upper scenario - bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + bind_rows(read_csv(read_files[5], lazy = FALSE) %>% mutate(VersionArtCd = 3)) %>% - mutate(BasisSzenarienCd = basis_scen, # calculated scenario value + # lower birth version + bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + mutate(VersionArtCd = 4)) %>% + # upper birth version + bind_rows(read_csv(read_files[4], lazy = FALSE) %>% + mutate(VersionArtCd = 5)) %>% + # aggregate (without age of mother) + group_by(district, year, sex, origin, VersionArtCd) %>% + summarize(bir = sum_NA(bir), groups. = "drop") %>% + mutate(BasisSzenarienCd = 2, # calculated scenario value AlterVCd = 0) %>% # get codes instead of text left_join(tibble(sex = levels(uni_s), @@ -76,9 +84,14 @@ births <- mutate(VersionArtCd = 2)) %>% bind_rows(bir_past %>% mutate(VersionArtCd = 3)) %>% + bind_rows(bir_past %>% + mutate(VersionArtCd = 4)) %>% + bind_rows(bir_past %>% + mutate(VersionArtCd = 5)) %>% select(Jahr, BasisSzenarienCd, VersionArtCd, AlterVCd, SexCd, HerkunftCd, district, AnzGebuWir) + # read population data and adapt structure -------------------------------- # past data @@ -86,7 +99,7 @@ pop_past <- read_csv(pop_od, lazy = FALSE) %>% left_join(look_dis, by = "QuarCd") %>% rename("Jahr" = StichtagDatJahr, "district" = distr) %>% - mutate(BasisSzenarienCd = basis_fact) %>% + mutate(BasisSzenarienCd = 1) %>% group_by(Jahr, AlterVCd, SexCd, @@ -98,7 +111,7 @@ pop_past <- read_csv(pop_od, lazy = FALSE) %>% #scenario data read_files <- files_output[str_detect(files_output, "population_future")] -stop_3(read_files) +stop_5(read_files) pop <- # lower scenario @@ -108,9 +121,15 @@ pop <- bind_rows(read_csv(read_files[2], lazy = FALSE) %>% mutate(VersionArtCd = 2)) %>% # upper scenario - bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + bind_rows(read_csv(read_files[5], lazy = FALSE) %>% mutate(VersionArtCd = 3)) %>% - mutate(BasisSzenarienCd = basis_scen) %>% + # lower birth version + bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + mutate(VersionArtCd = 4)) %>% + # upper birth version + bind_rows(read_csv(read_files[4], lazy = FALSE) %>% + mutate(VersionArtCd = 5)) %>% + mutate(BasisSzenarienCd = 2) %>% # get codes instead of text left_join(tibble(sex = levels(uni_s), SexCd = as.numeric(labels(uni_s)))) %>% @@ -126,6 +145,10 @@ pop <- mutate(VersionArtCd = 2)) %>% bind_rows(pop_past %>% mutate(VersionArtCd = 3)) %>% + bind_rows(pop_past %>% + mutate(VersionArtCd = 4)) %>% + bind_rows(pop_past %>% + mutate(VersionArtCd = 5)) %>% select(Jahr, BasisSzenarienCd, VersionArtCd, AlterVCd, SexCd, HerkunftCd, district, AnzBestWir) @@ -137,7 +160,7 @@ nat_past <- read_csv(nat_od, lazy = FALSE) %>% left_join(look_dis, by = "QuarCd") %>% rename("Jahr" = EreignisDatJahr, "district" = distr) %>% - mutate(BasisSzenarienCd = basis_fact) %>% + mutate(BasisSzenarienCd = 1) %>% group_by(Jahr, AlterVCd, SexCd, @@ -149,7 +172,7 @@ nat_past <- read_csv(nat_od, lazy = FALSE) %>% # scenario data read_files <- files_output[str_detect(files_output, "naturalization_future")] -stop_3(read_files) +stop_5(read_files) nat <- # lower scenario @@ -159,9 +182,15 @@ nat <- bind_rows(read_csv(read_files[2], lazy = FALSE) %>% mutate(VersionArtCd = 2)) %>% # upper scenario - bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + bind_rows(read_csv(read_files[5], lazy = FALSE) %>% mutate(VersionArtCd = 3)) %>% - mutate(BasisSzenarienCd = basis_scen, + # lower birth version + bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + mutate(VersionArtCd = 4)) %>% + # upper birth version + bind_rows(read_csv(read_files[4], lazy = FALSE) %>% + mutate(VersionArtCd = 5)) %>% + mutate(BasisSzenarienCd = 2, HerkunftCd = 1) %>% # get codes instead of text left_join(tibble(sex = levels(uni_s), @@ -176,6 +205,10 @@ nat <- mutate(VersionArtCd = 2)) %>% bind_rows(nat_past %>% mutate(VersionArtCd = 3)) %>% + bind_rows(nat_past %>% + mutate(VersionArtCd = 4)) %>% + bind_rows(nat_past %>% + mutate(VersionArtCd = 5)) %>% select(Jahr, BasisSzenarienCd, VersionArtCd, AlterVCd, SexCd, HerkunftCd, district, AnzEinbWir) @@ -193,7 +226,7 @@ demo_past <- read_csv(dea_od, lazy = FALSE) %>% left_join(look_dis, by = "QuarCd") %>% rename("Jahr" = EreignisDatJahr, "district" = distr) %>% - mutate(BasisSzenarienCd = basis_fact) %>% + mutate(BasisSzenarienCd = 1) %>% group_by(Jahr, AlterVCd, SexCd, @@ -207,7 +240,7 @@ demo_past <- read_csv(dea_od, lazy = FALSE) %>% # scenario data read_files <- files_output[str_detect(files_output, "demographic")] -stop_3(read_files) +stop_5(read_files) demo <- # lower scenario @@ -217,9 +250,15 @@ demo <- bind_rows(read_csv(read_files[2], lazy = FALSE) %>% mutate(VersionArtCd = 2)) %>% # upper scenario - bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + bind_rows(read_csv(read_files[5], lazy = FALSE) %>% mutate(VersionArtCd = 3)) %>% - mutate(BasisSzenarienCd = basis_scen) %>% + # lower birth version + bind_rows(read_csv(read_files[3], lazy = FALSE) %>% + mutate(VersionArtCd = 4)) %>% + # upper birth version + bind_rows(read_csv(read_files[4], lazy = FALSE) %>% + mutate(VersionArtCd = 5)) %>% + mutate(BasisSzenarienCd = 2) %>% # get codes instead of text left_join(tibble(sex = levels(uni_s), SexCd = as.numeric(labels(uni_s)))) %>% @@ -237,6 +276,10 @@ demo <- mutate(VersionArtCd = 2)) %>% bind_rows(demo_past %>% mutate(VersionArtCd = 3)) %>% + bind_rows(demo_past %>% + mutate(VersionArtCd = 4)) %>% + bind_rows(demo_past %>% + mutate(VersionArtCd = 5)) %>% select(Jahr, BasisSzenarienCd, VersionArtCd, AlterVCd, SexCd, HerkunftCd, district, AnzZuzuWir, AnzWezuWir, AnzSterWir) @@ -354,38 +397,51 @@ files_rate <- paste0(paste0(data_path, "4_Rates/"), # consumption rate read_files <- files_rate[str_detect(files_rate, "living-space_future")] -stop_3(read_files) +stop_5(read_files) consumption <- read_csv(read_files[1]) %>% mutate(VersionArtCd = 1) %>% add_row(read_csv(read_files[2]) %>% mutate(VersionArtCd = 2)) %>% - add_row(read_csv(read_files[3]) %>% + add_row(read_csv(read_files[5]) %>% mutate(VersionArtCd = 3)) %>% + add_row(read_csv(read_files[3]) %>% + mutate(VersionArtCd = 4)) %>% + add_row(read_csv(read_files[4]) %>% + mutate(VersionArtCd = 5)) %>% rename(WohnungsflProPers = spa_dyw) # occupancy rate read_files <- files_rate[str_detect(files_rate, "allocation_future")] -stop_3(read_files) +stop_5(read_files) occupancy <- read_csv(read_files[1]) %>% mutate(VersionArtCd = 1) %>% add_row(read_csv(read_files[2]) %>% mutate(VersionArtCd = 2)) %>% - add_row(read_csv(read_files[3]) %>% + add_row(read_csv(read_files[5]) %>% mutate(VersionArtCd = 3)) %>% + add_row(read_csv(read_files[3]) %>% + mutate(VersionArtCd = 4)) %>% + add_row(read_csv(read_files[4]) %>% + mutate(VersionArtCd = 5)) %>% rename(PersProWhg = aca_dyw) # population data (needed for calculation of area and apartments) read_files <- files_rate[str_detect(files_rate, "housing_model_population_dw")] -stop_3(read_files) +stop_5(read_files) pop_dw <- read_csv(read_files[1]) %>% mutate(VersionArtCd = 1) %>% add_row(read_csv(read_files[2]) %>% mutate(VersionArtCd = 2)) %>% - add_row(read_csv(read_files[3]) %>% + add_row(read_csv(read_files[5]) %>% mutate(VersionArtCd = 3)) + add_row(read_csv(read_files[3]) %>% + mutate(VersionArtCd = 4)) + add_row(read_csv(read_files[4]) %>% + mutate(VersionArtCd = 5)) + # area data join_cond <- c("year", "VersionArtCd", "district", "owner") @@ -402,29 +458,21 @@ apartments <- occupancy %>% consumption %>% sszplot(aes_x = "year", aes_y = "WohnungsflProPers", aes_col = "VersionArtCd", aes_ltyp = "owner", labs_x = "year", labs_y = "m2/person", labs_col = "Scenario", - quotes = quote(scale_color_manual(labels = c("lower", "middle", "upper"), - values = c("blue", "green", "red"))), wrap = "district") occupancy %>% sszplot(aes_x = "year", aes_y = "PersProWhg ", aes_col = "VersionArtCd", aes_ltyp = "owner", labs_x = "year", labs_y = "persons/apartment", - quotes = quote(scale_color_manual(labels = c("lower", "middle", "upper"), - values = c("blue", "green", "red"))), wrap = "district") area %>% sszplot(aes_x = "year", aes_y = "BruttoGeschFlaeche ", aes_col = "VersionArtCd", aes_ltyp = "owner", labs_x = "year", labs_y = "area (ha)", - quotes = quote(scale_color_manual(labels = c("lower", "middle", "upper"), - values = c("blue", "green", "red"))), wrap = "district") apartments %>% sszplot(aes_x = "year", aes_y = "AnzWhgStat ", aes_col = "VersionArtCd", aes_ltyp = "owner", labs_x = "year", labs_y = "apartments", - quotes = quote(scale_color_manual(labels = c("lower", "middle", "upper"), - values = c("blue", "green", "red"))), wrap = "district") # combine datasets and write output @@ -433,7 +481,7 @@ area %>% left_join(look_reg, by = "district") %>% left_join(look_own, by = "owner") %>% rename(Jahr = year) %>% - mutate(BasisSzenarienCd = if_else(Jahr < scen_begin, basis_fact, basis_scen), # calculated scenario value + mutate(BasisSzenarienCd = if_else(Jahr < scen_begin, 1, 2), # calculated scenario value PublJahr = scen_begin, QuarCd = distnum) %>% mutate(BruttoGeschFlaeche = round(BruttoGeschFlaeche, round_rate), diff --git a/2_Data/3_Parameter/parameter.csv b/2_Data/3_Parameter/parameter.csv index a87dd3bf..77ba07a6 100644 --- a/2_Data/3_Parameter/parameter.csv +++ b/2_Data/3_Parameter/parameter.csv @@ -1,202 +1,196 @@ -category;parameter;parameter_old;lower;middle;upper;unit;relevance;description -time;date_start;daten.beginn;1993;1993;1993;year;no parameter (strictly speaking);begin of data -time;date_end;daten.ende;2022;2022;2022;year;no parameter (strictly speaking);end of data -time;scen_begin;szen.beginn;2023;2023;2023;year;no parameter (strictly speaking);future: begin -time;scen_end;szen.ende;2050;2050;2050;year;no parameter (strictly speaking);future: end -time;scen_end_public;no parameter in previous model;2045;2045;2045;year;no parameter (strictly speaking);future: end (in publication) -time;bir_base_begin;geb.basis.beginn;2010;2010;2010;year;medium;base period (in the past) for birth rate, begin -time;bir_base_end;geb.basis.ende;2022;2022;2022;year;medium;base period (in the past) for birth rate, end -time;bir_cha_base_begin;no parameter in previous model;2007;2007;2007;year;low;base period (in the past) for origin change (mother-baby), begin -time;bir_cha_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (in the past) for origin change (mother-baby), end -time;bir_sex_ratio_begin;no parameter in previous model;1993;1993;1993;year;low;base period (in the past) for sex ratio calculation, begin -time;bir_sex_ratio_end;no parameter in previous model;2022;2022;2022;year;low;base period (in the past) for sex ratio calculation, begin -time;dea_fso_date_start;no parameter in previous model;1993;1993;1993;year;low;fso mortality data of the past: begin -time;dea_fso_date_end;no parameter in previous model;2021;2021;2021;year;low;fso mortality data of the past: end -time;dea_base_begin;tod.basis.beginn;2012;2012;2012;year;low;base period (in the past) for death rate, begin (data should be available for both Zurich and Switzerland) -time;dea_base_end;tod.basis.ende;2021;2021;2021;year;low;base period (in the past) for death rate, end (data should be available for both Zurich and Switzerland) -time;ims_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for immigration* rate, begin -time;ims_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for immigration* rate, end -time;ims_so_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of sex and origin in immigration*, begin -time;ims_so_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of sex and origin in immigration*, end -time;ims_age_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of age in immigration*, begin -time;ims_age_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of age in immigration*, end -time;ems_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for emigration* rate, begin -time;ems_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for emigration* rate, end -time;ems_so_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of sex and origin in emigration*, begin -time;ems_so_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of sex and origin in emigration*, end -time;ems_age_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of age in emigration*, begin -time;ems_age_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of age in emigration*, end -time;rei_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for relocation based on immigration* (proportion), begin -time;rei_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for relocation based on immigration* (proportion), end -time;ree_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for relocation based on emigration* (proportion), begin -time;ree_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for relocation based on emigration* (proportion), end -time;nat_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for naturalization, begin -time;nat_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for naturalization, end -time;spa_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for living space, begin -time;spa_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for living space, end -time;spa_base_begin_52p;no parameter in previous model;2015;2015;2015;year;low;"base period (not the future) for living space, begin, district 'Escher Wyss' (district ID = 52; since empty apartments increased the mean living space values; before 2015)" -time;aca_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for allocation, begin -time;aca_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for allocation, end -time;aca_base_begin_52p;no parameter in previous model;2015;2015;2015;year;low;"base period (not the future) for allocation, begin, district 'Escher Wyss' (district ID = 52; since empty apartments decreased the mean allocation values; before 2015)" -time;pro_begin;map.wohnbau.beginn;2023;2023;2023;year;low;"first year (of consolidated project list; reasonable: first scenario year)" -time;pro_end;map.wohnbau.ende;2035;2035;2035;year;low;last year (of consolidated project list) -time;own_base_begin;no parameter in previous model;2015;2015;2015;year;low;base period (not the future) for ownership calculation, begin -time;own_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for ownership calculation, end -age;age_min;no parameter in previous model;0;0;0;years (age);low;minimum age in the model -age;age_max;no parameter in previous model;120;120;120;years (age);low;maximum age in the model (should be clearly higher than maximum age in the population) -general;round_rate;no parameter in previous model;4;4;4;digits (rate in percent per year);no parameter;rounding of rates (digits, rate in percent per year) -general;round_prop;no parameter in previous model;4;4;4;digits (proportion in percent);no parameter;rounding of proportion (digits, proportion in percent) -general;round_area;no parameter in previous model;4;4;4;digits (area);no parameter;rounding of area (e.g. ha in the capacity and reserve module) -general;round_people;no parameter in previous model;0;0;0;digits (people);no parameter;rounding of people -general;round_aca;no parameter in previous model;4;4;4;digits (people per apartment);no parameter;rounding of allocation (people per apartment) -general;round_people_scen;no parameter in previous model;100;100;100;people (not digits);no parameter;"rounding of people (for future values; scenarios)" -general;round_prop_scen;no parameter in previous model;0;0;0;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios)" -general;round_prop_scen_a;no parameter in previous model;1;1;1;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios): comparison to previous scenarios by age" -birth;bir_age_begin;geb.alter.beginn;15;15;15;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): begin -birth;bir_age_end;geb.alter.ende;49;49;49;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): end -birth;bir_thres_origin;geb.anz.rate.heimat;100;100;100;persons;low;"age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the rate based on origin (but not district) is used. +category;parameter;parameter_old;lower;middle;middle_birth_lower;middle_birth_upper;upper;unit;relevance;description +time;date_start;daten.beginn;1993;1993;1993;1993;1993;year;no parameter (strictly speaking);begin of data +time;date_end;daten.ende;2023;2023;2023;2023;2023;year;no parameter (strictly speaking);end of data +time;scen_begin;szen.beginn;2024;2024;2024;2024;2024;year;no parameter (strictly speaking);future: begin +time;scen_end;szen.ende;2050;2050;2050;2050;2050;year;no parameter (strictly speaking);future: end +time;scen_end_public;no parameter in previous model;2045;2045;2045;2045;2045;year;no parameter (strictly speaking);future: end (in publication) +time;bir_base_begin;geb.basis.beginn;2022;2022;2022;2022;2022;year;medium;base period (in the past) for birth rate, begin +time;bir_base_end;geb.basis.ende;2023;2023;2023;2023;2023;year;medium;base period (in the past) for birth rate, end +time;bir_cha_base_begin;no parameter in previous model;2007;2007;2007;2007;2007;year;low;base period (in the past) for origin change (mother-baby), begin +time;bir_cha_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (in the past) for origin change (mother-baby), end +time;bir_sex_ratio_begin;no parameter in previous model;1993;1993;1993;1993;1993;year;low;base period (in the past) for sex ratio calculation, begin +time;bir_sex_ratio_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (in the past) for sex ratio calculation, begin +time;dea_fso_date_start;no parameter in previous model;1993;1993;1993;1993;1993;year;low;fso mortality data of the past: begin +time;dea_fso_date_end;no parameter in previous model;2022;2022;2022;2022;2022;year;low;fso mortality data of the past: end +time;dea_base_begin;tod.basis.beginn;2013;2013;2013;2013;2013;year;low;base period (in the past) for death rate, begin (data should be available for both Zurich and Switzerland) +time;dea_base_end;tod.basis.ende;2022;2022;2022;2022;2022;year;low;base period (in the past) for death rate, end (data should be available for both Zurich and Switzerland) +time;ims_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for immigration* rate, begin +time;ims_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for immigration* rate, end +time;ims_so_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for proportion of sex and origin in immigration*, begin +time;ims_so_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for proportion of sex and origin in immigration*, end +time;ims_age_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for proportion of age in immigration*, begin +time;ims_age_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for proportion of age in immigration*, end +time;ems_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for emigration* rate, begin +time;ems_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for emigration* rate, end +time;ems_so_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for proportion of sex and origin in emigration*, begin +time;ems_so_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for proportion of sex and origin in emigration*, end +time;ems_age_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for proportion of age in emigration*, begin +time;ems_age_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for proportion of age in emigration*, end +time;rei_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for relocation based on immigration* (proportion), begin +time;rei_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for relocation based on immigration* (proportion), end +time;ree_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for relocation based on emigration* (proportion), begin +time;ree_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for relocation based on emigration* (proportion), end +time;nat_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for naturalization, begin +time;nat_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for naturalization, end +time;spa_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for living space, begin +time;spa_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for living space, end +time;spa_base_begin_52p;no parameter in previous model;2015;2015;2015;2015;2015;year;low;"base period (not the future) for living space, begin, district 'Escher Wyss' (district ID = 52; since empty apartments increased the mean living space values; before 2015)" +time;aca_base_begin;no parameter in previous model;2014;2014;2014;2014;2014;year;low;base period (not the future) for allocation, begin +time;aca_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for allocation, end +time;aca_base_begin_52p;no parameter in previous model;2015;2015;2015;2015;2015;year;low;"base period (not the future) for allocation, begin, district 'Escher Wyss' (district ID = 52; since empty apartments decreased the mean allocation values; before 2015)" +time;pro_begin;map.wohnbau.beginn;2024;2024;2024;2024;2024;year;low;"first year (of consolidated project list; reasonable: first scenario year)" +time;pro_end;map.wohnbau.ende;2035;2035;2035;2035;2035;year;low;last year (of consolidated project list) +time;own_base_begin;no parameter in previous model;2015;2015;2015;2015;2015;year;low;base period (not the future) for ownership calculation, begin +time;own_base_end;no parameter in previous model;2023;2023;2023;2023;2023;year;low;base period (not the future) for ownership calculation, end +age;age_min;no parameter in previous model;0;0;0;0;0;years (age);low;minimum age in the model +age;age_max;no parameter in previous model;120;120;120;120;120;years (age);low;maximum age in the model (should be clearly higher than maximum age in the population) +general;round_rate;no parameter in previous model;4;4;4;4;4;digits (rate in percent per year);no parameter;rounding of rates (digits, rate in percent per year) +general;round_prop;no parameter in previous model;4;4;4;4;4;digits (proportion in percent);no parameter;rounding of proportion (digits, proportion in percent) +general;round_area;no parameter in previous model;4;4;4;4;4;digits (area);no parameter;rounding of area (e.g. ha in the capacity and reserve module) +general;round_people;no parameter in previous model;0;0;0;0;0;digits (people);no parameter;rounding of people +general;round_aca;no parameter in previous model;4;4;4;4;4;digits (people per apartment);no parameter;rounding of allocation (people per apartment) +general;round_people_scen;no parameter in previous model;100;100;100;100;100;people (not digits);no parameter;"rounding of people (for future values; scenarios)" +general;round_prop_scen;no parameter in previous model;0;0;0;0;0;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios)" +general;round_prop_scen_a;no parameter in previous model;1;1;1;1;1;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios): comparison to previous scenarios by age" +birth;bir_age_begin;geb.alter.beginn;15;15;15;15;15;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): begin +birth;bir_age_end;geb.alter.ende;49;49;49;49;49;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): end +birth;bir_thres_origin;geb.anz.rate.heimat;100;100;100;100;100;persons;low;"age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the rate based on origin (but not district) is used. " -birth;bir_thres_overall;geb.anz.rate.stadt;50;50;50;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the overall rate is used (e.g not the rate based on origin and district). -birth;bir_thres_const;geb.anz.rate.const;25;25;25;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then a constant rate is used (e.g not the rate based on origin and district). The constant rate is set by the parameter bir_thres_value. -birth;bir_thres_value;geb.wert.rate.const;0;0;0;birth per woman and year in %;low;birth rate: if there are less women than a certain threshold (bir_thres_const) a constant fertility rate is used. The values is chosen with this parameter. -birth;bir_fer_span;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" -birth;bir_prop_trend;geb.anteil.trend;20;20;20;percent;medium;"trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_thres_percent;geb.grenze.prozent;20;20;20;percent;low;"It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." -birth;bir_window_thres;geb.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). -birth;bir_lower_thres;no parameter in previous model;0;0;0;percent per year;low;lower threshold for the rate (e.g. the birth rate should not be negative), NA if there is no lower threshold -birth;bir_upper_thres;no parameter in previous model;NA;NA;NA;percent per year;low;upper threshold for the rate, NA if there is no upper threshold -birth;bir_plot_lim;no parameter in previous model;30;30;30;percent per year;no parameter;"the fertility rates of the past are compared with the predictions; the y-axis is limited (since the fertility rate of the past can be very large due to low population)" -birth;bir_fer_span_pred;no parameter in previous model;0.15;0.15;0.15;no unit;low;"after the prediction: proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" -birth;bir_cha_trend;geb.heimat.anteil.trend;0;0;0;percent;low;"origin change (mother-baby): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_cha_prop_trend;no parameter in previous model;20;20;20;percent;medium;"origin change (mother-baby): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_cha_thres_percent;no parameter in previous model;20;20;20;percent;low;"origin change (mother-baby): It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." -birth;bir_cha_window_thres;no parameter in previous model;13;13;13;years;low;origin change (mother-baby): filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). -birth;bir_cha_lower_thres;no parameter in previous model;0;0;0;percent;low;origin change (mother-baby): lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -birth;bir_cha_upper_thres;no parameter in previous model;100;100;100;percent;low;origin change (mother-baby): upper threshold for the rate (here: not more than 100 %), NA if there is no lower threshold -death;dea_lower;tod.jung.alter.ende.schweiz, tod.jung.alter.ende.ausland;30;30;30;years (age);low;"lower age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" -death;dea_upper;tod.alt.alter.beginn.schweiz, tod.alt.alter.beginn.ausland;99;99;99;years (age);low;"upper age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" -death;dea_radix;no parameter in previous model;100000;100000;100000;persons;no;radix (starting population) for life expectancy calcuation (no effect on result) -death;dea_age_at;no parameter in previous model;0;0;0;years (age);no;"life expectancy at certain age (usually at birth; i.e. age zero)" -death;dea_age_max_le;tod.alt.alter.ende;120;120;120;years (age);low;maximum age for the estimation of the life expectancy -death;dea_fso_cat_past;no parameter in previous model;2;2;2;no unit;no parameter;Category in the FSO data: (smoothed) data of the past -death;dea_fso_cat_future;no parameter in previous model;3;3;3;no unit;no parameter;Category in the FSO data: data of the future -death;dea_qx_NA_le;no parameter in previous model;0.8;0.8;0.8;per year;low;if there is no one at a certain age in the population (e.g. no 96 year old men), then qx (probability to die between age x and x+1) is NA. However, a value is need to multiply the subsequent survival probabilities -death;dea_mor_span;no parameter in previous model;0.2;0.2;0.2;no unit;low;"proportion of data points used in the LOESS regressions of mortality by age; groups: sex, region (City of Zurich, Switzerland)" -immigration*;ims_rate_prop_trend;zuz.rate.anteil.trend;20;20;20;percent;low;"immigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_rate_thres_percent;zuz.rate.grenze.prozent;20;20;20;percent;low;"It is not realistic that the immigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -immigration*;ims_rate_window_thres;zuz.rate.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future immigration* rates: imm_rate_thres_percent). -immigration*;ims_rate_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -immigration*;ims_so_prop_trend;zuz.ghvert.anteil.trend;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_so_thres_percent;zuz.ghvert.grenze.prozent;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +birth;bir_thres_overall;geb.anz.rate.stadt;50;50;50;50;50;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the overall rate is used (e.g not the rate based on origin and district). +birth;bir_thres_const;geb.anz.rate.const;25;25;25;25;25;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then a constant rate is used (e.g not the rate based on origin and district). The constant rate is set by the parameter bir_thres_value. +birth;bir_thres_value;geb.wert.rate.const;0;0;0;0;0;birth per woman and year in %;low;birth rate: if there are less women than a certain threshold (bir_thres_const) a constant fertility rate is used. The values is chosen with this parameter. +birth;bir_fer_span;no parameter in previous model;0.3;0.3;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" +birth;bir_prop_trend;geb.anteil.trend;0;0;0;0;0;percent;medium;"trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +birth;bir_thres_percent;geb.grenze.prozent;20;20;20;20;20;percent;low;"It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." +birth;bir_window_thres;geb.window.grenz;13;13;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). +birth;bir_lower_thres;no parameter in previous model;0;0;0;0;0;percent per year;low;lower threshold for the rate (e.g. the birth rate should not be negative), NA if there is no lower threshold +birth;bir_upper_thres;no parameter in previous model;NA;NA;NA;NA;NA;percent per year;low;upper threshold for the rate, NA if there is no upper threshold +birth;bir_plot_lim;no parameter in previous model;30;30;30;30;30;percent per year;no parameter;"the fertility rates of the past are compared with the predictions; the y-axis is limited (since the fertility rate of the past can be very large due to low population)" +birth;bir_fer_span_pred;no parameter in previous model;0.15;0.15;0.15;0.15;0.15;no unit;low;"after the prediction: proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" +birth;bir_mult_begin;no parameter in previous model;0.97;0.97;0.92;1.02;0.97;no unit;medium;"birth rate multiplier at the begin of the prediction period; the future birth rates are multiplied by this factor" +birth;bir_mult_end;no parameter in previous model;0.90;0.90;0.70;1.10;0.90;no unit;medium;"birth rate multiplier at the end of the prediction period; the future birth rates are multiplied by this factor " +birth;bir_mult_exp;no parameter in previous model;0.10;0.10;0.10;0.10;0.10;no unit;medium;exponent of the multiplier/year relation (linear model): multiplier ~ (year - scen-begin + 1) ^ bir_mult_exp +birth;bir_cha_prop_trend;no parameter in previous model;20;20;20;20;20;percent;medium;"origin change (mother-baby): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +birth;bir_cha_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"origin change (mother-baby): It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." +birth;bir_cha_window_thres;no parameter in previous model;13;13;13;13;13;years;low;origin change (mother-baby): filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). +birth;bir_cha_lower_thres;no parameter in previous model;0;0;0;0;0;percent;low;origin change (mother-baby): lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold +birth;bir_cha_upper_thres;no parameter in previous model;100;100;100;100;100;percent;low;origin change (mother-baby): upper threshold for the rate (here: not more than 100 %), NA if there is no lower threshold +death;dea_lower;tod.jung.alter.ende.schweiz, tod.jung.alter.ende.ausland;30;30;30;30;30;years (age);low;"lower age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" +death;dea_upper;tod.alt.alter.beginn.schweiz, tod.alt.alter.beginn.ausland;99;99;99;99;99;years (age);low;"upper age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" +death;dea_radix;no parameter in previous model;100000;100000;100000;100000;100000;persons;no;radix (starting population) for life expectancy calcuation (no effect on result) +death;dea_age_at;no parameter in previous model;0;0;0;0;0;years (age);no;"life expectancy at certain age (usually at birth; i.e. age zero)" +death;dea_age_max_le;tod.alt.alter.ende;120;120;120;120;120;years (age);low;maximum age for the estimation of the life expectancy +death;dea_fso_cat_past;no parameter in previous model;2;2;2;2;2;no unit;no parameter;Category in the FSO data: (smoothed) data of the past +death;dea_fso_cat_future;no parameter in previous model;3;3;3;3;3;no unit;no parameter;Category in the FSO data: data of the future +death;dea_qx_NA_le;no parameter in previous model;0.8;0.8;0.8;0.8;0.8;per year;low;if there is no one at a certain age in the population (e.g. no 96 year old men), then qx (probability to die between age x and x+1) is NA. However, a value is need to multiply the subsequent survival probabilities +death;dea_mor_span;no parameter in previous model;0.2;0.2;0.2;0.2;0.2;no unit;low;"proportion of data points used in the LOESS regressions of mortality by age; groups: sex, region (City of Zurich, Switzerland)" +immigration*;ims_rate_prop_trend;zuz.rate.anteil.trend;20;20;20;20;20;percent;low;"immigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +immigration*;ims_rate_thres_percent;zuz.rate.grenze.prozent;20;20;20;20;20;percent;low;"It is not realistic that the immigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." +immigration*;ims_rate_window_thres;zuz.rate.window.grenz;13;13;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future immigration* rates: imm_rate_thres_percent). +immigration*;ims_rate_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold +immigration*;ims_so_prop_trend;zuz.ghvert.anteil.trend;20;20;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +immigration*;ims_so_thres_percent;zuz.ghvert.grenze.prozent;20;20;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." immigration*;ims_so_window_thres;"zuz.ghvert.window.grenz -";13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions -immigration*;ims_so_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -immigration*;ims_span_y;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the loess regressions of proportion by year; groups: district, age, sex, origin (immigration* by district, year, age, sex, origin)" -immigration*;ims_span_a;no parameter in previous model;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" -immigration*;ims_age_prop_trend;no parameter in previous model;20;20;20;percent;low;"age distribution of immigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_age_thres_percent;no parameter in previous model;20;20;20;percent;low;"age distribution of immigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -immigration*;ims_age_window_thres;no parameter in previous model;13;13;13;years;low;age distribution of immigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions -immigration*;ims_age_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;age distribution of immigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -emigration*;ems_rate_prop_trend;weg.rate.anteil.trend;20;20;20;percent;low;"emigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_rate_thres_percent;weg.rate.grenze.prozent;20;20;20;percent;low;"It is not realistic that the emigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -emigration*;ems_rate_window_thres;weg.rate.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future emigration* rates: imm_rate_thres_percent). -emigration*;ems_rate_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -emigration*;ems_so_prop_trend;weg.ghvert.anteil.trend;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_so_thres_percent;weg.ghvert.grenze.prozent;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +";13;13;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions +immigration*;ims_so_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +immigration*;ims_span_y;no parameter in previous model;0.3;0.3;0.3;0.3;0.3;no unit;low;"proportion of data points used in the loess regressions of proportion by year; groups: district, age, sex, origin (immigration* by district, year, age, sex, origin)" +immigration*;ims_span_a;no parameter in previous model;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" +immigration*;ims_age_prop_trend;no parameter in previous model;20;20;20;20;20;percent;low;"age distribution of immigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +immigration*;ims_age_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"age distribution of immigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +immigration*;ims_age_window_thres;no parameter in previous model;13;13;13;13;13;years;low;age distribution of immigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions +immigration*;ims_age_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;age distribution of immigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +emigration*;ems_rate_prop_trend;weg.rate.anteil.trend;20;20;20;20;20;percent;low;"emigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +emigration*;ems_rate_thres_percent;weg.rate.grenze.prozent;20;20;20;20;20;percent;low;"It is not realistic that the emigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." +emigration*;ems_rate_window_thres;weg.rate.window.grenz;13;13;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future emigration* rates: imm_rate_thres_percent). +emigration*;ems_rate_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold +emigration*;ems_so_prop_trend;weg.ghvert.anteil.trend;20;20;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +emigration*;ems_so_thres_percent;weg.ghvert.grenze.prozent;20;20;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." emigration*;ems_so_window_thres;"weg.ghvert.window.grenz -";13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions -emigration*;ems_so_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -emigration*;ems_span_y;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of proportion by year; groups: district, age, sex, origin (emigration* by district, year, age, sex, origin)" -emigration*;ems_span_a;no parameter in previous model;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" -emigration*;ems_age_prop_trend;no parameter in previous model;20;20;20;percent;low;"age distribution of emigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_age_thres_percent;no parameter in previous model;20;20;20;percent;low;"age distribution of emigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -emigration*;ems_age_window_thres;no parameter in previous model;13;13;13;years;low;age distribution of emigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions -emigration*;ems_age_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;age distribution of emigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and immigration*;rei_age_max;umz.alter.max;70;70;70;years;low;as of this age: one single proportion (relocation on immigration*) -relocation and immigration*;rei_ims_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, year, origin" -relocation and immigration*;rei_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" -relocation and immigration*;rei_ims_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, origin" -relocation and immigration*;rei_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" -relocation and immigration*;rei_ims_thres_y;similar to umz.anz.rate.stadt;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). -relocation and immigration*;rei_prop_span;similar to umz.window.alter;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" -relocation and immigration*;rei_prop_trend;umz.anteil.trend;20;20;20;percent;low;"relocation proportion on immigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -relocation and immigration*;rei_thres_percent;no parameter in previous model;20;20;20;percent;low;"relocation proportion on immigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -relocation and immigration*;rei_window_thres;no parameter in previous model;13;13;13;years;low;relocation proportion on immigration*: filter over years (to smooth a potential break in the curve due to range of future proportions -relocation and immigration*;rei_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and immigration*;rei_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -relocation and immigration*;rei_pred_span;similar to umz.window.alter;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions of the prediction (proportion) by age; groups: district, year, origin" -relocation and emigration*;ree_age_max;umz.alter.max;70;70;70;years;low;as of this age: one single proportion (relocation on emigration*) -relocation and emigration*;ree_ems_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, year, origin" -relocation and emigration*;ree_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" -relocation and emigration*;ree_ems_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, origin" -relocation and emigration*;ree_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" -relocation and emigration*;ree_ems_thres_y;similar to umz.anz.rate.heimat;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). -relocation and emigration*;ree_prop_span;similar to umz.window.alter;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" -relocation and emigration*;ree_prop_trend;umz.anteil.trend;20;20;20;percent;low;"relocation proportion on emigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -relocation and emigration*;ree_thres_percent;no parameter in previous model;20;20;20;percent;low;"relocation proportion on emigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -relocation and emigration*;ree_window_thres;no parameter in previous model;13;13;13;years;low;relocation proportion on emigration*: filter over years (to smooth a potential break in the curve due to range of future proportions -relocation and emigration*;ree_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and emigration*;ree_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -relocation and emigration*;ree_pred_span;similar to umz.window.alter;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions the prediction (proportion) by age; groups: district, year, origin" -naturalization;nat_pop_span_das;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: district, sex" -naturalization;nat_nat_span_das;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: district, sex" -naturalization;nat_pop_thres;similar to brw.rate.anz.null;0.5;0.5;0.5;persons;low;if less persons in the (smoothed) foreign population than this threshold: then the naturalization rate is set to nat_pop_value -naturalization;nat_pop_value;no parameter in previous model;0;0;0;percent per year;low;value of the naturalization rate, if the foreign population is below nat_pop_thres -naturalization;nat_rate_span_das;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, sex" -naturalization;nat_pop_span_ya;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: year (base years only)" -naturalization;nat_nat_span_ya;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: year (base years only)" -naturalization;nat_rate_span_ya;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: year (base years only)" -naturalization;nat_prop_trend;brw.anteil.trend;20;20;20;percent;low;"naturalization: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -naturalization;nat_thres_percent;no parameter in previous model;20;20;20;percent;low;"naturalization: It is not realistic that the rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -naturalization;nat_window_thres;no parameter in previous model;13;13;13;years;low;naturalization: filter over years (to smooth a potential break in the curve due to range of future proportions -naturalization;nat_lower_thres;no parameter in previous model;0;0;0;percent;low;naturalization: lower threshold for the proportions (here: the naturalization rates should not be negative), NA if there is no lower threshold -naturalization;nat_pop_span_a;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; no groups (base years only)" -naturalization;nat_nat_span_a;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; no groups (base years only)" -naturalization;nat_rate_span_a;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; no groups (base years only)" -naturalization;nat_factor_thres;no parameter in previous model;0.5;0.5;0.5;naturalizations per year;low;if the naturalization rate is below this threshold: then the trend factor ist set to nat_factor_value -naturalization;nat_factor_value;no parameter in previous model;0;0;0;no unit;low;value of the trend factor, if the naturalization rate is below nat_factor_thres -naturalization;nat_rate_span_dyas;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, year, sex" -capacity and reserves;car_sc;kareb.vf;25;25;25;percent;medium;"Proportion of staircases; for the conversion from total area to living area." -capacity and reserves;car_resi;kareb.wohnant;-30;10;50;percent;high;Residence portion ('slider'): -100% = minimum residential share according to the building regulation (BZO), 0% = real residential share, +100% = maximum residential share according to building regulation. -capacity and reserves;car_plot;kareb.areal;0;50;100;percent;high;"Proportion of plot construction ('slider'); 0% = without plot construction, 100% = with plot construction" -capacity and reserves;car_uti_input;no parameter in previous model;85;85;85;percent;high;degree of utilization used to calculate the input data -capacity and reserves;car_uti;kareb.ausbau;75;85;95;percent;high;"degree of utilization; linear influence on the capacity" -capacity and reserves;car_pp;kareb.ina.prozentpunkte;0;0;0;percent points;medium;usage: less or more percentage points (parameter between -100 and +100) -capacity and reserves;car_y;kareb.ina.jahr;2048;2048;2048;year;low;Reference year of the usage values -capacity and reserves;car_lambda;kareb.ina.lambda;-0.04;-0.04;-0.04;per year;high;"lambda value of an exponential function exp(lambda * time since start of scenario); proportion of utilization per year" -living space;spa_apart;wf.anzwohn;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" -living space;spa_prop_trend;wf.anteil.trend;0;20;50;percent;high;"living space: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -living space;spa_thres_percent;wf.grenze.prozent;20;20;20;percent;low;"living space: It is not realistic that the living space changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." -living space;spa_window_thres;wf.window.szen;7;7;7;years;low;living space: filter over years (to smooth a potential break in the curve due to range of future proportions -living space;spa_prop_trend_52p;no parameter in previous model;0;0;0;percent;low;"living space in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -allocation;aca_apart;bq.anzwohn;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" -allocation;aca_prop_trend;bq.anteil.trend;0;20;50;percent;high;"allocation: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -allocation;aca_thres_percent;bq.grenze.prozent;20;20;20;percent;low;"allocation: It is not realistic that the allocation values change dramatically (i.e. tenfold ncrease). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." -allocation;aca_window_thres;bq.window.szen;7;7;7;years;low;allocation: filter over years (to smooth a potential break in the curve due to range of future proportions -allocation;aca_prop_trend_52p;no parameter in previous model;0;0;0;percent;low;"allocation in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -projects;pro_lambda_begin;map.lambda.beginn;3;3;3;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the beginning of the time period (of the consolidated project list)." -projects;pro_lambda_end;map.lambda.ende;0.5;0.5;0.5;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the end of the time period (of the consolidated project list)." -projects;pro_transfo;no parameter in previous model;5;5;5;no unit;low;transformation parameter (non-linear curve from pro_lambda_begin to pro_lambda_end) -projects;pro_max_delay;no parameter in previous model;5;5;5;years;low;maximum delay -projects;pro_not_scheduled_ip;part of map.nicht1 (projektiert);30;30;30;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, from Infoplan -projects;pro_not_scheduled_other;part of map.nicht1 (projektiert);20;20;20;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, other -projects;pro_not_submitted;map.nicht2 (eingereicht);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: submitted -projects;pro_not_approved;map.nicht3 (bewilligt);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: approved -projects;pro_not_started;map.nicht4 (Bau begonnen);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: started -projects;pro_not_completed;map.nicht5 (fertiggestellt);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: completed -projects;pro_not_onhold;map.nicht6 (sistiert);10;10;10;percent;high;Percentage of projects (i.e. apartments) that are not realized: on hold -ownership;own_prop_trend;ea.anteil.trend;50;50;50;percent;low;"ownership: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -ownership;own_thres_percent;ea.grenze.prozent;20;20;20;percent;low;"ownership: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -ownership;own_window_thres;ea.window.szen;7;7;7;years;low;ownership: filter over years (to smooth a potential break in the curve due to range of future proportions -ownership;own_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;ownership: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -ownership;own_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;ownership: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -housing model;car_coop;similar to wohn.modell.typ;100;100;100;percent;low;Percentage of cooperative housing can be used from capacity/reserves (car_coop = 100), or from the trends in the districts (car_coop = 0) or a mixture of both data sources. In other words: car_coop = percentage used from capacity/reserves. -housing model;car_trust;no parameter in previous model;0;0;0;percent;high;If the amount of people according to the project list exceeds the population (in a given year!) according to capacity/reserves: trust the capacity/reserves number (parameter = 100%)? Or the project list (parameter = 0%)? -housing model;car_max_trust;no parameter in previous model;100;100;100;percent;high;If the amount of people exceeds the maximum (over all years!) according to capacity/reserves: trust the capacity/reserves population (parameter = 100%)? Or the calculated population (parameter = 0%)? Idea: not more people than population according to reserves usage -housing model;empty_coop;similar to wohn.modell.anteil.leerwhg;0;0;0;percent;low;Percentage of empty apartments: cooperative housing -housing model;empty_private;similar to wohn.modell.anteil.leerwhg;0;0;0;percent;low;Percentage of empty apartments: private housing -demography and housing model;less_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);75;75;75;percent;high;less living space available (according to reserves, compared to trend calcuation). Then immigration* is decreased, and emigration* increased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) -demography and housing model;more_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);50;50;50;percent;high;more living space available (according to reserves, compared to trend calcuation). Then immigration* is increased, and emigration* decreased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) -demography and housing model;deh_span;no parameter in previous model;0.04;0.04;0.04;no unit;medium;"in future population: proportion of data points used in the LOESS regressions by age; groups: district, year, sex, origin" -output;basis_fact;no parameter in previous model;1;1;1;no unit;no parameter;value for field BasisSzenarienCd in DWH for factual values from the past -output;basis_scen;no parameter in previous model;2;2;2;no unit;no parameter;value for field BasisSzenarienCd in DWH for calculated scenario values +";13;13;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions +emigration*;ems_so_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +emigration*;ems_span_y;no parameter in previous model;0.3;0.3;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of proportion by year; groups: district, age, sex, origin (emigration* by district, year, age, sex, origin)" +emigration*;ems_span_a;no parameter in previous model;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" +emigration*;ems_age_prop_trend;no parameter in previous model;20;20;20;20;20;percent;low;"age distribution of emigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +emigration*;ems_age_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"age distribution of emigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +emigration*;ems_age_window_thres;no parameter in previous model;13;13;13;13;13;years;low;age distribution of emigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions +emigration*;ems_age_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;age distribution of emigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +relocation and immigration*;rei_age_max;umz.alter.max;70;70;70;70;70;years;low;as of this age: one single proportion (relocation on immigration*) +relocation and immigration*;rei_ims_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, year, origin" +relocation and immigration*;rei_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" +relocation and immigration*;rei_ims_span_dao;similar to umz.window.alter;0.12;0.12;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, origin" +relocation and immigration*;rei_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" +relocation and immigration*;rei_ims_thres_y;similar to umz.anz.rate.stadt;0.4;0.4;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). +relocation and immigration*;rei_prop_span;similar to umz.window.alter;0.3;0.3;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" +relocation and immigration*;rei_prop_trend;umz.anteil.trend;20;20;20;20;20;percent;low;"relocation proportion on immigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +relocation and immigration*;rei_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"relocation proportion on immigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +relocation and immigration*;rei_window_thres;no parameter in previous model;13;13;13;13;13;years;low;relocation proportion on immigration*: filter over years (to smooth a potential break in the curve due to range of future proportions +relocation and immigration*;rei_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +relocation and immigration*;rei_upper_thres;no parameter in previous model;100;100;100;100;100;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold +relocation and immigration*;rei_pred_span;similar to umz.window.alter;0.15;0.15;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions of the prediction (proportion) by age; groups: district, year, origin" +relocation and emigration*;ree_age_max;umz.alter.max;70;70;70;70;70;years;low;as of this age: one single proportion (relocation on emigration*) +relocation and emigration*;ree_ems_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, year, origin" +relocation and emigration*;ree_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" +relocation and emigration*;ree_ems_span_dao;similar to umz.window.alter;0.12;0.12;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, origin" +relocation and emigration*;ree_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" +relocation and emigration*;ree_ems_thres_y;similar to umz.anz.rate.heimat;0.4;0.4;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). +relocation and emigration*;ree_prop_span;similar to umz.window.alter;0.3;0.3;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" +relocation and emigration*;ree_prop_trend;umz.anteil.trend;20;20;20;20;20;percent;low;"relocation proportion on emigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +relocation and emigration*;ree_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"relocation proportion on emigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." +relocation and emigration*;ree_window_thres;no parameter in previous model;13;13;13;13;13;years;low;relocation proportion on emigration*: filter over years (to smooth a potential break in the curve due to range of future proportions +relocation and emigration*;ree_lower_thres;no parameter in previous model;0;0;0;0;0;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold +relocation and emigration*;ree_upper_thres;no parameter in previous model;100;100;100;100;100;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold +relocation and emigration*;ree_pred_span;similar to umz.window.alter;0.15;0.15;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions the prediction (proportion) by age; groups: district, year, origin" +naturalization;nat_pop_span_das;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: district, sex" +naturalization;nat_nat_span_das;similar to brw.window.alter;0.15;0.15;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: district, sex" +naturalization;nat_pop_thres;similar to brw.rate.anz.null;0.5;0.5;0.5;0.5;0.5;persons;low;if less persons in the (smoothed) foreign population than this threshold: then the naturalization rate is set to nat_pop_value +naturalization;nat_pop_value;no parameter in previous model;0;0;0;0;0;percent per year;low;value of the naturalization rate, if the foreign population is below nat_pop_thres +naturalization;nat_rate_span_das;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, sex" +naturalization;nat_pop_span_ya;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: year (base years only)" +naturalization;nat_nat_span_ya;similar to brw.window.alter;0.15;0.15;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: year (base years only)" +naturalization;nat_rate_span_ya;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: year (base years only)" +naturalization;nat_prop_trend;brw.anteil.trend;20;20;20;20;20;percent;low;"naturalization: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +naturalization;nat_thres_percent;no parameter in previous model;20;20;20;20;20;percent;low;"naturalization: It is not realistic that the rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." +naturalization;nat_window_thres;no parameter in previous model;13;13;13;13;13;years;low;naturalization: filter over years (to smooth a potential break in the curve due to range of future proportions +naturalization;nat_lower_thres;no parameter in previous model;0;0;0;0;0;percent;low;naturalization: lower threshold for the proportions (here: the naturalization rates should not be negative), NA if there is no lower threshold +naturalization;nat_pop_span_a;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; no groups (base years only)" +naturalization;nat_nat_span_a;similar to brw.window.alter;0.15;0.15;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; no groups (base years only)" +naturalization;nat_rate_span_a;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; no groups (base years only)" +naturalization;nat_factor_thres;no parameter in previous model;0.5;0.5;0.5;0.5;0.5;naturalizations per year;low;if the naturalization rate is below this threshold: then the trend factor ist set to nat_factor_value +naturalization;nat_factor_value;no parameter in previous model;0;0;0;0;0;no unit;low;value of the trend factor, if the naturalization rate is below nat_factor_thres +naturalization;nat_rate_span_dyas;similar to brw.window.alter;0.1;0.1;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, year, sex" +capacity and reserves;car_sc;kareb.vf;25;25;25;25;25;percent;medium;"Proportion of staircases; for the conversion from total area to living area." +capacity and reserves;car_resi;kareb.wohnant;-30;10;10;10;50;percent;high;Residence portion ('slider'): -100% = minimum residential share according to the building regulation (BZO), 0% = real residential share, +100% = maximum residential share according to building regulation. +capacity and reserves;car_plot;kareb.areal;0;50;50;50;100;percent;high;"Proportion of plot construction ('slider'); 0% = without plot construction, 100% = with plot construction" +capacity and reserves;car_uti_input;no parameter in previous model;85;85;85;85;85;percent;high;degree of utilization used to calculate the input data +capacity and reserves;car_uti;kareb.ausbau;75;85;85;85;95;percent;high;"degree of utilization; linear influence on the capacity" +capacity and reserves;car_pp;kareb.ina.prozentpunkte;0;0;0;0;0;percent points;medium;usage: less or more percentage points (parameter between -100 and +100) +capacity and reserves;car_y;kareb.ina.jahr;2049;2049;2049;2049;2049;year;low;Reference year of the usage values +capacity and reserves;car_lambda;kareb.ina.lambda;-0.04;-0.04;-0.04;-0.04;-0.04;per year;high;"lambda value of an exponential function exp(lambda * time since start of scenario); proportion of utilization per year" +living space;spa_apart;wf.anzwohn;500;500;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" +living space;spa_prop_trend;wf.anteil.trend;0;20;20;20;50;percent;high;"living space: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +living space;spa_thres_percent;wf.grenze.prozent;20;20;20;20;20;percent;low;"living space: It is not realistic that the living space changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." +living space;spa_window_thres;wf.window.szen;7;7;7;7;7;years;low;living space: filter over years (to smooth a potential break in the curve due to range of future proportions +living space;spa_prop_trend_52p;no parameter in previous model;0;0;0;0;0;percent;low;"living space in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +allocation;aca_apart;bq.anzwohn;500;500;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" +allocation;aca_prop_trend;bq.anteil.trend;0;20;20;20;50;percent;high;"allocation: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +allocation;aca_thres_percent;bq.grenze.prozent;20;20;20;20;20;percent;low;"allocation: It is not realistic that the allocation values change dramatically (i.e. tenfold ncrease). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." +allocation;aca_window_thres;bq.window.szen;7;7;7;7;7;years;low;allocation: filter over years (to smooth a potential break in the curve due to range of future proportions +allocation;aca_prop_trend_52p;no parameter in previous model;0;0;0;0;0;percent;low;"allocation in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." +projects;pro_lambda_begin;map.lambda.beginn;0.9;1.1;1.1;1.1;1.3;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the beginning of the time period (of the consolidated project list)." +projects;pro_lambda_end;map.lambda.ende;0.1;0.1;0.1;0.1;0.1;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the end of the time period (of the consolidated project list)." +projects;pro_transfo;no parameter in previous model;10;10;10;10;10;no unit;low;transformation parameter (non-linear curve from pro_lambda_begin to pro_lambda_end) +projects;pro_max_delay;no parameter in previous model;5;5;5;5;5;years;low;maximum delay +projects;pro_not_scheduled_ip;part of map.nicht1 (projektiert);40;40;40;40;40;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, from Infoplan +projects;pro_not_scheduled_other;part of map.nicht1 (projektiert);30;30;30;30;30;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, other +projects;pro_not_submitted;map.nicht2 (eingereicht);20;20;20;20;20;percent;high;Percentage of projects (i.e. apartments) that are not realized: submitted +projects;pro_not_approved;map.nicht3 (bewilligt);10;10;10;10;10;percent;high;Percentage of projects (i.e. apartments) that are not realized: approved +projects;pro_not_started;map.nicht4 (Bau begonnen);0;0;0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: started +projects;pro_not_completed;map.nicht5 (fertiggestellt);0;0;0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: completed +projects;pro_not_onhold;map.nicht6 (sistiert);50;50;50;50;50;percent;high;Percentage of projects (i.e. apartments) that are not realized: on hold +housing model;car_trust;no parameter in previous model;0;0;0;0;0;percent;high;If the amount of people according to the project list exceeds the population (in a given year!) according to capacity/reserves: trust the capacity/reserves number (parameter = 100%)? Or the project list (parameter = 0%)? +housing model;car_max_trust;no parameter in previous model;100;100;100;100;100;percent;high;If the amount of people exceeds the maximum (over all years!) according to capacity/reserves: trust the capacity/reserves population (parameter = 100%)? Or the calculated population (parameter = 0%)? Idea: not more people than population according to reserves usage +housing model;empty_coop;similar to wohn.modell.anteil.leerwhg;0;0;0;0;0;percent;low;Percentage of empty apartments: cooperative housing +housing model;empty_private;similar to wohn.modell.anteil.leerwhg;0;0;0;0;0;percent;low;Percentage of empty apartments: private housing +demography and housing model;less_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);75;75;75;75;75;percent;high;less living space available (according to reserves, compared to trend calcuation). Then immigration* is decreased, and emigration* increased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) +demography and housing model;more_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);50;50;50;50;50;percent;high;more living space available (according to reserves, compared to trend calcuation). Then immigration* is increased, and emigration* decreased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) +demography and housing model;deh_span;no parameter in previous model;0.04;0.04;0.04;0.04;0.04;no unit;medium;"in future population: proportion of data points used in the LOESS regressions by age; groups: district, year, sex, origin" diff --git a/2_Data/3_Parameter/variables.yml b/2_Data/3_Parameter/variables.yml index e31dd47a..26e5349c 100644 --- a/2_Data/3_Parameter/variables.yml +++ b/2_Data/3_Parameter/variables.yml @@ -69,6 +69,7 @@ text_i: ["new", "removed"] # past and scenarios text_c: ["past", "lower", "middle", "upper"] +text_cb: ["past", "middle_birth_lower", "middle", "middle_birth_upper"] # categories (t = text) and associated lookup tables ---------------------- @@ -88,6 +89,10 @@ age_3t: ["0-9", "10-19", "20-29", "30-39", "40-49", "50-59", "60-69", "70-79", " age_4: !expr seq(0, 80, by = 20) age_4t: ["0-19", "20-39", "40-59", "60-79", "80+"] +# age category 5 +age_5: [5, 10, 15] +age_5t: ["0-4", "5-9", "10-14", "15+"] + # colors, graphics -------------------------------------------------------- # colors (e.g. for sex, origin) diff --git a/Plots/01_birth.qmd b/Plots/01_birth.qmd index 01fb10a7..2cea28c8 100644 --- a/Plots/01_birth.qmd +++ b/Plots/01_birth.qmd @@ -7,7 +7,7 @@ # source general functions if (!exists("i_scen")) { source(paste0(here::here(), "/1_code/0000_general/general_init.R")) - params <- init("middle") + params <- init("middle_birth_lower") } # run the scenario @@ -143,7 +143,7 @@ sszplot(tfr_ya2o, labs_y = "TFR", i_x = "5", geom = c("line", "point"), name = plot_name("0105_TFR_by-year-age2"), - width = 16, height = 5 + width = 20, height = 5 ) ``` @@ -282,7 +282,7 @@ sszplot(fer_pred, wrap = "district", labs_y = "fertility rate (in % per year)", name = plot_name("0140_fertility-prediction_by-district"), - width = 12, height = 14, + width = 20, height = 24, multi = uni_o, quotes = quote(ylim(c(0, bir_plot_lim))) ) @@ -303,7 +303,7 @@ sel_age <- uni_age[(uni_age %% 5) == 0] age_dat <- filter(fer_pred, (origin == uni_o[1]) & (age %in% sel_age)) sszplot(age_dat, - aes_x = "year", aes_y = "fer_fit", + aes_x = "year", aes_y = "fer_all", labs_y = "fertility rate (in % per year)", wrap = "age", ncol = 4, scale_y = c(0, bir_plot_lim), @@ -332,7 +332,7 @@ foreign # plot: foreign age_dat <- filter(fer_pred, (origin == uni_o[2]) & (age %in% sel_age)) sszplot(age_dat, - aes_x = "year", aes_y = "fer_fit", + aes_x = "year", aes_y = "fer_all", labs_y = "fertility rate (in % per year)", wrap = "age", ncol = 4, scale_y = c(0, bir_plot_lim), @@ -362,8 +362,8 @@ sel_years <- uniy_scen[(uniy_scen %% 10) == 0] sel_lev <- c("initial", "smoothed") sel_dat <- pred_fit %>% - pivot_longer(c(pred_fit, pred_roll), names_to = "category", values_to = "fer") %>% - mutate(cat = fact_if(category, sel_lev, "pred_roll")) %>% + pivot_longer(c(pred_fit, fer_all), names_to = "category", values_to = "fer") %>% + mutate(cat = fact_if(category, sel_lev, "fer_all")) %>% filter(year %in% sel_years) # plot diff --git a/Plots/02_death.qmd b/Plots/02_death.qmd index 416cee71..e502b3dd 100644 --- a/Plots/02_death.qmd +++ b/Plots/02_death.qmd @@ -65,7 +65,7 @@ sszplot(filter(mor_yasr, year %in% year_5), #| fig-cap: "mortality by year, age, sex, region" # age -age_select <- c(0, 20, 40, 50, 60, 70, 80) +age_select <- c(0, 20, 40, 50, 60, 70, 75, 80, 85) sszplot(filter(mor_yasr, age %in% age_select), aes_x = "year", aes_y = "mor_yasr", aes_col = "sex", @@ -234,6 +234,33 @@ sszplot(mor_zh_yas_past_future, ) ``` +### Zurich and Switzerland: future mortality rate + + +```{r} +#| label: fig-0210a +#| fig-cap: mortality by year, age, sex, region + +# age +age_select <- c(0, 20, 40, 50, 60, 70, 75, 80, 85, 90) + +sszplot(filter(mor_zh_ch_yas_past_future, age %in% age_select), + aes_x = "year", aes_y = "mor_yasr", aes_col = "sex", + labs_y = "mortality rate (in % per year)", + scale_y = "log", + grid = c("region", "age"), + name = plot_name("0210a_mortality_by-year-age-sex-region_focus-year-sex"), + width = 14, height = 7, + angle = 90 +) + + + +``` + + + + ### Zurich: life expectancy (including the model data) #### focus: differences by sex @@ -260,7 +287,6 @@ le_ysr_model <- filter(le_ysr, region != "Zurich") %>% bind_rows(le_ys_ZH) %>% arrange(year, sex, region) - sszplot(le_ysr_model, aes_x = "year", aes_y = "le_ysr", aes_col = "sex", labs_y = "life expectancy at birth", @@ -285,5 +311,65 @@ sszplot(le_ysr_model, grid = c(".", "sex"), name = plot_name("0212_life-expectancy-at-birth_by-year-sex-region_focus-region_model"), width = 8, height = 4.5 -) +) ``` + + +### Zurich: life expectancy at different age + +```{r} +#| label: fig-0213 +#| fig-cap: "life expectancy at different age (0 and 65), by year, region, sex" +#| fig-width: 8 +#| fig-height: 7 + +# mortality preparation (CH) +mor_prep_ch <- mor_yasr |> + filter(region == uni_r[2]) + +# mortality preparation (ZH/CH, past/future) +mor_prep <- mor_zh_yas_past_future |> + mutate(region = factor(text_r[1], uni_r)) |> + rename(mor_yasr = mor_yas) |> + select(year, age, sex, region, mor_yasr) |> + bind_rows(mor_prep_ch) + +# life expectancy at different age (0 and 65) +le_ysr_a0 <- life_exp( + data = mor_prep, mor = "mor_yasr", + age = "age", group_cols = c("year", "sex", "region"), + age_max = dea_age_max_le, qx_NA = dea_qx_NA_le, + age_at = 0, radix = dea_radix +) |> + mutate(age = 0) + +le_ysr_a65 <- life_exp( + data = mor_prep, mor = "mor_yasr", + age = "age", group_cols = c("year", "sex", "region"), + age_max = dea_age_max_le, qx_NA = dea_qx_NA_le, + age_at = 65, radix = dea_radix +) |> + mutate(age = 65) + +# life expectancy for all combinations (ZH/CH, past/future, sex, region) + +# correction for Switzerland: latest values not available yet +# the same correction as before (see 0200_death.r) +le_yasr <- le_ysr_a0 |> + bind_rows(le_ysr_a65) |> + mutate(le_yasr = if_else((region == uni_r[2]) & + !(year %in% c(dea_fso_date_start:dea_fso_date_end, + scen_begin:scen_end)), + NA_real_, life_exp)) + +sszplot(le_yasr, + aes_x = "year", aes_y = "le_yasr", aes_col = "age", + labs_y = "life expectancy", + grid = c("region", "sex"), + name = plot_name("0213_life-expectancy-at-different-age_by-year-sex-region"), + width = 8, height = 7 +) + +``` + + diff --git a/Plots/12_ownership.qmd b/Plots/12_ownership.qmd deleted file mode 100644 index 5cdca1f2..00000000 --- a/Plots/12_ownership.qmd +++ /dev/null @@ -1,62 +0,0 @@ - -# Ownership - -```{r} -#| label: prep -#| output: false - -# source general functions -if (!exists("i_scen")) { - source(paste0(here::here(), "/1_code/0000_general/general_init.R")) - params <- init("middle") -} - -# source utility functions -run_scen(i_scen, "own") - -``` - -## proportion of cooperative housing - -### proportions (based on apartments and people) - -```{r} -#| label: fig-1200 -#| fig-cap: proportion of cooperative housing -#| fig-width: 12 -#| fig-height: 14 - -sszplot(own_prop, - aes_x = "year", aes_y = "prop", aes_col = "category", - labs_y = "proportion of cooperative housing (in %)", - wrap = "district", ncol = 4, - scale_y = c(0, NA), - name = plot_name("1200_proportion-cooperative-housing"), - width = 12, height = 14 -) -``` - -## prediction -category: people -WHY? prediction is based on different sources -projects: apartments -reserves: m2 -however, the combined prediction is for persons -therefore, the proportion based on people - -```{r} -#| label: fig-1201 -#| fig-cap: prediction of proportion of cooperative housing -#| fig-width: 12 -#| fig-height: 14 - -sszplot(own_past_pred, - aes_x = "year", aes_y = "own_all", - labs_y = "proportion of cooperative housing (in %)", - wrap = "district", ncol = 4, - i_x = c(own_base_begin, own_base_end), - scale_y = c(0, NA), - name = plot_name("1201_proportion-cooperative-housing_prediction"), - width = 12, height = 14 -) -``` diff --git a/Plots/13_housing.qmd b/Plots/13_housing.qmd index 63249385..c99c0115 100644 --- a/Plots/13_housing.qmd +++ b/Plots/13_housing.qmd @@ -52,27 +52,27 @@ sszplot(pop_with_past, #| fig-width: 12 #| fig-height: 14 -prop_coop %>% - pivot_longer( - cols = c("prop_car", "prop_trend"), - names_prefix = "prop_", - names_to = "category", values_to = "prop" - ) %>% - mutate( - cat = if_else(category == "car", - "capacity/reserves", "district trends" - ), - district = factor(district, levels = uni_d) - ) %>% - sszplot( - aes_x = "year", aes_y = "prop", aes_col = "cat", - labs_y = "proportion of cooperative housing (in %)", - wrap = "district", ncol = 4, - scale_y = c(0, NA), - i_x = c(NA, date_end), - name = plot_name("1301_proportion-cooperative-housing_data-sources"), - width = 12, height = 14 - ) +# prop_coop %>% +# pivot_longer( +# cols = c("prop_car", "prop_trend"), +# names_prefix = "prop_", +# names_to = "category", values_to = "prop" +# ) %>% +# mutate( +# cat = if_else(category == "car", +# "capacity/reserves", "district trends" +# ), +# district = factor(district, levels = uni_d) +# ) %>% +# sszplot( +# aes_x = "year", aes_y = "prop", aes_col = "cat", +# labs_y = "proportion of cooperative housing (in %)", +# wrap = "district", ncol = 4, +# scale_y = c(0, NA), +# i_x = c(NA, date_end), +# name = plot_name("1301_proportion-cooperative-housing_data-sources"), +# width = 12, height = 14 +# ) ``` ## projects, capcity and reserves @@ -275,6 +275,7 @@ pro_car_dw %>% ) ``` + ### total proportion by district ```{r} @@ -302,3 +303,4 @@ pro_car_dw %>% width = 8, height = 8 ) ``` + diff --git a/Plots/15_model_output.qmd b/Plots/15_model_output.qmd index c2c8c4c8..654ccf6f 100644 --- a/Plots/15_model_output.qmd +++ b/Plots/15_model_output.qmd @@ -225,6 +225,50 @@ pop %>% ) ``` +### year, age, scenario (children) + +```{r} + +#| label: fig-1509a +#| fig-cap: year, age, scenario (children) +#| fig-width: 8 +#| fig-height: 5 + +sszplot(pop_yac_children, + aes_x = "year", aes_y = "pop", aes_col = "scenario", + labs_y = "population", + grid = c(".", "age_5"), + scale_y = c(0, NA), + name = plot_name("1509a_pop_yac_children") +) + + + +``` + + +### year, age, birth version (children) + +```{r} + +#| label: fig-1509a +#| fig-cap: year, age, birth version (children) +#| fig-width: 8 +#| fig-height: 5 + +sszplot(pop_yav_children, + aes_x = "year", aes_y = "pop", aes_col = "scenario", + labs_y = "population", + grid = c(".", "age_5"), + scale_y = c(0, NA), + name = plot_name("1509b_pop_yac_children") +) + + + +``` + + ## population: new and previous scenarios ### by year and scenario @@ -394,7 +438,7 @@ pop_dy_new_sel %>% ## birth -### by year and scenario +### by year and scenario (main scenarios) ```{r} #| label: fig-1520 @@ -419,6 +463,7 @@ bir %>% ) ``` + ### by year, origin and scenario ```{r} @@ -437,6 +482,100 @@ bir %>% ) ``` +### births by year and birth versions (middle scenario) + +```{r} +#| label: fig-1521a +#| fig-cap: births by year and birth version (middle scenario) + +# birth: past and future (birth versions) +bir_ver <- bir_past |> + bind_rows(bir_middle) |> + bind_rows(bir_middle_birth_lower) |> + bind_rows(bir_middle_birth_upper) |> + mutate(scenario = factor(scenario, levels = uni_cb), + sex = factor(sex, levels = uni_s), + origin = factor(origin, levels = uni_o)) + +bir_ver |> + group_by(year, scenario) |> + summarize(bir = sum(bir), .groups = "drop") |> + sszplot(aes_x = "year", aes_y = "bir", aes_col = "scenario", + labs_y = "births per year", + scale_y = c(0, NA), + name = plot_name("1521a_bir_ver_yc") + ) + +``` + + +### TFR by year and birth versions (middle scenario) + +```{r} +#| label: fig-1521b +#| fig-cap: TFR by year and birth version (middle scenario) + +# population: past and future (for birth versions) +pop_ver_yac <- pop_past |> + bind_rows(pop_middle) |> + bind_rows(pop_middle_birth_lower) |> + bind_rows(pop_middle_birth_upper) |> + filter((sex == uni_s[2]) & (age >= bir_age_begin) & (age <= bir_age_end)) |> + mutate(scenario = factor(scenario, levels = uni_cb)) |> + group_by(year, age, scenario) |> + summarize(pop = sum_NA(pop), .groups = "drop") + +# births (for birth versions) +bir_ver_yac <- bir_ver |> + rename(age = age_mother) |> + group_by(year, age, scenario) |> + summarize(bir = sum_NA(bir), .groups = "drop") + + +# TFR +pop_bir_ver_yac <- pop_ver_yac |> + left_join(bir_ver_yac, by = c("year", "age", "scenario")) |> + replace_na(list(bir = 0)) + +pop_bir_ver_yac |> + mutate(fer_yac = bir / pop) |> + group_by(year, scenario) |> + summarize(tfr = sum_NA(fer_yac), .groups = "drop") |> + sszplot( + aes_x = "year", aes_y = "tfr", aes_col = "scenario", + labs_y = "TFR", + scale_y = c(0, NA), + name = plot_name("1521b_tfr_ver_yc") + ) + + + + +``` + +### fertility rate by year and birth versions (middle scenario) + +```{r} + +#| label: fig-1521c +#| fig-cap: fertility rate by year and birth version (middle scenario) + +# fertility rate +pop_bir_ver_yac |> + group_by(year, scenario) |> + summarize(bir = sum_NA(bir), pop = sum_NA(pop), .groups = "drop") |> + mutate(fer_yc = bir / pop * 100) |> + sszplot( + aes_x = "year", aes_y = "fer_yc", aes_col = "scenario", + labs_y = "fertility rate (in % per year)", + scale_y = c(0, NA), + name = plot_name("1521c_fer_ver_yc") + ) + +``` + + + ### by district, year and origin ```{r} @@ -612,6 +751,35 @@ imm %>% ) ``` +### by year, age (children) and scenario + +```{r} +#| label: fig-1541a +#| fig-cap: immigration by year, age (children) and scenario + +imm_a5 <- imm |> + filter(age < age_5[3]) |> + left_join(look_a5, by = "age") |> + group_by(year, age_5, scenario) %>% + summarize(imm = sum(imm), .groups = "drop") + +imm_a5 |> + sszplot(aes_x = "year", aes_y = "imm", aes_col = "scenario", + labs_y = "immigration per year", + wrap = "age_5", ncol = 3, + scale_y = c(0, NA), + i_x = scen_begin, + width = 12, height = 6, + name = plot_name("1541a_imm_ya") + ) + + +``` + + + + + ### by year, age and origin ```{r} @@ -714,7 +882,7 @@ emi %>% emi %>% filter(scenario %in% uni_c[c(1, 3)]) %>% group_by(year, age_3) %>% - summarize(emi = sum(emi), .groups = "drop") %>% + summarize(emi = sum(emi), .groups = "drop") |> sszplot(aes_x = "year", aes_y = "emi", labs_y = "emigration per year", wrap = "age_3", ncol = 5, @@ -724,6 +892,30 @@ emi %>% name = plot_name("1551_emi_ya") ) ``` +### by year, age (children) and scenario + +```{r} +#| label: fig-1551a +#| fig-cap: emigration by year, age (children) and scenario + +emi_a5 <- emi |> + filter(age < age_5[3]) |> + left_join(look_a5, by = "age") |> + group_by(year, age_5, scenario) %>% + summarize(emi = sum(emi), .groups = "drop") + +emi_a5 |> + sszplot(aes_x = "year", aes_y = "emi", aes_col = "scenario", + labs_y = "emigration per year", + wrap = "age_5", ncol = 3, + scale_y = c(0, NA), + i_x = scen_begin, + width = 12, height = 6, + name = plot_name("1551a_imm_ya") + ) + + +``` ### by year, age and origin @@ -851,6 +1043,27 @@ foreign proportion: not possible to calculate for net migration cannot be applied here e.g. low values in the denominator if negative and positive value +### by year, age (children) and scenario + +```{r} +#| label: fig-1562 +#| fig-cap: net migration by year and age (children) + +imm_a5 |> + left_join(emi_a5, by = c("year", "age_5", "scenario")) |> + mutate(net = imm - emi) |> + sszplot(aes_x = "year", aes_y = "net", aes_col = "scenario", + labs_y = "net migration per year", + wrap = "age_5", ncol = 3, + scale_y = c(0, NA), + i_x = scen_begin, + width = 12, height = 6, + name = plot_name("1562_net_ya") + ) + +``` + + ## naturalization ### by year and scenario diff --git a/Plots/_quarto.yml b/Plots/_quarto.yml index 43c2cdd0..f31eb685 100644 --- a/Plots/_quarto.yml +++ b/Plots/_quarto.yml @@ -24,7 +24,6 @@ book: - 09_living_space.qmd - 10_allocation.qmd - 11_projects.qmd - - 12_ownership.qmd - 13_housing.qmd - 14_dem_house.qmd - 15_model_output.qmd diff --git a/README.md b/README.md index 11743d61..46d4b6e5 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ A log file is being created at [2_Data/6_Log](2_Data/6_Log). ## Documentation: +Verification charts may be found on [Github Pages.](https://statistikstadtzuerich.github.io/BevSzen/) + [Documentation (german)](https://www.stadt-zuerich.ch/prd/de/index/statistik/themen/bevoelkerung/bevoelkerungsentwicklung/bevoelkerungsszenarien.html#dokumentation) ## Author: diff --git a/data_freeze/2_Data/.gitignore b/data_freeze/2_Data/.gitignore deleted file mode 100644 index 668f5194..00000000 --- a/data_freeze/2_Data/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -1_Input -4_Rates -5_Outputs -6_Log -7_DWH -8_requests \ No newline at end of file diff --git a/data_freeze/2_Data/2_Lookup/lookupDistrict.csv b/data_freeze/2_Data/2_Lookup/lookupDistrict.csv deleted file mode 100644 index 37ecfb60..00000000 --- a/data_freeze/2_Data/2_Lookup/lookupDistrict.csv +++ /dev/null @@ -1,35 +0,0 @@ -QuarCd;QuarLang;distr -011;Rathaus;Kreis 1 -012;Hochschulen;Kreis 1 -013;Lindenhof;Kreis 1 -014;City;Kreis 1 -021;Wollishofen;Wollishofen -023;Leimbach;Leimbach -024;Enge;Enge -031;Alt-Wiedikon;Alt-Wiedikon -033;Friesenberg;Friesenberg -034;Sihlfeld;Sihlfeld -041;Werd;Werd -042;Langstrasse;Langstrasse -044;Hard;Hard -051;Gewerbeschule;Gewerbeschule -052;Escher Wyss;Escher Wyss -061;Unterstrass;Unterstrass -063;Oberstrass;Oberstrass -071;Fluntern;Fluntern -072;Hottingen;Hottingen -073;Hirslanden;Hirslanden -074;Witikon;Witikon -081;Seefeld;Seefeld -082;Mühlebach;Muehlebach -083;Weinegg;Weinegg -091;Albisrieden;Albisrieden -092;Altstetten;Altstetten -101;Höngg;Hoengg -102;Wipkingen;Wipkingen -111;Affoltern;Affoltern -115;Oerlikon;Oerlikon -119;Seebach;Seebach -121;Saatlen;Saatlen -122;Schwamendingen-Mitte;Schwamendingen-Mitte -123;Hirzenbach;Hirzenbach diff --git a/data_freeze/2_Data/2_Lookup/lookupDistrict.xlsx b/data_freeze/2_Data/2_Lookup/lookupDistrict.xlsx deleted file mode 100644 index 94754e94..00000000 Binary files a/data_freeze/2_Data/2_Lookup/lookupDistrict.xlsx and /dev/null differ diff --git a/data_freeze/2_Data/3_Parameter/parameter.csv b/data_freeze/2_Data/3_Parameter/parameter.csv deleted file mode 100644 index a87dd3bf..00000000 --- a/data_freeze/2_Data/3_Parameter/parameter.csv +++ /dev/null @@ -1,202 +0,0 @@ -category;parameter;parameter_old;lower;middle;upper;unit;relevance;description -time;date_start;daten.beginn;1993;1993;1993;year;no parameter (strictly speaking);begin of data -time;date_end;daten.ende;2022;2022;2022;year;no parameter (strictly speaking);end of data -time;scen_begin;szen.beginn;2023;2023;2023;year;no parameter (strictly speaking);future: begin -time;scen_end;szen.ende;2050;2050;2050;year;no parameter (strictly speaking);future: end -time;scen_end_public;no parameter in previous model;2045;2045;2045;year;no parameter (strictly speaking);future: end (in publication) -time;bir_base_begin;geb.basis.beginn;2010;2010;2010;year;medium;base period (in the past) for birth rate, begin -time;bir_base_end;geb.basis.ende;2022;2022;2022;year;medium;base period (in the past) for birth rate, end -time;bir_cha_base_begin;no parameter in previous model;2007;2007;2007;year;low;base period (in the past) for origin change (mother-baby), begin -time;bir_cha_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (in the past) for origin change (mother-baby), end -time;bir_sex_ratio_begin;no parameter in previous model;1993;1993;1993;year;low;base period (in the past) for sex ratio calculation, begin -time;bir_sex_ratio_end;no parameter in previous model;2022;2022;2022;year;low;base period (in the past) for sex ratio calculation, begin -time;dea_fso_date_start;no parameter in previous model;1993;1993;1993;year;low;fso mortality data of the past: begin -time;dea_fso_date_end;no parameter in previous model;2021;2021;2021;year;low;fso mortality data of the past: end -time;dea_base_begin;tod.basis.beginn;2012;2012;2012;year;low;base period (in the past) for death rate, begin (data should be available for both Zurich and Switzerland) -time;dea_base_end;tod.basis.ende;2021;2021;2021;year;low;base period (in the past) for death rate, end (data should be available for both Zurich and Switzerland) -time;ims_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for immigration* rate, begin -time;ims_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for immigration* rate, end -time;ims_so_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of sex and origin in immigration*, begin -time;ims_so_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of sex and origin in immigration*, end -time;ims_age_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of age in immigration*, begin -time;ims_age_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of age in immigration*, end -time;ems_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for emigration* rate, begin -time;ems_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for emigration* rate, end -time;ems_so_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of sex and origin in emigration*, begin -time;ems_so_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of sex and origin in emigration*, end -time;ems_age_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for proportion of age in emigration*, begin -time;ems_age_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for proportion of age in emigration*, end -time;rei_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for relocation based on immigration* (proportion), begin -time;rei_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for relocation based on immigration* (proportion), end -time;ree_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for relocation based on emigration* (proportion), begin -time;ree_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for relocation based on emigration* (proportion), end -time;nat_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for naturalization, begin -time;nat_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for naturalization, end -time;spa_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for living space, begin -time;spa_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for living space, end -time;spa_base_begin_52p;no parameter in previous model;2015;2015;2015;year;low;"base period (not the future) for living space, begin, district 'Escher Wyss' (district ID = 52; since empty apartments increased the mean living space values; before 2015)" -time;aca_base_begin;no parameter in previous model;2013;2013;2013;year;low;base period (not the future) for allocation, begin -time;aca_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for allocation, end -time;aca_base_begin_52p;no parameter in previous model;2015;2015;2015;year;low;"base period (not the future) for allocation, begin, district 'Escher Wyss' (district ID = 52; since empty apartments decreased the mean allocation values; before 2015)" -time;pro_begin;map.wohnbau.beginn;2023;2023;2023;year;low;"first year (of consolidated project list; reasonable: first scenario year)" -time;pro_end;map.wohnbau.ende;2035;2035;2035;year;low;last year (of consolidated project list) -time;own_base_begin;no parameter in previous model;2015;2015;2015;year;low;base period (not the future) for ownership calculation, begin -time;own_base_end;no parameter in previous model;2022;2022;2022;year;low;base period (not the future) for ownership calculation, end -age;age_min;no parameter in previous model;0;0;0;years (age);low;minimum age in the model -age;age_max;no parameter in previous model;120;120;120;years (age);low;maximum age in the model (should be clearly higher than maximum age in the population) -general;round_rate;no parameter in previous model;4;4;4;digits (rate in percent per year);no parameter;rounding of rates (digits, rate in percent per year) -general;round_prop;no parameter in previous model;4;4;4;digits (proportion in percent);no parameter;rounding of proportion (digits, proportion in percent) -general;round_area;no parameter in previous model;4;4;4;digits (area);no parameter;rounding of area (e.g. ha in the capacity and reserve module) -general;round_people;no parameter in previous model;0;0;0;digits (people);no parameter;rounding of people -general;round_aca;no parameter in previous model;4;4;4;digits (people per apartment);no parameter;rounding of allocation (people per apartment) -general;round_people_scen;no parameter in previous model;100;100;100;people (not digits);no parameter;"rounding of people (for future values; scenarios)" -general;round_prop_scen;no parameter in previous model;0;0;0;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios)" -general;round_prop_scen_a;no parameter in previous model;1;1;1;digits (proportion in percent);no parameter;"rounding of proportion (for future values; scenarios): comparison to previous scenarios by age" -birth;bir_age_begin;geb.alter.beginn;15;15;15;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): begin -birth;bir_age_end;geb.alter.ende;49;49;49;year;no parameter (strictly speaking);fertility rate: fertile age (fixed expression): end -birth;bir_thres_origin;geb.anz.rate.heimat;100;100;100;persons;low;"age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the rate based on origin (but not district) is used. -" -birth;bir_thres_overall;geb.anz.rate.stadt;50;50;50;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then the overall rate is used (e.g not the rate based on origin and district). -birth;bir_thres_const;geb.anz.rate.const;25;25;25;persons;low;age distribution of women (population): if there are less women than this threshold in the tails (cumulative measure), then a constant rate is used (e.g not the rate based on origin and district). The constant rate is set by the parameter bir_thres_value. -birth;bir_thres_value;geb.wert.rate.const;0;0;0;birth per woman and year in %;low;birth rate: if there are less women than a certain threshold (bir_thres_const) a constant fertility rate is used. The values is chosen with this parameter. -birth;bir_fer_span;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" -birth;bir_prop_trend;geb.anteil.trend;20;20;20;percent;medium;"trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_thres_percent;geb.grenze.prozent;20;20;20;percent;low;"It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." -birth;bir_window_thres;geb.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). -birth;bir_lower_thres;no parameter in previous model;0;0;0;percent per year;low;lower threshold for the rate (e.g. the birth rate should not be negative), NA if there is no lower threshold -birth;bir_upper_thres;no parameter in previous model;NA;NA;NA;percent per year;low;upper threshold for the rate, NA if there is no upper threshold -birth;bir_plot_lim;no parameter in previous model;30;30;30;percent per year;no parameter;"the fertility rates of the past are compared with the predictions; the y-axis is limited (since the fertility rate of the past can be very large due to low population)" -birth;bir_fer_span_pred;no parameter in previous model;0.15;0.15;0.15;no unit;low;"after the prediction: proportion of data points used in the LOESS regressions of fertility by age; groups: district, year, origin" -birth;bir_cha_trend;geb.heimat.anteil.trend;0;0;0;percent;low;"origin change (mother-baby): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_cha_prop_trend;no parameter in previous model;20;20;20;percent;medium;"origin change (mother-baby): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -birth;bir_cha_thres_percent;no parameter in previous model;20;20;20;percent;low;"origin change (mother-baby): It is not realistic that the fertility rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential future fertility rates (change in percent of mean; e.g. +/- 20%)." -birth;bir_cha_window_thres;no parameter in previous model;13;13;13;years;low;origin change (mother-baby): filter over years (to smooth a potential break in the curve due to range of future fertility rates: bir_thres_percent). -birth;bir_cha_lower_thres;no parameter in previous model;0;0;0;percent;low;origin change (mother-baby): lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -birth;bir_cha_upper_thres;no parameter in previous model;100;100;100;percent;low;origin change (mother-baby): upper threshold for the rate (here: not more than 100 %), NA if there is no lower threshold -death;dea_lower;tod.jung.alter.ende.schweiz, tod.jung.alter.ende.ausland;30;30;30;years (age);low;"lower age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" -death;dea_upper;tod.alt.alter.beginn.schweiz, tod.alt.alter.beginn.ausland;99;99;99;years (age);low;"upper age limit of age-dependent ratio (death rates of Zurich and entire Switzerland); comment: limit not included in range with age-dependence" -death;dea_radix;no parameter in previous model;100000;100000;100000;persons;no;radix (starting population) for life expectancy calcuation (no effect on result) -death;dea_age_at;no parameter in previous model;0;0;0;years (age);no;"life expectancy at certain age (usually at birth; i.e. age zero)" -death;dea_age_max_le;tod.alt.alter.ende;120;120;120;years (age);low;maximum age for the estimation of the life expectancy -death;dea_fso_cat_past;no parameter in previous model;2;2;2;no unit;no parameter;Category in the FSO data: (smoothed) data of the past -death;dea_fso_cat_future;no parameter in previous model;3;3;3;no unit;no parameter;Category in the FSO data: data of the future -death;dea_qx_NA_le;no parameter in previous model;0.8;0.8;0.8;per year;low;if there is no one at a certain age in the population (e.g. no 96 year old men), then qx (probability to die between age x and x+1) is NA. However, a value is need to multiply the subsequent survival probabilities -death;dea_mor_span;no parameter in previous model;0.2;0.2;0.2;no unit;low;"proportion of data points used in the LOESS regressions of mortality by age; groups: sex, region (City of Zurich, Switzerland)" -immigration*;ims_rate_prop_trend;zuz.rate.anteil.trend;20;20;20;percent;low;"immigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_rate_thres_percent;zuz.rate.grenze.prozent;20;20;20;percent;low;"It is not realistic that the immigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -immigration*;ims_rate_window_thres;zuz.rate.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future immigration* rates: imm_rate_thres_percent). -immigration*;ims_rate_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -immigration*;ims_so_prop_trend;zuz.ghvert.anteil.trend;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_so_thres_percent;zuz.ghvert.grenze.prozent;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -immigration*;ims_so_window_thres;"zuz.ghvert.window.grenz -";13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions -immigration*;ims_so_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -immigration*;ims_span_y;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the loess regressions of proportion by year; groups: district, age, sex, origin (immigration* by district, year, age, sex, origin)" -immigration*;ims_span_a;no parameter in previous model;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" -immigration*;ims_age_prop_trend;no parameter in previous model;20;20;20;percent;low;"age distribution of immigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -immigration*;ims_age_thres_percent;no parameter in previous model;20;20;20;percent;low;"age distribution of immigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -immigration*;ims_age_window_thres;no parameter in previous model;13;13;13;years;low;age distribution of immigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions -immigration*;ims_age_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;age distribution of immigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -emigration*;ems_rate_prop_trend;weg.rate.anteil.trend;20;20;20;percent;low;"emigration rate*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_rate_thres_percent;weg.rate.grenze.prozent;20;20;20;percent;low;"It is not realistic that the emigration* rates changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -emigration*;ems_rate_window_thres;weg.rate.window.grenz;13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future emigration* rates: imm_rate_thres_percent). -emigration*;ems_rate_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the rate (here: the rate should not be negative), NA if there is no lower threshold -emigration*;ems_so_prop_trend;weg.ghvert.anteil.trend;20;20;20;percent;low;"proportion of sex and origin: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_so_thres_percent;weg.ghvert.grenze.prozent;20;20;20;percent;low;"It is not realistic that the proportions of sex and origin change dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -emigration*;ems_so_window_thres;"weg.ghvert.window.grenz -";13;13;13;years;low;filter over years (to smooth a potential break in the curve due to range of future proportions -emigration*;ems_so_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -emigration*;ems_span_y;no parameter in previous model;0.3;0.3;0.3;no unit;low;"proportion of data points used in the LOESS regressions of proportion by year; groups: district, age, sex, origin (emigration* by district, year, age, sex, origin)" -emigration*;ems_span_a;no parameter in previous model;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, sex, origin (age proportion by district, year, sex, origin)" -emigration*;ems_age_prop_trend;no parameter in previous model;20;20;20;percent;low;"age distribution of emigrations*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -emigration*;ems_age_thres_percent;no parameter in previous model;20;20;20;percent;low;"age distribution of emigrations*: It is not realistic that the proportion of age changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -emigration*;ems_age_window_thres;no parameter in previous model;13;13;13;years;low;age distribution of emigrations*: filter over years (to smooth a potential break in the curve due to range of future proportions -emigration*;ems_age_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;age distribution of emigrations*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and immigration*;rei_age_max;umz.alter.max;70;70;70;years;low;as of this age: one single proportion (relocation on immigration*) -relocation and immigration*;rei_ims_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, year, origin" -relocation and immigration*;rei_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" -relocation and immigration*;rei_ims_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of immigration* by age; groups: district, origin" -relocation and immigration*;rei_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" -relocation and immigration*;rei_ims_thres_y;similar to umz.anz.rate.stadt;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). -relocation and immigration*;rei_prop_span;similar to umz.window.alter;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" -relocation and immigration*;rei_prop_trend;umz.anteil.trend;20;20;20;percent;low;"relocation proportion on immigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -relocation and immigration*;rei_thres_percent;no parameter in previous model;20;20;20;percent;low;"relocation proportion on immigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -relocation and immigration*;rei_window_thres;no parameter in previous model;13;13;13;years;low;relocation proportion on immigration*: filter over years (to smooth a potential break in the curve due to range of future proportions -relocation and immigration*;rei_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and immigration*;rei_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;relocation proportion on immigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -relocation and immigration*;rei_pred_span;similar to umz.window.alter;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions of the prediction (proportion) by age; groups: district, year, origin" -relocation and emigration*;ree_age_max;umz.alter.max;70;70;70;years;low;as of this age: one single proportion (relocation on emigration*) -relocation and emigration*;ree_ems_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, year, origin" -relocation and emigration*;ree_rel_span_dyao;similar to umz.window.alter;0.2;0.2;0.2;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, year, origin" -relocation and emigration*;ree_ems_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of emigration* by age; groups: district, origin" -relocation and emigration*;ree_rel_span_dao;similar to umz.window.alter;0.12;0.12;0.12;no unit;medium;"proportion of data points used in the LOESS regressions of relocation by age; groups: district, origin" -relocation and emigration*;ree_ems_thres_y;similar to umz.anz.rate.heimat;0.4;0.4;0.4;persons per year;low;when immigration* is above this threshold: proportion with year (and district, age, origin), below without year (but with district, age, origin). -relocation and emigration*;ree_prop_span;similar to umz.window.alter;0.3;0.3;0.3;no unit;medium;"proportion of data points used in the LOESS regressions of proportion by age; groups: district, year, origin" -relocation and emigration*;ree_prop_trend;umz.anteil.trend;20;20;20;percent;low;"relocation proportion on emigration*: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -relocation and emigration*;ree_thres_percent;no parameter in previous model;20;20;20;percent;low;"relocation proportion on emigration*: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -relocation and emigration*;ree_window_thres;no parameter in previous model;13;13;13;years;low;relocation proportion on emigration*: filter over years (to smooth a potential break in the curve due to range of future proportions -relocation and emigration*;ree_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -relocation and emigration*;ree_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;relocation proportion on emigration*: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -relocation and emigration*;ree_pred_span;similar to umz.window.alter;0.15;0.15;0.15;no unit;medium;"after expansion of the prediction to age beyond age threshold: proportion of data points used in the LOESS regressions the prediction (proportion) by age; groups: district, year, origin" -naturalization;nat_pop_span_das;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: district, sex" -naturalization;nat_nat_span_das;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: district, sex" -naturalization;nat_pop_thres;similar to brw.rate.anz.null;0.5;0.5;0.5;persons;low;if less persons in the (smoothed) foreign population than this threshold: then the naturalization rate is set to nat_pop_value -naturalization;nat_pop_value;no parameter in previous model;0;0;0;percent per year;low;value of the naturalization rate, if the foreign population is below nat_pop_thres -naturalization;nat_rate_span_das;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, sex" -naturalization;nat_pop_span_ya;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; groups: year (base years only)" -naturalization;nat_nat_span_ya;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; groups: year (base years only)" -naturalization;nat_rate_span_ya;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: year (base years only)" -naturalization;nat_prop_trend;brw.anteil.trend;20;20;20;percent;low;"naturalization: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -naturalization;nat_thres_percent;no parameter in previous model;20;20;20;percent;low;"naturalization: It is not realistic that the rate changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential rates (change in percent of mean; e.g. +/- 20%)." -naturalization;nat_window_thres;no parameter in previous model;13;13;13;years;low;naturalization: filter over years (to smooth a potential break in the curve due to range of future proportions -naturalization;nat_lower_thres;no parameter in previous model;0;0;0;percent;low;naturalization: lower threshold for the proportions (here: the naturalization rates should not be negative), NA if there is no lower threshold -naturalization;nat_pop_span_a;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of foreign population by age; no groups (base years only)" -naturalization;nat_nat_span_a;similar to brw.window.alter;0.15;0.15;0.15;no unit;low;"proportion of data points used in the LOESS regressions of naturalization by age; no groups (base years only)" -naturalization;nat_rate_span_a;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; no groups (base years only)" -naturalization;nat_factor_thres;no parameter in previous model;0.5;0.5;0.5;naturalizations per year;low;if the naturalization rate is below this threshold: then the trend factor ist set to nat_factor_value -naturalization;nat_factor_value;no parameter in previous model;0;0;0;no unit;low;value of the trend factor, if the naturalization rate is below nat_factor_thres -naturalization;nat_rate_span_dyas;similar to brw.window.alter;0.1;0.1;0.1;no unit;low;"proportion of data points used in the LOESS regressions of the rate by age; groups: district, year, sex" -capacity and reserves;car_sc;kareb.vf;25;25;25;percent;medium;"Proportion of staircases; for the conversion from total area to living area." -capacity and reserves;car_resi;kareb.wohnant;-30;10;50;percent;high;Residence portion ('slider'): -100% = minimum residential share according to the building regulation (BZO), 0% = real residential share, +100% = maximum residential share according to building regulation. -capacity and reserves;car_plot;kareb.areal;0;50;100;percent;high;"Proportion of plot construction ('slider'); 0% = without plot construction, 100% = with plot construction" -capacity and reserves;car_uti_input;no parameter in previous model;85;85;85;percent;high;degree of utilization used to calculate the input data -capacity and reserves;car_uti;kareb.ausbau;75;85;95;percent;high;"degree of utilization; linear influence on the capacity" -capacity and reserves;car_pp;kareb.ina.prozentpunkte;0;0;0;percent points;medium;usage: less or more percentage points (parameter between -100 and +100) -capacity and reserves;car_y;kareb.ina.jahr;2048;2048;2048;year;low;Reference year of the usage values -capacity and reserves;car_lambda;kareb.ina.lambda;-0.04;-0.04;-0.04;per year;high;"lambda value of an exponential function exp(lambda * time since start of scenario); proportion of utilization per year" -living space;spa_apart;wf.anzwohn;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" -living space;spa_prop_trend;wf.anteil.trend;0;20;50;percent;high;"living space: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -living space;spa_thres_percent;wf.grenze.prozent;20;20;20;percent;low;"living space: It is not realistic that the living space changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." -living space;spa_window_thres;wf.window.szen;7;7;7;years;low;living space: filter over years (to smooth a potential break in the curve due to range of future proportions -living space;spa_prop_trend_52p;no parameter in previous model;0;0;0;percent;low;"living space in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -allocation;aca_apart;bq.anzwohn;500;500;500;apartments;low;"Amount of apartments per district and owner; if less apartments, then the value of the entire city (by owner) is used" -allocation;aca_prop_trend;bq.anteil.trend;0;20;50;percent;high;"allocation: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -allocation;aca_thres_percent;bq.grenze.prozent;20;20;20;percent;low;"allocation: It is not realistic that the allocation values change dramatically (i.e. tenfold ncrease). Therefore, this threshold regulates the range of potential changes (change in percent of mean; e.g. +/- 20%)." -allocation;aca_window_thres;bq.window.szen;7;7;7;years;low;allocation: filter over years (to smooth a potential break in the curve due to range of future proportions -allocation;aca_prop_trend_52p;no parameter in previous model;0;0;0;percent;low;"allocation in the Escher Wyss district (district-ID = 52): trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -projects;pro_lambda_begin;map.lambda.beginn;3;3;3;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the beginning of the time period (of the consolidated project list)." -projects;pro_lambda_end;map.lambda.ende;0.5;0.5;0.5;per year;low;"the time delay of the projects (consolidated project list) is determined by means of an exponential function (with lambda); value at the end of the time period (of the consolidated project list)." -projects;pro_transfo;no parameter in previous model;5;5;5;no unit;low;transformation parameter (non-linear curve from pro_lambda_begin to pro_lambda_end) -projects;pro_max_delay;no parameter in previous model;5;5;5;years;low;maximum delay -projects;pro_not_scheduled_ip;part of map.nicht1 (projektiert);30;30;30;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, from Infoplan -projects;pro_not_scheduled_other;part of map.nicht1 (projektiert);20;20;20;percent;high;Percentage of projects (i.e. apartments) that are not realized: scheduled, other -projects;pro_not_submitted;map.nicht2 (eingereicht);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: submitted -projects;pro_not_approved;map.nicht3 (bewilligt);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: approved -projects;pro_not_started;map.nicht4 (Bau begonnen);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: started -projects;pro_not_completed;map.nicht5 (fertiggestellt);0;0;0;percent;high;Percentage of projects (i.e. apartments) that are not realized: completed -projects;pro_not_onhold;map.nicht6 (sistiert);10;10;10;percent;high;Percentage of projects (i.e. apartments) that are not realized: on hold -ownership;own_prop_trend;ea.anteil.trend;50;50;50;percent;low;"ownership: trend in addition to the mean; 20% means, 20% of the difference between trend and mean is added to the mean." -ownership;own_thres_percent;ea.grenze.prozent;20;20;20;percent;low;"ownership: It is not realistic that the proportion changes dramatically (i.e. tenfold increase). Therefore, this threshold regulates the range of potential proportions (change in percent of mean; e.g. +/- 20%)." -ownership;own_window_thres;ea.window.szen;7;7;7;years;low;ownership: filter over years (to smooth a potential break in the curve due to range of future proportions -ownership;own_lower_thres;no parameter in previous model;0;0;0;percent;no parameter;ownership: lower threshold for the proportions (here: the proportions should not be negative), NA if there is no lower threshold -ownership;own_upper_thres;no parameter in previous model;100;100;100;percent;no parameter;ownership: lower threshold for the proportions (here: the proportions should not be more than 100 percent), NA if there is no lower threshold -housing model;car_coop;similar to wohn.modell.typ;100;100;100;percent;low;Percentage of cooperative housing can be used from capacity/reserves (car_coop = 100), or from the trends in the districts (car_coop = 0) or a mixture of both data sources. In other words: car_coop = percentage used from capacity/reserves. -housing model;car_trust;no parameter in previous model;0;0;0;percent;high;If the amount of people according to the project list exceeds the population (in a given year!) according to capacity/reserves: trust the capacity/reserves number (parameter = 100%)? Or the project list (parameter = 0%)? -housing model;car_max_trust;no parameter in previous model;100;100;100;percent;high;If the amount of people exceeds the maximum (over all years!) according to capacity/reserves: trust the capacity/reserves population (parameter = 100%)? Or the calculated population (parameter = 0%)? Idea: not more people than population according to reserves usage -housing model;empty_coop;similar to wohn.modell.anteil.leerwhg;0;0;0;percent;low;Percentage of empty apartments: cooperative housing -housing model;empty_private;similar to wohn.modell.anteil.leerwhg;0;0;0;percent;low;Percentage of empty apartments: private housing -demography and housing model;less_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);75;75;75;percent;high;less living space available (according to reserves, compared to trend calcuation). Then immigration* is decreased, and emigration* increased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) -demography and housing model;more_ims;similar to mod.ant.zuz (in the previous model only one parameter for both situations: less or more living space available);50;50;50;percent;high;more living space available (according to reserves, compared to trend calcuation). Then immigration* is increased, and emigration* decreased. This parameter determines how much of the difference is compensated by changes of immigration* (the remainder is corrected with emigration*) -demography and housing model;deh_span;no parameter in previous model;0.04;0.04;0.04;no unit;medium;"in future population: proportion of data points used in the LOESS regressions by age; groups: district, year, sex, origin" -output;basis_fact;no parameter in previous model;1;1;1;no unit;no parameter;value for field BasisSzenarienCd in DWH for factual values from the past -output;basis_scen;no parameter in previous model;2;2;2;no unit;no parameter;value for field BasisSzenarienCd in DWH for calculated scenario values diff --git a/data_freeze/2_Data/3_Parameter/variables.yml b/data_freeze/2_Data/3_Parameter/variables.yml deleted file mode 100644 index e31dd47a..00000000 --- a/data_freeze/2_Data/3_Parameter/variables.yml +++ /dev/null @@ -1,134 +0,0 @@ -# plots ----------------------------------------------------------- -pdf_output: FALSE - - -# Paths ----------------------------------------------------------- -# path for code -code_path: !expr paste0(here::here(), "/1_Code/") - -# path for data -data_path: !expr paste0(here::here(), "/2_Data/") - -# log file -log_file: !expr paste0(here::here(), "/2_Data/6_Log/log.txt") - -# temporary path (since data not on open data yet) -car_path: !expr paste0(here::here(), "/2_Data/1_Input/KaReB.csv") - -# path for results (graphics) -res_path: !expr paste0(here::here(), "/3_Results/") - -# path for exports (rates) -exp_path: "4_Rates/" - -# path for outputs (future: population and demographic processes) -out_path: "5_Outputs/" - -# district file -dis_file: "/2_Data/2_Lookup/lookupDistrict.csv" - -# parameter file -para_file: "/2_Data/3_Parameter/parameter.csv" - -# output path for quarto book -book_path: "/3_Results/book" - - -# values ----------------------------------------------------------- -# capacity, reserves (car) -car_initial: ["Kapazitaet", "Bestand", "Reserve", "Inanspruchnahme"] -car_category: ["capacity", "buildings", "reserve", "usage"] - -# project status -pro_initial: ["projektiert, Infoplan", "projektiert, andere", "eingereicht", "bewilligt", "Bau begonnen", "fertiggestellt", "sistiert"] -pro_category: ["scheduled, Infoplan", "scheduled, other", "submitted", "approved", "construction started", "completed", "on hold"] - - -# unique levels ----------------------------------------------------------- - -# sex -text_s: ["male", "female"] - -# origin -text_o: ["Swiss", "foreign"] - -# region -text_r: ["Zurich", "Switzerland"] - -# residence portion -text_e: ["minimum portion", "real portion", "maximum portion"] - -# plot construction -text_p: ["with plot construction", "without plot construction"] - -# property owner -text_w: ["cooperative housing", "private housing"] - -# indicator (new or removed apartments)8 -text_i: ["new", "removed"] - -# past and scenarios -text_c: ["past", "lower", "middle", "upper"] - - -# categories (t = text) and associated lookup tables ---------------------- -# age category 1 -age_1: [30, 40] -age_1t: ["0-29", "30-39", "40-49"] - -# age category 2 -age_2: !expr seq(25, 40, by = 5) -age_2t: ["15-24", "25-29", "30-34", "35-39", "40-49"] - -# age category 3 -age_3: !expr seq(0, 90, by = 10) -age_3t: ["0-9", "10-19", "20-29", "30-39", "40-49", "50-59", "60-69", "70-79", "80-89", "90+"] - -# age category 4 -age_4: !expr seq(0, 80, by = 20) -age_4t: ["0-19", "20-39", "40-59", "60-79", "80+"] - - -# colors, graphics -------------------------------------------------------- -# colors (e.g. for sex, origin) -col_6: ["#005CA9", "#83072A", "#EB5E04", "#FBBA00", "#007229", "#9B9B9B"] - -# grey -col_grey: "grey90" - - -# open data (od) ---------------------------------------------------------- - -# population (pop) -pop_od: "https://data.stadt-zuerich.ch/dataset/80d5c8af-b389-41d2-b6d8-d0deb1639f00/resource/b2abdef7-3e3f-4883-8033-6787a1561987/download/bev390od3903.csv" - -# birth (bir) -bir_od: "https://data.stadt-zuerich.ch/dataset/aef0654e-1691-49a2-b5fd-2fb220b78bfd/resource/6b066954-c9ce-4438-be0a-6ab01b3e525b/download/bev570od5702.csv" - -# death (dea) -dea_od: "https://data.stadt-zuerich.ch/dataset/bev_todesfaelle_jahr_alter_geschlecht_herkunft_quartier_od5703/download/BEV570OD5703.csv" - -# death (dea, data of the Federal Statistical Office FSO) -dea_fso_od: "https://data.stadt-zuerich.ch/dataset/bfs_bev_sterberaten_jahr_alter_geschlecht_herkunft_od5708/download/BEV570OD5708.csv" - -# immigration (imm) -# migration in the City of Zurich; across the city border -imm_od: "https://data.stadt-zuerich.ch/dataset/bev_zuz_jahr_quartier_alter_geschlecht_herkunft_od5704/download/BEV570OD5704.csv" - -# emigration (emi) -# migration out of the City of Zurich; across the city border -emi_od: "https://data.stadt-zuerich.ch/dataset/bev_wegz_jahr_quartier_alter_geschlecht_herkunft_od5705/download/BEV570OD5705.csv" - -# relocation (rel) -# migration within the City of Zurich; inside the city border -rel_od: "https://data.stadt-zuerich.ch/dataset/bev_umzuege_jahr_quartier_alter_geschlecht_herkunft_od5706/download/BEV570OD5706.csv" - -# naturalization (nat) -# on the open data platform the data consist both of naturalization and denaturalization -nat_od: "https://data.stadt-zuerich.ch/dataset/bev_brw_jahr_alter_geschlecht_herkunft_quartier_od5707/download/BEV570OD5707.csv" - -# living space (spa) -spa_od: "https://data.stadt-zuerich.ch/dataset/bau_best_whg_geb_gebmwhg_wfl_pers_statzone_jahr_od6981/download/BAU698OD6981.csv" - -# population scenarios on open data (sce) -sce_od: "https://data.stadt-zuerich.ch/dataset/bev_szenarien_od3440/download/BEV344OD3440.csv"