Skip to contents

The address components are tagged using a rust port of usaddress. Component names are based upon the United States Thoroughfare, Landmark, and Postal Address Data Standard.

Usage

addr_tag(x, clean_address_text = TRUE)

Arguments

x

a character vector of addresses

clean_address_text

logical; use clean_address_text() to clean addresses prior to tagging?

Value

a list, the same length as x, of named character vectors of address component tags; each vector contains all space-separated elements of the cleaned address and are each named based on inferred address labels (see Details)

Details

Possible address labels include:

  • AddressNumberPrefix

  • AddressNumberSuffix

  • AddressNumber

  • BuildingName

  • CornerOf

  • IntersectionSeparator

  • LandmarkName

  • NotAddress

  • OccupancyIdentifier

  • OccupancyType

  • PlaceName

  • Recipient

  • StateName

  • StreetNamePostDirectional

  • StreetNamePostType

  • StreetNamePreDirectional

  • StreetNamePreModifier

  • StreetNamePreType

  • StreetName

  • SubaddressIdentifier

  • SubaddressType

  • USPSBoxGroupID

  • USPSBoxGroupType

  • USPSBoxID

  • USPSBoxType

  • ZipCode

Find more information about the definitions here

Examples

addr_tag(c("290 Ludlow Avenue Apt #2 Cincinnati OH 45220", "3333 Burnet Ave Cincinnati OH 45219"))
#> [[1]]
#>       AddressNumber          StreetName  StreetNamePostType       OccupancyType 
#>               "290"            "Ludlow"            "Avenue"               "Apt" 
#> OccupancyIdentifier           PlaceName           StateName             ZipCode 
#>                 "2"        "Cincinnati"                "OH"             "45220" 
#> 
#> [[2]]
#>      AddressNumber         StreetName StreetNamePostType          PlaceName 
#>             "3333"           "Burnet"              "Ave"       "Cincinnati" 
#>          StateName            ZipCode 
#>               "OH"            "45219" 
#>