repair_name: Try to repair the street name

View source: R/main.R

repair_nameR Documentation

Try to repair the street name

Description

We will search in the given zipcode for street names that are close to the given name, using the generalized Levenshtein (edit) distance. On success, the Lat Long will be returned. Maybe several. We will ignore street names likely to fail badly:

  • names with fewer than 4 letters

  • names containing STREET (A STREET, B STREET)

  • Number streets (4TH, 5TH, etc)

  • County Roads (CR 235)

  • Farm-to-Market Roads (FM 1960)

Usage

repair_name(
  Street_num,
  Prefix = "",
  Street_name,
  Street_type = "",
  Zipcode,
  Distance = 2
)

Arguments

Street_num

Number portion of address.

Prefix

Directional prefix (N, S, E, W) if exists.

Street_name

Name of the street.

Street_type

Designation like RD, ST, LN, etc.

Zipcode

The zip code for the address

Distance

The maximum edit distance allowed

Value

A tibble will be returned with the:

  • Longitude (Lon),

  • Latitude (Lat),

  • the new name (New_name),

  • a success flag (Success) (T/F),

  • and a Fail code describing why the repair attempt failed.

    There may be several points returned if several matched.

Examples

repair_name("1311", "", "Tuline", "ST", "77008", Distance=2)

alankjackson/GeocodeHou documentation built on May 20, 2022, 12:03 p.m.