Skip to content

Commit

Permalink
add psedoids to inst
Browse files Browse the repository at this point in the history
  • Loading branch information
erikarasnick committed May 16, 2024
1 parent cf8d425 commit e2b0895
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 0 deletions.
33 changes: 33 additions & 0 deletions inst/05_make_apt_pseudoids.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
library(tidyverse)

d_parcel <- as_tibble(fr::read_fr_tdr(fs::path_package("parcel", "cagis_parcels")))

d_apartment_ids <-
d_parcel |>
mutate(complex_id = case_when(
# villages at roll hill also includes nottingham RD but no parcel record exists
parcel_addr_street %in% c("PRESIDENT", "WILLIAMSBURG") ~ "villages_at_roll_hill",
parcel_addr_street == "BAHAMA" ~ "bahama",
parcel_addr_street == "HAWAIIAN" ~ "hawaiian",
parcel_addr_street == "DEWDROP" ~ "dewdrop",
parcel_addr_street == "HAWAIIAN" ~ "hawaiian",
parcel_addr_street == "WINNESTE" & parcel_addr_number %in% 4800:5099 ~ "winton_terrace",
parcel_addr_street == "GARDEN VIEW" & parcel_addr_number == 5443 ~ "silver_oaks",
parcel_addr_street == "GARDENHILL" & parcel_addr_number %in% 5500:5799 ~ "silver_oaks",
parcel_addr_street == "WINTONVIEW" ~ "silver_oaks",
parcel_addr_street == "WINNESTE" & parcel_addr_number %in% 5300:5499 ~ "winton_hills_mha",
parcel_addr_street %in% c("STRAND", "HOLLAND", "VIVIAN", "DUTCH COLONY") ~ "winton_hills_mha",
parcel_addr_street == "CLOVERNOOK" & parcel_addr_number == "7600 7" ~ "clovernook",
parcel_addr_street == "WALDEN GLEN" ~ "walden_glen",
)) |>
filter(!is.na(complex_id))

write_csv(d_apartment_ids, "inst/apt_complex_parcel_ids.csv")

apt_pseudoids <-
d_apartment_ids |>
group_by(complex_id) |>
summarize(land_use = collapse::fmode(land_use),
market_total_value = sum(market_total_value))

