diff --git a/README.Rmd b/README.Rmd index a6a112c..667cd9c 100644 --- a/README.Rmd +++ b/README.Rmd @@ -67,27 +67,27 @@ Because our office (mostly) cannot observe individual condo unit characteristics library(dplyr) library(tidyr) library(yaml) -params <- read_yaml("params.yaml") + +condo_params <- read_yaml("params.yaml") +condo_preds <- condo_params$model$predictor$all + +res_params <- read_yaml( + "https://raw.githubusercontent.com/ccao-data/model-res-avm/master/params.yaml" +) +res_preds <- res_params$model$predictor$all + +condo_unique_preds <- setdiff(condo_preds, res_preds) + ccao::vars_dict %>% - filter( - var_is_predictor, - !var_name_model %in% c("meta_sale_price") - ) %>% inner_join( - as_tibble(params$model$predictor$all), + as_tibble(condo_preds), by = c("var_name_model" = "value") ) %>% - filter( - stringr::str_starts(var_name_model, "char_", negate = TRUE) | - var_name_model %in% c("char_yrblt", "char_land_sf") | - var_model_type == "condo", - stringr::str_starts(var_name_model, "ind_", negate = TRUE) - ) %>% distinct( + var_name_model, `Feature Name` = var_name_pretty, Category = var_type, Type = var_data_type, - var_model_type ) %>% mutate( Category = recode( @@ -106,13 +106,15 @@ ccao::vars_dict %>% ) ) %>% mutate(`Unique to Condo Model` = ifelse( - var_model_type == "condo" | - `Feature Name` %in% - c("Condominium Building Year Built", "Condominium % Ownership"), + var_name_model != "loc_tax_municipality_name" & ( + var_name_model %in% condo_unique_preds | + `Feature Name` %in% + c("Condominium Building Year Built", "Condominium % Ownership") + ), "X", "" )) %>% arrange(desc(`Unique to Condo Model`), Category) %>% - select(-var_model_type) %>% + select(-var_name_model) %>% knitr::kable(format = "markdown") ``` diff --git a/README.md b/README.md index 81e7aed..ba42876 100644 --- a/README.md +++ b/README.md @@ -152,12 +152,12 @@ the 2023 assessment model. | Percent Population Mobility, Moved From Within Same County in Past Year | acs5 | numeric | | | Longitude | loc | numeric | | | Latitude | loc | numeric | | -| Municipality Name | loc | character | | | FEMA Special Flood Hazard Area | loc | logical | | | First Street Factor | loc | numeric | | | First Street Risk Direction | loc | numeric | | | School Elementary District GEOID | loc | character | | | School Secondary District GEOID | loc | character | | +| Municipality Name | loc | character | | | CMAP Walkability Score (No Transit) | loc | numeric | | | CMAP Walkability Total Score | loc | numeric | | | Airport Noise DNL | loc | numeric | |