Skip to content

Commit

Permalink
Remove common area specific valuation (#47)
Browse files Browse the repository at this point in the history
* Remove common area code

* Bump renv and R versions, renv repo

* add renv reqs

* Bump pre-commit renv version
  • Loading branch information
wrridgeway authored May 28, 2024
1 parent 8ab48ed commit 14aabe4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 26 deletions.
4 changes: 0 additions & 4 deletions params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions pipeline/02-assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 0 additions & 1 deletion pipeline/05-finalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 0 additions & 5 deletions pipeline/07-export.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1159,7 +1155,6 @@ local({

# remap strings in object
remapped <- renv_json_read_remap(json, map)

# evaluate
eval(remapped, envir = baseenv())

Expand Down

0 comments on commit 14aabe4

Please sign in to comment.