Skip to content

Commit

Permalink
use "max" land_use instead of most frequent
Browse files Browse the repository at this point in the history
  • Loading branch information
erikarasnick committed May 16, 2024
1 parent e2b0895 commit 17210c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions inst/05_make_apt_pseudoids.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion inst/apt_complex_pseudoids.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17210c6

Please sign in to comment.