Learn R Programming

censusxy (version 1.1.1)

cxy_geography: Geocode Single Coordinate Pair

Description

Provides access to the GeoLookup API of the US Census Bureau. Returns census geographies for a single geographic point.

Usage

cxy_geography(
  lon,
  lat,
  benchmark = "Public_AR_Current",
  vintage = "Current_Current"
)

Value

A data.frame containing matched address or NULL if not matches

Arguments

lon

Numeric or String Containing Longitude (x) of Point

lat

Numeric or String Containing Latitude (y) of Point

benchmark

Optional ID or Name of Census Benchmark. See Details.

vintage

Optional ID or Name of Census Vintage. See Details.

Details

This function can be used to locate geographic information given a geographic point. It does not provide an address like a reverse-geocoder

To obtain current valid benchmarks, use the cxy_benchmarks() function

To use this function, you must specify a valid vintage for your benchmark. You may use the cxy_vintages() function to obtain valid Vintages for a given benchmark. See vignette('censusxy') for a full walkthrough.

Examples

Run this code
cxy_geography(lon = -90.23324, lat = 38.63593)

Run the code above in your browser using DataLab