Skip to content

Commit

Permalink
update to q4 2024 CAGIS addresses (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-brokamp authored Oct 22, 2024
1 parent df02c15 commit 2654181
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: addr
Title: Clean, Parse, Harmonize, Match, and Geocode Messy Real-World Addresses
Version: 0.5.0
Version: 0.6.0
Authors@R:
c(person("Cole", "Brokamp", email = "cole@colebrokamp.com", role = c("aut", "cre")),
person("Erika", "Manning", role = c("aut")))
Expand Down
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' CAGIS Addresses
#' CAGIS Addresses (Q4 2024)
#'
#' @returns An example tibble created from the CAGIS addresses with a pre-calculated, unique `cagis_addr` vector column.
#' The `cagis_addr_data` column is a list of tibbles because one CAGIS address can correspond to multiple
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ cagis_s2 <-
purrr::modify_if(\(.) length(.) > 0 && nrow(.) > 1, dplyr::slice_sample, n = 1) |>
purrr::map_vec(purrr::pluck, "cagis_s2", .default = NA, .ptype = s2::s2_cell())
addr_match_geocode(x = sample(voter_addresses(), 100),
addr_match_geocode(x = voter_addresses()[1040:1100],
ref_addr = cagis_addr()$cagis_addr,
ref_s2 = cagis_s2,
county = "39061",
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,23 @@ cagis_s2 <-
purrr::modify_if(\(.) length(.) > 0 && nrow(.) > 1, dplyr::slice_sample, n = 1) |>
purrr::map_vec(purrr::pluck, "cagis_s2", .default = NA, .ptype = s2::s2_cell())

addr_match_geocode(x = sample(voter_addresses(), 100),
addr_match_geocode(x = voter_addresses()[1040:1100],
ref_addr = cagis_addr()$cagis_addr,
ref_s2 = cagis_s2,
county = "39061",
year = "2022")
#> # A tibble: 100 × 3
#> addr s2 match_method
#> <addr> <s2cell> <fct>
#> 1 NA NA E Charlton St Cincinnati OH 45219 NA none
#> 2 NA W 647 Mcmicken Avenue Cincinnati OH 45214 NA none
#> 3 10524 Lees Creek Road Harrison OH 45030 88402e13d938d877 ref_addr
#> 4 5818 Panama Street Cincinnati OH 45230 8841ae2d00b6db31 tiger_range
#> 5 7985 Camp Road Camp Dennison OH 45111 8840553ee8e34dfd ref_addr
#> 6 902 Vienwoods Drive Cincinnati OH 45211 NA none
#> 7 4470 Abby Court Cincinnati OH 45248 8841caec1047f94d ref_addr
#> 8 6715 Palmetto Street Cincinnati OH 45227 8841acf1063a839b ref_addr
#> 9 3220 Buell Street Cincinnati OH 45211 8841ca700e5f9ac7 ref_addr
#> 10 5541 Surrey Avenue Cincinnati OH 45248 8841caf5f0bfbb3b ref_addr
#> # ℹ 90 more rows
#> # A tibble: 61 × 3
#> addr s2 match_method
#> <addr> <s2cell> <fct>
#> 1 9822 Tollgate Lane Cincinnati OH 45242 8840538796e0aca3 ref_addr
#> 2 3840 Applegate Avenue Cincinnati OH 45211 8841ca63599fc325 ref_addr
#> 3 2819 Hocking Drive Cincinnati OH 45233 8841cb8ea9f6c543 ref_addr
#> 4 8311 Wetherfield Lane Cincinnati OH 45236 8840536907b7ccc5 ref_addr
#> 5 529 13th E St Cincinnati OH 45202 NA none
#> 6 996 Wittshire Lane Cincinnati OH 45255 8841a91704d8f5a5 tiger_range
#> 7 5110 Herringbone Drive Cincinnati OH 45227 8841ad10999e2617 ref_addr
#> 8 7081 Jeannie Avenue Cincinnati OH 45230 8841aed03759a5c5 ref_addr
#> 9 6924 Miami Bluff Drive Cincinnati OH 45227 8841ac605740b499 ref_addr
#> 10 433 Mcdowell Street Cincinnati OH 45226 8841adf7a4bb9c83 ref_addr
#> # ℹ 51 more rows
```
Binary file modified inst/cagis_addr.rds
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/make_cagis_addr.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install_cagis_data <- function(cagis_data_url) {
# cell towers (`CTW`), vacant or commercial lots (`LOT`), and other miscellaneous non-residential addresses (`MIS`, `RR`, `TBA`)
# - s2 cell derived from LONGITUDE and LATITUDE fields in CAGIS address database
cagis_addr <-
install_cagis_data("https://www.cagis.org/Opendata/Quarterly_GIS_Data/CAGISOpenDataSpring2024.gdb.zip") |>
install_cagis_data("https://www.cagis.org/Opendata/Quarterly_GIS_DATA/CAGISOpenDataQ4_2024.gdb.zip") |>
sf::st_read(layer = "Addresses") |>
sf::st_drop_geometry() |>
tibble::as_tibble() |>
Expand Down

0 comments on commit 2654181

Please sign in to comment.