Skip to content

R package for using USPS' free address validation api

License

Notifications You must be signed in to change notification settings

Weekend-Warrior/rusps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusps - Validate And Standardize US Addresses

Have you ever needed to do inner joins of addresses from different data sets? Hook into the USPS api using this package!

devtools::install_github("hansthompson/rusps")
library(rusps)
library(XML)
username <- 'XXXYYYYYZZZZ' # get this quickly and freely by signing up at https://registration.shippingapis.com/ (not commercial).
street1 <- '333 W raspberry road'
street2 <- '333  raspberry rd'
city   <- 'anchorage'
state  <- 'ak'

validate_address_usps(username, street1, city, state)

#  Address.Address2       Address.City      Address.State       Address.Zip5       Address.Zip4  Address..attrs.ID 
# "333 RASPBERRY RD"        "ANCHORAGE"               "AK"            "99518"             "1565"                "0" 

# Check if two diffent Addresses resolve to the same address
all(validate_address_usps(username, street1, city, state)  == validate_address_usps(username, street2, city, state))
# TRUE

More Documentation Here: https://www.usps.com/business/web-tools-apis/address-information-api.htm#_Toc410982986

About

R package for using USPS' free address validation api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%