write_csv(apt_psuedoids, "inst/apt_complex_pseudoids.csv")
89 changes: 89 additions & 0 deletions inst/apt_complex_parcel_ids.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
parcel_id,centroid_lat,centroid_lon,parcel_address,parcel_addr_number,parcel_addr_street,parcel_addr_suffix,land_use,condo_id,condo_unit,market_total_value,acreage,homestead,rental_registration,complex_id
2270006001600,39.184056268777354,-84.56029045633656,4800 HAWAIIAN TE,4800,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4800,12500,0,FALSE,TRUE,hawaiian
2270006002400,39.184056268777354,-84.56029045633656,4816 HAWAIIAN TE,4816,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4816,12500,0,FALSE,TRUE,hawaiian
2380002002090,39.18245848769759,-84.51387668442968,5077 WINNESTE AV,5077,WINNESTE,AV,metropolitan housing authority,NA,NA,97830,4.808,FALSE,NA,winton_terrace
2380002003090,39.184679557212434,-84.51005247103872,5139 HOLLAND DR,5139,HOLLAND,DR,metropolitan housing authority,NA,NA,392330,3.09,FALSE,NA,winton_hills_mha
2380006001790,39.18720927339743,-84.51361476098661,661 STRAND LN,661,STRAND,LN,metropolitan housing authority,NA,NA,172300,1.179,FALSE,NA,winton_hills_mha
2380006005500,39.19194378633604,-84.51227326910492,5648 GARDENHILL LN,5648,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,116180,0.275,FALSE,NA,silver_oaks
2270006002700,39.1841909525898,-84.56067307065084,4822 HAWAIIAN TE,4822,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4822,12500,0,FALSE,TRUE,hawaiian
2270006002900,39.1841909525898,-84.56067307065084,4826 HAWAIIAN TE,4826,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4826,12500,0,FALSE,TRUE,hawaiian
2270006003000,39.1841909525898,-84.56067307065084,4828 HAWAIIAN TE,4828,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4828,12500,0,FALSE,TRUE,hawaiian
2270005001800,39.18311663369875,-84.56119103258177,4909 HAWAIIAN TE,4909,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,111300,0.923,FALSE,NA,hawaiian
2270001008400,39.189267016905106,-84.56647795593236,5384 BAHAMA TE,5384,BAHAMA,TE,"apartment, 40+ units",NA,NA,50290,0.498,FALSE,NA,bahama
2270001009900,39.18371474913488,-84.5666752319228,5142 HAWAIIAN TE,5142,HAWAIIAN,TE,metropolitan housing authority,NA,NA,108230,0.275,FALSE,NA,hawaiian
2270001013300,39.18381556824049,-84.56643476591168,5128 HAWAIIAN TE,5128,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5128,46250,0,FALSE,TRUE,hawaiian
2270006001900,39.184056268777354,-84.56029045633656,4806 HAWAIIAN TE,4806,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4806,12500,0,FALSE,TRUE,hawaiian
2270006001500,39.184056268777354,-84.56029045633656,4798 HAWAIIAN TE,4798,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4798,12500,0,FALSE,TRUE,hawaiian
2380006002690,39.1877046313527,-84.51016791041394,601 DUTCH COLONY DR,601,DUTCH COLONY,DR,metropolitan housing authority,NA,NA,802580,24.262999999999998,FALSE,NA,winton_hills_mha
2380006004500,39.19165859264617,-84.51287583725826,5635 GARDENHILL LN,5635,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,201400,0.402,FALSE,NA,silver_oaks
2280003022700,39.189826906783594,-84.56722279688911,5474 BAHAMA TE,5474,BAHAMA,TE,"apartment, 40+ units",NA,NA,592440,1.514,FALSE,NA,bahama
5910002002700,39.27516722021685,-84.4971656665254,580 DEWDROP CR,580,DEWDROP,CR,"apartment, 40+ units",NA,NA,4154150,13.279,FALSE,NA,dewdrop
2270001008700,39.18889108124906,-84.56682681358194,5385 BAHAMA TE,5385,BAHAMA,TE,"apartment, 4-19 units",NA,NA,94620,0.504,FALSE,NA,bahama
2270006002500,39.184056268777354,-84.56029045633656,4818 HAWAIIAN TE,4818,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4818,12500,0,FALSE,TRUE,hawaiian
2250001003300,39.15558367821031,-84.56156014631667,2501 WILLIAMSBURG DR,2501,WILLIAMSBURG,DR,"apartment, 40+ units",NA,NA,11718400,22.064,FALSE,NA,villages_at_roll_hill
5910002003000,39.27680774937986,-84.49754936922272,580 DEWDROP CR,580,DEWDROP,CR,"apartment, 40+ units",NA,NA,3022530,14.203999999999999,FALSE,NA,dewdrop
2200056002890,39.17995266105457,-84.5110796492995,4848 WINNESTE AV,4848,WINNESTE,AV,metropolitan housing authority,NA,NA,5804350,37.839,FALSE,NA,winton_terrace
2270001008600,39.18805233927029,-84.56629218856351,5377 BAHAMA TE,5377,BAHAMA,TE,"apartment, 40+ units",NA,NA,809350,6.465000000000001,FALSE,NA,bahama
2270002003000,39.18282197472294,-84.56562528181146,5127 HAWAIIAN TE,5127,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,432970,3.003,FALSE,NA,hawaiian
2270002003100,39.182800461416996,-84.5662428915417,5139 HAWAIIAN TE,5139,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,185730,0.7050000000000001,FALSE,NA,hawaiian
2270001013200,39.18381556824049,-84.56643476591168,5126 HAWAIIAN TE,5126,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5126,46250,0,FALSE,TRUE,hawaiian
2270001013600,39.18381556824049,-84.56643476591168,5134 HAWAIIAN TE,5134,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5134,46250,0,FALSE,TRUE,hawaiian
2270001013800,39.18381556824049,-84.56643476591168,5138 HAWAIIAN TE,5138,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5138,46250,0,FALSE,TRUE,hawaiian
2270006002100,39.184056268777354,-84.56029045633656,4810 HAWAIIAN TE,4810,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4810,12500,0,FALSE,TRUE,hawaiian
2370004003100,39.1918363265854,-84.51687722599596,5443 GARDEN VIEW LN,5443,GARDEN VIEW,LN,"apartment, 4-19 units",NA,NA,201400,0.555,FALSE,NA,silver_oaks
2380006002590,39.18864527902604,-84.51214702456271,620 DUTCH COLONY DR,620,DUTCH COLONY,DR,metropolitan housing authority,NA,NA,210650,2.6,FALSE,NA,winton_hills_mha
2380006004300,39.19086740696125,-84.51109914452336,5580 GARDENHILL LN,5580,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,371000,0.553,FALSE,NA,silver_oaks
2380006004400,39.191239335314066,-84.5125184569641,5619 GARDENHILL LN,5619,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,169600,0.442,FALSE,NA,silver_oaks
2380006004700,39.19244831512959,-84.51348969455832,5695 GARDENHILL LN,5695,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,97160,0.3,FALSE,NA,silver_oaks
2280003022600,39.18968140164149,-84.56820981149271,5484 BAHAMA TE,5484,BAHAMA,TE,"apartment, 40+ units",NA,NA,376910,1.526,FALSE,NA,bahama
2270006003100,39.1841909525898,-84.56067307065084,4830 HAWAIIAN TE,4830,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4830,12500,0,FALSE,TRUE,hawaiian
2270006003500,39.1841909525898,-84.56067307065084,4838 HAWAIIAN TE,4838,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4838,12500,0,FALSE,TRUE,hawaiian
2270006002800,39.1841909525898,-84.56067307065084,4824 HAWAIIAN TE,4824,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4824,12500,0,FALSE,TRUE,hawaiian
2270001009500,39.183413140717676,-84.56715474791572,5152 HAWAIIAN TE,5152,HAWAIIAN,TE,single family dwelling,NA,NA,76900,0.166,FALSE,NA,hawaiian
2270001010100,39.18395293860904,-84.56597287065408,5120 HAWAIIAN TE,5120,HAWAIIAN,TE,"apartment, 20-39 units",NA,NA,400150,1.736,FALSE,NA,hawaiian
2270001010200,39.18406412016341,-84.56519525264274,5108 HAWAIIAN TE,5108,HAWAIIAN,TE,"apartment, 20-39 units",NA,NA,400150,1.258,FALSE,NA,hawaiian
2270002002900,39.18244848145802,-84.56504974805314,5107 HAWAIIAN TE,5107,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,691220,3.4759999999999995,FALSE,NA,hawaiian
2270006002200,39.184056268777354,-84.56029045633656,4812 HAWAIIAN TE,4812,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4812,12500,0,FALSE,TRUE,hawaiian
2270006002000,39.184056268777354,-84.56029045633656,4808 HAWAIIAN TE,4808,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4808,12500,0,FALSE,TRUE,hawaiian
2380002002590,39.18455451300754,-84.51154006807911,5248 VIVIAN PL,5248,VIVIAN,PL,metropolitan housing authority,NA,NA,9905890,17.643,FALSE,NA,winton_hills_mha
2380006001390,39.18853800816238,-84.51380146440736,5382 WINNESTE AV,5382,WINNESTE,AV,metropolitan housing authority,NA,NA,343480,7.05,FALSE,NA,winton_hills_mha
5100031078100,39.27779467105913,-84.56759171840031,2300 WALDEN GLEN CR,2300,WALDEN GLEN,CR,"apartment, 40+ units",NA,NA,7199710,14.266,FALSE,NA,walden_glen
2270001013900,39.18381556824049,-84.56643476591168,5140 HAWAIIAN TE,5140,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5140,46250,0,FALSE,TRUE,hawaiian
2270001013500,39.18381556824049,-84.56643476591168,5132 HAWAIIAN TE,5132,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5132,46250,0,FALSE,TRUE,hawaiian
2270006001800,39.184056268777354,-84.56029045633656,4804 HAWAIIAN TE,4804,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4804,12500,0,FALSE,TRUE,hawaiian
2370004003200,39.19110599091144,-84.5172163360175,5481 WINTONVIEW PL,5481,WINTONVIEW,PL,"apartment, 20-39 units",NA,NA,392200,0.7190000000000001,FALSE,NA,silver_oaks
2380006001590,39.189008036614915,-84.51277203281157,5400 HOLLAND DR,5400,HOLLAND,DR,metropolitan housing authority,NA,NA,209260,2.6319999999999997,FALSE,NA,winton_hills_mha
2380006004100,39.1922392708777,-84.5123128369439,5678 GARDENHILL LN,5678,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,201400,0.7909999999999999,FALSE,NA,silver_oaks
2380006004600,39.19197394904441,-84.51308568145863,5663 GARDENHILL LN,5663,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,119910,0.4220000000000001,FALSE,NA,silver_oaks
2380006005600,39.191676680986916,-84.51215914998836,5630 GARDENHILL LN,5630,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,119920,0.4740000000000001,FALSE,NA,silver_oaks
2280003022800,39.19037603574771,-84.56675377571777,5464 BAHAMA TE,5464,BAHAMA,TE,"apartment, 40+ units",NA,NA,433340,7.378,FALSE,NA,bahama
5930011010800,39.233883894062146,-84.53561011973007,7600 7 CLOVERNOOK AV,7600 7,CLOVERNOOK,AV,"apartment, 40+ units",NA,NA,12829330,28.25,FALSE,NA,clovernook
2270006002600,39.1841909525898,-84.56067307065084,4820 HAWAIIAN TE,4820,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4820,12500,0,FALSE,TRUE,hawaiian
2270006003300,39.1841909525898,-84.56067307065084,4834 HAWAIIAN TE,4834,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4834,12500,0,FALSE,TRUE,hawaiian
2270006003400,39.1841909525898,-84.56067307065084,4836 HAWAIIAN TE,4836,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4836,12500,0,FALSE,TRUE,hawaiian
2270001009800,39.183559054204196,-84.56683518932134,5150 HAWAIIAN TE,5150,HAWAIIAN,TE,single family dwelling,NA,NA,75220,0.165,TRUE,NA,hawaiian
2270001010600,39.18452734010184,-84.56561177563879,5036 HAWAIIAN TE,5036,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,148400,1.8010000000000002,FALSE,NA,hawaiian
2270001013400,39.18381556824049,-84.56643476591168,5130 HAWAIIAN TE,5130,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5130,46250,0,FALSE,TRUE,hawaiian
2270006002300,39.184056268777354,-84.56029045633656,4814 HAWAIIAN TE,4814,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4814,12500,0,FALSE,TRUE,hawaiian
2380006001690,39.187523486554475,-84.51234319587893,5320 HOLLAND DR,5320,HOLLAND,DR,metropolitan housing authority,NA,NA,13590,0.15600000000000003,FALSE,NA,winton_hills_mha
2380006002490,39.188949025375386,-84.51139590205742,605 DUTCH COLONY DR,605,DUTCH COLONY,DR,metropolitan housing authority,NA,NA,202310,2.201,FALSE,NA,winton_hills_mha
2250002002800,39.15569219732024,-84.55819805225794,3710 PRESIDENT DR,3710,PRESIDENT,DR,"apartment, 40+ units",NA,NA,8001940,26.327,FALSE,NA,villages_at_roll_hill
2270006003200,39.1841909525898,-84.56067307065084,4832 HAWAIIAN TE,4832,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4832,12500,0,FALSE,TRUE,hawaiian
5910002003800,39.278150488128205,-84.497268750347,580 DEWDROP CR,580,DEWDROP,CR,"apartment, 40+ units",NA,NA,4473490,14.725000000000001,FALSE,NA,dewdrop
2270001008500,39.189140604656046,-84.5653685685919,5378 BAHAMA TE,5378,BAHAMA,TE,"apartment, 40+ units",NA,NA,721300,6.1049999999999995,FALSE,NA,bahama
2270001008800,39.1884914258097,-84.56798627014936,5473 BAHAMA TE,5473,BAHAMA,TE,"apartment, 4-19 units",NA,NA,93390,4.71,FALSE,NA,bahama
2270001011500,39.183948441227386,-84.56338805378019,5053 HAWAIIAN TE,5053,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,97520,1.033,FALSE,NA,hawaiian
2270001013700,39.18381556824049,-84.56643476591168,5136 HAWAIIAN TE,5136,HAWAIIAN,TE,condominium unit,VALLEYVIEWCONDOMINIUM,UNIT 5136,46250,0,FALSE,TRUE,hawaiian
2270006001700,39.184056268777354,-84.56029045633656,4802 HAWAIIAN TE,4802,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4802,12500,0,FALSE,TRUE,hawaiian
2270006001400,39.184056268777354,-84.56029045633656,4796 HAWAIIAN TE,4796,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4796,12500,0,FALSE,TRUE,hawaiian
2370005000990,39.188737545000336,-84.51673058577283,595 STRAND LN,595,STRAND,LN,metropolitan housing authority,NA,NA,14043020,29.272000000000002,FALSE,NA,winton_hills_mha
2370005001090,39.190619498746734,-84.51720107911743,776 DUTCH COLONY DR,776,DUTCH COLONY,DR,metropolitan housing authority,NA,NA,301520,5.708,FALSE,NA,winton_hills_mha
2380006004200,39.191405669879465,-84.51157001674173,5600 GARDENHILL LN,5600,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,392200,0.49400000000000005,FALSE,NA,silver_oaks
2380006005800,39.19232323777161,-84.51315375641434,5687 GARDENHILL LN,5687,GARDENHILL,LN,"apartment, 4-19 units",NA,NA,49650,0.128,FALSE,NA,silver_oaks
2250001003200,39.15550364197184,-84.5593996533477,3811-4 PRESIDENT DR,3811-4,PRESIDENT,DR,"apartment, 40+ units",NA,NA,2668760,4.126999999999999,FALSE,NA,villages_at_roll_hill
5100031000200,39.276910435820916,-84.56740714335757,2300 WALDEN GLEN CR,2300,WALDEN GLEN,CR,"apartment, 40+ units",NA,NA,4429650,7.193999999999999,FALSE,NA,walden_glen
2270006003600,39.1841909525898,-84.56067307065084,4840 HAWAIIAN TE,4840,HAWAIIAN,TE,condominium unit,HAWAIIANVILLAGECONDOMINIUM2,UNIT 4840,12500,0,FALSE,TRUE,hawaiian
2270006003700,39.1841909525898,-84.56067307065084,4842 HAWAIIAN TE,4842,HAWAIIAN,TE,condominium unit,4842COMINTHAWIIANVILLAGECONDOMINIUM2,UNIT DESIGNATION,12500,0,FALSE,TRUE,hawaiian
2270005001500,39.18267373865588,-84.55985045398715,4841 HAWAIIAN TE,4841,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,185650,3.4090000000000003,FALSE,NA,hawaiian
5900392051100,39.277590456826246,-84.56418106719433,2300 WALDEN GLEN CR,2300,WALDEN GLEN,CR,"apartment, 40+ units",NA,NA,9610,0.606,FALSE,NA,walden_glen
2270002002800,39.182597299530734,-84.56416345957741,5101 HAWAIIAN TE,5101,HAWAIIAN,TE,"apartment, 40+ units",NA,NA,367070,2.541,FALSE,NA,hawaiian
10 changes: 10 additions & 0 deletions inst/apt_complex_pseudoids.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
complex_id,land_use,market_total_value
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
villages_at_roll_hill,"apartment, 40+ units",22389100
walden_glen,"apartment, 40+ units",11638970
winton_hills_mha,metropolitan housing authority,26596930
winton_terrace,metropolitan housing authority,5902180

0 comments on commit e2b0895

Please sign in to comment.