From 14aabe44691c80a5fc62c32b499bdf733df39259 Mon Sep 17 00:00:00 2001 From: William Ridgeway <10358980+wrridgeway@users.noreply.github.com> Date: Tue, 28 May 2024 09:52:42 -0500 Subject: [PATCH] Remove common area specific valuation (#47) * Remove common area code * Bump renv and R versions, renv repo * add renv reqs * Bump pre-commit renv version --- params.yaml | 4 ---- pipeline/02-assess.R | 12 +----------- pipeline/05-finalize.R | 1 - pipeline/07-export.R | 5 ----- renv/activate.R | 5 ----- 5 files changed, 1 insertion(+), 26 deletions(-) diff --git a/params.yaml b/params.yaml index 0ab1227..4612772 100644 --- a/params.yaml +++ b/params.yaml @@ -337,10 +337,6 @@ model: # Parameters used in the assess stage to finalize the intial model predictions pv: - # For nonlivable units, anything below this value gets the same value as the - # prior year - nonlivable_threshold: 1000 - # Cap the proportion of the PIN's total value dedicated to land. This is # necessary since sometimes the model provides low predictions relative to the # land rates created by Valuations diff --git a/pipeline/02-assess.R b/pipeline/02-assess.R index 9020de9..50449b5 100644 --- a/pipeline/02-assess.R +++ b/pipeline/02-assess.R @@ -105,17 +105,7 @@ assessment_data_bldg <- assessment_data_pred %>% na.rm = TRUE ), pred_pin_final_fmv = bldg_total_value_livable * - (adj_pro_rate / bldg_total_proration_rate_livable), - # For certain units (common areas), we want to have a consistent low value - # across time (usually $10) - pred_pin_final_fmv = case_when( - meta_modeling_group == "NONLIVABLE" & - (meta_mailed_tot * 10) <= params$pv$nonlivable_threshold ~ - meta_mailed_tot * 10, - meta_modeling_group == "NONLIVABLE" & - is.na(meta_mailed_tot) ~ 10, - TRUE ~ pred_pin_final_fmv - ) + (adj_pro_rate / bldg_total_proration_rate_livable) ) %>% ungroup() diff --git a/pipeline/05-finalize.R b/pipeline/05-finalize.R index 9b3f85d..bbe182c 100644 --- a/pipeline/05-finalize.R +++ b/pipeline/05-finalize.R @@ -97,7 +97,6 @@ metadata <- tibble::tibble( cv_no_improve = params$cv$no_improve, cv_split_prop = params$cv$split_prop, cv_best_metric = params$cv$best_metric, - pv_nonlivable_threshold = params$pv$nonlivable_threshold, pv_land_pct_of_total_cap = params$pv$land_pct_of_total_cap, pv_round_break = list(params$pv$round_break), pv_round_to_nearest = list(params$pv$round_to_nearest), diff --git a/pipeline/07-export.R b/pipeline/07-export.R index 82425f1..d145625 100644 --- a/pipeline/07-export.R +++ b/pipeline/07-export.R @@ -110,11 +110,6 @@ assessment_pin_prepped <- assessment_pin %>% ", ", loc_property_zip ), meta_pin10 = str_sub(meta_pin, 1, 10), - flag_common_area = replace_na( - as.logical(as.numeric(flag_prior_near_to_pred_unchanged)) & - prior_near_tot <= params$pv$nonlivable_threshold, - 0 - ), across( ends_with("added_later") & where(is.logical), ~ as.numeric(.x) diff --git a/renv/activate.R b/renv/activate.R index 017de50..4bfe543 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -650,7 +650,6 @@ local({ auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) if (is.na(auto) && getRversion() >= "4.4.0") auto <- "TRUE" - if (auto %in% c("TRUE", "True", "true", "1")) return(renv_bootstrap_platform_prefix_auto()) @@ -847,13 +846,11 @@ local({ paste("rstudio/renv", description[["RemoteSha"]], sep = "@") else paste("renv", description[["Version"]], sep = "@") - # display both loaded version + sha if available friendly <- renv_bootstrap_version_friendly( version = description[["Version"]], sha = if (dev) description[["RemoteSha"]] ) - fmt <- heredoc(" renv %1$s was loaded from project library, but this project is configured to use renv %2$s. - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. @@ -1080,7 +1077,6 @@ local({ # if jsonlite is loaded, use that instead if ("jsonlite" %in% loadedNamespaces()) { - json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -1159,7 +1155,6 @@ local({ # remap strings in object remapped <- renv_json_read_remap(json, map) - # evaluate eval(remapped, envir = baseenv())