append_geoid: Retrieve GEOID from the Census Geocoder by address

Description Usage Arguments Details Value Examples

View source: R/geolocator.R

Description

Returns GEOID for 2010 geographies.

Usage

1
append_geoid(address, geoid_type = "bl")

Arguments

address

A tibble/data frame with (at a minimum, others can be present) either character columns street, city, and state OR numeric columns lat and lon. Lat/lon columns take priority.

geoid_type

GEOID level to return, c('co', 'tr', 'bg', 'bl'). Defaults to block.

Details

It is possible in some situations for the geolocator API to return a 500 error. Repeating the call should avoid this.

Value

the original tibble with GEOIDs appended as a new column called geoid.

Examples

1
2
3
4
5
6
7
## Not run: 
airports <- dplyr::data_frame(
  street = "700 Catalina Dr", city = "Daytona Beach", state = "FL"
)
append_geoid(airports, 'tr')

## End(Not run)

censusr documentation built on May 2, 2019, 9:41 a.m.