Skip to contents

taf_zip() reads and transforms taf() data for a subset of ZIP codes. It reconstructs the county_fips, s2_geography, and addr_street vectors in the returned data frame.

Usage

taf_zip(x, map = TRUE, year = as.character(2025:2011), version = "v1")

Arguments

x

character vector of five-digit ZIP codes

map

logical, length 1; map street tags read from taf() data (type, directional, ordinal) when converting to addr_street() vector?

year

character, length 1; vintage of TIGER addrfeat (address feature) files

version

character, length 1; major version of the package and taf dataset schema

Value

a tibble with LINEARID, FULLNAME, side, ZIP, FROMHN, TOHN, PARITY, OFFSET, s2_geography, addr_street, county_fips, and street_tag_parsed columns

Examples

Sys.setenv("R_USER_DATA_DIR" = tempfile())
taf_install("39061", "2025")
#> Warning: structured street name info not found for 1216 ranges
taf_zip(c("45249", "45230", "45220"))
#> # A tibble: 3,734 × 12
#>    LINEARID      FULLNAME     side  ZIP   FROMHN  TOHN PARITY OFFSET county_fips
#>    <chr>         <chr>        <chr> <chr>  <int> <int> <chr>  <chr>  <chr>      
#>  1 110480468451  Riddle Rd    L     45220    703   723 O      N      39061      
#>  2 110480463741  W Cliff Ln   L     45220    401   499 O      N      39061      
#>  3 1106092751506 N Cliff Ter  L     45220   3945  3999 O      N      39061      
#>  4 110480463738  N Cliff Ln   L     45220   3901  3943 O      N      39061      
#>  5 110480478352  Lafayette A… L     45220    403   599 O      N      39061      
#>  6 110480465708  Amazon Ave   L     45220    359   499 O      N      39061      
#>  7 110480478643  Middleton A… L     45220   3901  3999 O      N      39061      
#>  8 110480478643  Middleton A… L     45220   3801  3899 O      N      39061      
#>  9 110480478352  Lafayette A… L     45220    227   399 O      N      39061      
#> 10 110480475120  McAlpin Ave  L     45220    401   533 O      N      39061      
#> # ℹ 3,724 more rows
#> # ℹ 3 more variables: street_tag_parsed <lgl>, s2_geography <s2_geography>,
#> #   addr_street <addr_str>