tidygeocoder (version 0.2.5)

geo_census: Geocode street addresses

Description

Obtain latitude and longitude coordinates from an address using the US Census geocoder. Only works for addresses within the US. Addresses must also be at the street level (ie. 60 Main St. Pawnee, IN not Pawnee, IN).

Usage

geo_census(
  address,
  lat = lat,
  long = long,
  verbose = FALSE,
  benchmark = 4,
  API_URL = "https://geocoding.geo.census.gov/geocoder/locations/onelineaddress?"
)

Arguments

address

single line address. Street must be included.

lat

name of latitude field

long

name of longitude field

verbose

logical. If TRUE outputs logs.

benchmark

parameter for the US Census Geocoder

API_URL

URL of Census API

Value

latitude and longitude coordinates in tibble format

Examples

Run this code
# NOT RUN {
geo_census("1600 Pennsylvania Ave Washington, DC")
# }

Run the code above in your browser using DataLab