@@ -69,7 +69,7 @@ cincy_county_geo <- function(vintage = as.character(2024:2013)) {
69
69
# ' options(timeout = max(2500, getOption("timeout")), download.file.method = "libcurl")
70
70
# ' install_cagis_data()
71
71
# ' sf::st_layers(install_cagis_data())$name
72
- install_cagis_data <- function (cagis_data_url = " https://www.cagis.org/Opendata/Quarterly_GIS_Data/CAGISOpenDataQ4_2024 .gdb.zip" ) {
72
+ install_cagis_data <- function (cagis_data_url = " https://www.cagis.org/Opendata/Quarterly_GIS_Data/CAGISOpenDataQ1_2025 .gdb.zip" ) {
73
73
cagis_gdb_name <- tools :: file_path_sans_ext(basename(cagis_data_url ))
74
74
dest <- file.path(tools :: R_user_dir(package = " codec" , " data" ), cagis_gdb_name )
75
75
if (file.exists(dest )) {
@@ -81,6 +81,38 @@ install_cagis_data <- function(cagis_data_url = "https://www.cagis.org/Opendata/
81
81
return (dest )
82
82
}
83
83
84
+ # ' Cincy address geographies
85
+ # '
86
+ # ' CAGIS data (see `install_cagis_data()`) provides a list of all addresses in Hamilton County.
87
+ # ' Addresses are filtered for the following criteria:
88
+ # ' - use only addresses that have `STATUS` of `ASSIGNED` or `USING` and are not orphaned (`ORPHANFLG == "N"`)
89
+ # ' - omit addresses with `ADDRTYPE`s that are milemarkers (`MM`), parks (`PAR`), infrastructure projects (`PRJ`),
90
+ # ' cell towers (`CTW`), vacant or commercial lots (`LOT`), and other miscellaneous non-residential addresses (`MIS`, `RR`, `TBA`)
91
+ # ' - s2 cell is derived from LONGITUDE and LATITUDE fields in CAGIS address database
92
+ # ' @returns a simple features object with columns `cagis_address`, `cagis_address_place`, `cagis_address_type`,
93
+ # ' `cagis_s2`, `cagis_parcel_id`, `cagis_is_condo`, and a geometry column (`s2_geography`)
94
+ # ' @export
95
+ # ' @examples
96
+ # ' cincy_addr_geo()
97
+ cincy_addr_geo <- function () {
98
+ install_cagis_data() | >
99
+ sf :: st_read(layer = " Addresses" ) | >
100
+ tibble :: as_tibble() | >
101
+ dplyr :: filter(STATUS %in% c(" ASSIGNED" , " USING" )) | >
102
+ dplyr :: filter(ORPHANFLG == " N" ) | >
103
+ dplyr :: filter(! ADDRTYPE %in% c(" MM" , " PAR" , " PRJ" , " CTW" , " LOT" , " MIS" , " RR" , " TBA" )) | >
104
+ dplyr :: transmute(
105
+ cagis_address = FULLMAILADR ,
106
+ cagis_address_place = BLDGPLACE ,
107
+ cagis_address_type = ADDRTYPE ,
108
+ cagis_s2 = s2 :: as_s2_cell(s2 :: s2_geog_point(LONGITUDE , LATITUDE )),
109
+ cagis_parcel_id = PARCELID ,
110
+ cagis_is_condo = CONDOFLG %in% c(" Y" )
111
+ ) | >
112
+ dplyr :: mutate(s2_geography = s2 :: s2_cell_to_lnglat(cagis_s2 )) | >
113
+ sf :: st_as_sf()
114
+ }
115
+
84
116
# ' Cincy neighborhood geographies
85
117
# '
86
118
# ' CAGIS data (see `install_cagis_data()`) provides community council boundaries, but these boundaries can
0 commit comments