From 17210c692c7107cb996b8ac8df7e61d38a209fa5 Mon Sep 17 00:00:00 2001 From: erikarasnick Date: Thu, 16 May 2024 15:53:22 -0400 Subject: [PATCH] use "max" land_use instead of most frequent --- inst/05_make_apt_pseudoids.R | 7 +++++-- inst/apt_complex_pseudoids.csv | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/inst/05_make_apt_pseudoids.R b/inst/05_make_apt_pseudoids.R index 96a4387..6e375c7 100644 --- a/inst/05_make_apt_pseudoids.R +++ b/inst/05_make_apt_pseudoids.R @@ -28,6 +28,9 @@ apt_pseudoids <- d_apartment_ids |> group_by(complex_id) |> summarize(land_use = collapse::fmode(land_use), - market_total_value = sum(market_total_value)) + market_total_value = sum(market_total_value)) |> + mutate(land_use = case_when( + str_sub(land_use, 1, 9) == "apartment" ~ "apartment, 40+ units", + TRUE ~ land_use)) -write_csv(apt_psuedoids, "inst/apt_complex_pseudoids.csv") +write_csv(apt_pseudoids, "inst/apt_complex_pseudoids.csv") diff --git a/inst/apt_complex_pseudoids.csv b/inst/apt_complex_pseudoids.csv index 1c0b6da..ed3fcb4 100644 --- a/inst/apt_complex_pseudoids.csv +++ b/inst/apt_complex_pseudoids.csv @@ -3,7 +3,7 @@ bahama,"apartment, 40+ units",3171640 clovernook,"apartment, 40+ units",12829330 dewdrop,"apartment, 40+ units",11650170 hawaiian,condominium unit,3950510 -silver_oaks,"apartment, 4-19 units",2432020 +silver_oaks,"apartment, 40+ units",2432020 villages_at_roll_hill,"apartment, 40+ units",22389100 walden_glen,"apartment, 40+ units",11638970 winton_hills_mha,metropolitan housing authority,26596930