Skip to contents

get lat,lon from table that contains USPS addresses

Usage

latlon_from_address_table(x)

Arguments

x

data.frame or can be missing if interactive

Value

same as output of latlon_from_address()

Examples

address_from_table(testinput_address_table)
#> [1] "1200 Pennsylvania Ave Washington DC "
#> [2] "5 pARK AVE NY NY "                   

## see available test data objects and files:

# cbind(data.in.package  = sort(grep("address", datapack()$Item, value = T)))
# cbind(files.in.package = sort(basename(testdata('address', quiet = T))))

# \donttest{

# This requires first attaching the AOI package.

pts <- latlon_from_address(testinput_address_9[1:2])
#> Warning: for this to work you would need to use library(AOI) first
## out <- ejamit(pts, radius = 1)
## ejam2report(out)

latlon_from_address_table(testinput_address_table)
#> Warning: for this to work you would need to use library(AOI) first
#> NULL
latlon_from_address_table(testinput_address_table_withfull)
#> Warning: for this to work you would need to use library(AOI) first
#> NULL
## *** NOTE IT FAILS IF A COLUMN WITH STREET NAME ONLY IS CALLED "address"
##   instead of that storing the full address.
# }
fixcolnames_infer(currentnames = testinput_address_parts)
#> [1] "lat"     "lon"     "address" "street"  "city"    "state"   "zip"    
#> attr(,"ejam_package_version")
#>  Version 
#> "2.32.2" 
#> attr(,"ejscreen_version")
#> EJScreenVersion 
#>          "2.32" 
#> attr(,"ejscreen_releasedate")
#> EJScreenReleaseDate 
#>        "2024-08-12" 
#> attr(,"acs_releasedate")
#> ACSReleaseDate 
#>   "2023-12-07" 
#> attr(,"acs_version")
#>  ACSVersion 
#> "2018-2022" 
#> attr(,"census_version")
#> CensusVersion 
#>        "2020" 
#> attr(,"date_saved_in_package")
#> [1] "2025-05-01"
fixcolnames_infer(currentnames = names(testinput_address_table))
#> [1] "Acol"         "street"       "city"         "state"        "zip"         
#> [6] "other_column"