Provides access to the GeoLookup API of the US Census Bureau. Returns census geographies for a single geographic point.
cxy_geography(
lon,
lat,
benchmark = "Public_AR_Current",
vintage = "Current_Current"
)
Numeric or String Containing Longitude (x) of Point
Numeric or String Containing Latitude (y) of Point
Optional ID or Name of Census Benchmark. See Details.
Optional ID or Name of Census Vintage. See Details.
A data.frame containing matched address or NULL if not matches
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.
# \donttest{
cxy_geography(lon = -90.23324, lat = 38.63593)
#> States.STATENS States.GEOID States.CENTLAT States.AREAWATER States.STATE
#> 1 01779791 29 +38.3569829 2487523848 29
#> States.BASENAME States.STUSAB States.OID States.LSADC States.FUNCSTAT
#> 1 Missouri MO 2749046934061 00 A
#> States.INTPTLAT States.DIVISION States.NAME States.REGION States.OBJECTID
#> 1 +38.3507500 4 Missouri 2 45
#> States.CENTLON States.AREALAND States.INTPTLON States.MTFCC
#> 1 -092.4580564 178052255599 -092.4567826 G4000
#> County.Subdivisions.COUSUB County.Subdivisions.GEOID
#> 1 65000 2951065000
#> County.Subdivisions.CENTLAT County.Subdivisions.AREAWATER
#> 1 +38.6357916 11534970
#> County.Subdivisions.STATE County.Subdivisions.BASENAME
#> 1 29 St. Louis
#> County.Subdivisions.OID County.Subdivisions.LSADC
#> 1 27690325436609 25
#> County.Subdivisions.FUNCSTAT County.Subdivisions.INTPTLAT
#> 1 F +38.6356988
#> County.Subdivisions.NAME County.Subdivisions.OBJECTID
#> 1 St. Louis city 20423
#> County.Subdivisions.CENTLON County.Subdivisions.COUSUBCC
#> 1 -090.2451153 Z7
#> County.Subdivisions.AREALAND County.Subdivisions.INTPTLON
#> 1 159853177 -090.2445816
#> County.Subdivisions.MTFCC County.Subdivisions.COUSUBNS
#> 1 G4040 00767557
#> County.Subdivisions.COUNTY Urban.Areas.GEOID Urban.Areas.CENTLAT
#> 1 510 77770 +38.6375942
#> Urban.Areas.OID_1 Urban.Areas.AREAWATER Urban.Areas.BASENAME
#> 1 32043669 St. Louis, MO--IL
#> Urban.Areas.LSADC Urban.Areas.UA Urban.Areas.FUNCSTAT Urban.Areas.INTPTLAT
#> 1 67 77770 S +38.6363760
#> Urban.Areas.NAME Urban.Areas.OBJECTID Urban.Areas.CENTLON
#> 1 St. Louis, MO--IL Urban Area 296 -090.3423875
#> Urban.Areas.AREA Urban.Areas.LEN Urban.Areas.AREALAND Urban.Areas.INTPTLON
#> 1 3922744652 1535775 2357774111 -090.3414179
#> Urban.Areas.MTFCC Incorporated.Places.NECTAPCI Incorporated.Places.GEOID
#> 1 G3500 N 2965000
#> Incorporated.Places.CENTLAT Incorporated.Places.AREAWATER
#> 1 +38.6357916 11534970
#> Incorporated.Places.STATE Incorporated.Places.BASENAME
#> 1 29 St. Louis
#> Incorporated.Places.OID Incorporated.Places.LSADC Incorporated.Places.PLACE
#> 1 27890325442361 25 65000
#> Incorporated.Places.FUNCSTAT Incorporated.Places.INTPTLAT
#> 1 A +38.6356988
#> Incorporated.Places.NAME Incorporated.Places.OBJECTID
#> 1 St. Louis city 9218
#> Incorporated.Places.PLACECC Incorporated.Places.CENTLON
#> 1 C7 -090.2451153
#> Incorporated.Places.CBSAPCI Incorporated.Places.AREALAND
#> 1 N 159853177
#> Incorporated.Places.INTPTLON Incorporated.Places.PLACENS
#> 1 -090.2445816 00767557
#> Incorporated.Places.MTFCC Counties.GEOID Counties.CENTLAT Counties.AREAWATER
#> 1 G4110 29510 +38.6357916 11534970
#> Counties.STATE Counties.BASENAME Counties.OID Counties.LSADC
#> 1 29 St. Louis 27590325427938 25
#> Counties.FUNCSTAT Counties.INTPTLAT Counties.NAME Counties.OBJECTID
#> 1 F +38.6356988 St. Louis city 1579
#> Counties.CENTLON Counties.COUNTYCC Counties.COUNTYNS Counties.AREALAND
#> 1 -090.2451153 C7 00767557 159853177
#> Counties.INTPTLON Counties.MTFCC Counties.COUNTY
#> 1 -090.2445816 G4020 510
#> X2022.State.Legislative.Districts...Upper.GEOID
#> 1 29005
#> X2022.State.Legislative.Districts...Upper.CENTLAT
#> 1 +38.6496700
#> X2022.State.Legislative.Districts...Upper.AREAWATER
#> 1 11253685
#> X2022.State.Legislative.Districts...Upper.STATE
#> 1 29
#> X2022.State.Legislative.Districts...Upper.BASENAME
#> 1 Missouri State Senate District 5
#> X2022.State.Legislative.Districts...Upper.OID
#> 1 2129031808633308
#> X2022.State.Legislative.Districts...Upper.SLDU
#> 1 005
#> X2022.State.Legislative.Districts...Upper.LSADC
#> 1 00
#> X2022.State.Legislative.Districts...Upper.FUNCSTAT
#> 1 N
#> X2022.State.Legislative.Districts...Upper.INTPTLAT
#> 1 +38.6497548
#> X2022.State.Legislative.Districts...Upper.NAME
#> 1 Missouri State Senate District 5
#> X2022.State.Legislative.Districts...Upper.OBJECTID
#> 1 1813
#> X2022.State.Legislative.Districts...Upper.CENTLON
#> 1 -090.2277047
#> X2022.State.Legislative.Districts...Upper.LSY
#> 1 2022
#> X2022.State.Legislative.Districts...Upper.AREALAND
#> 1 105540124
#> X2022.State.Legislative.Districts...Upper.INTPTLON
#> 1 -090.2284231
#> X2022.State.Legislative.Districts...Upper.MTFCC
#> 1 G5210
#> X2022.State.Legislative.Districts...Upper.LDTYP
#> 1 O
#> X2022.State.Legislative.Districts...Lower.GEOID
#> 1 29079
#> X2022.State.Legislative.Districts...Lower.CENTLAT
#> 1 +38.6369287
#> X2022.State.Legislative.Districts...Lower.SLDL
#> 1 079
#> X2022.State.Legislative.Districts...Lower.AREAWATER
#> 1 0
#> X2022.State.Legislative.Districts...Lower.STATE
#> 1 29
#> X2022.State.Legislative.Districts...Lower.BASENAME
#> 1 Missouri State House District 79
#> X2022.State.Legislative.Districts...Lower.OID
#> 1 2139031808633333
#> X2022.State.Legislative.Districts...Lower.LSADC
#> 1 00
#> X2022.State.Legislative.Districts...Lower.FUNCSTAT
#> 1 N
#> X2022.State.Legislative.Districts...Lower.INTPTLAT
#> 1 +38.6369287
#> X2022.State.Legislative.Districts...Lower.NAME
#> 1 Missouri State House District 79
#> X2022.State.Legislative.Districts...Lower.OBJECTID
#> 1 3082
#> X2022.State.Legislative.Districts...Lower.CENTLON
#> 1 -090.2290250
#> X2022.State.Legislative.Districts...Lower.LSY
#> 1 2022
#> X2022.State.Legislative.Districts...Lower.AREALAND
#> 1 18628738
#> X2022.State.Legislative.Districts...Lower.INTPTLON
#> 1 -090.2290250
#> X2022.State.Legislative.Districts...Lower.MTFCC
#> 1 G5220
#> X2022.State.Legislative.Districts...Lower.LDTYP X2020.Census.Blocks.SUFFIX
#> 1 O
#> X2020.Census.Blocks.GEOID X2020.Census.Blocks.CENTLAT
#> 1 295101278001042 +38.6362480
#> X2020.Census.Blocks.BLOCK X2020.Census.Blocks.AREAWATER
#> 1 1042 0
#> X2020.Census.Blocks.STATE X2020.Census.Blocks.BASENAME
#> 1 29 1042
#> X2020.Census.Blocks.OID X2020.Census.Blocks.LSADC
#> 1 210701005649120 BK
#> X2020.Census.Blocks.FUNCSTAT X2020.Census.Blocks.INTPTLAT
#> 1 S +38.6362480
#> X2020.Census.Blocks.NAME X2020.Census.Blocks.OBJECTID
#> 1 Block 1042 3154817
#> X2020.Census.Blocks.TRACT X2020.Census.Blocks.CENTLON
#> 1 127800 -090.2318925
#> X2020.Census.Blocks.BLKGRP X2020.Census.Blocks.AREALAND
#> 1 1 36036
#> X2020.Census.Blocks.INTPTLON X2020.Census.Blocks.MTFCC
#> 1 -090.2318925 G5040
#> X2020.Census.Blocks.LWBLKTYP X2020.Census.Blocks.UR
#> 1 L U
#> X2020.Census.Blocks.COUNTY Census.Tracts.GEOID Census.Tracts.CENTLAT
#> 1 510 29510127800 +38.6319521
#> Census.Tracts.AREAWATER Census.Tracts.STATE Census.Tracts.BASENAME
#> 1 0 29 1278
#> Census.Tracts.OID Census.Tracts.LSADC Census.Tracts.FUNCSTAT
#> 1 2079015485646034 CT S
#> Census.Tracts.INTPTLAT Census.Tracts.NAME Census.Tracts.OBJECTID
#> 1 +38.6319521 Census Tract 1278 23162
#> Census.Tracts.TRACT Census.Tracts.CENTLON Census.Tracts.AREALAND
#> 1 127800 -090.2259200 2546610
#> Census.Tracts.INTPTLON Census.Tracts.MTFCC Census.Tracts.COUNTY
#> 1 -090.2259200 G5020 510
#> X118th.Congressional.Districts.GEOID X118th.Congressional.Districts.CENTLAT
#> 1 2901 +38.7249542
#> X118th.Congressional.Districts.CDSESSN
#> 1 118
#> X118th.Congressional.Districts.AREAWATER X118th.Congressional.Districts.STATE
#> 1 27393419 29
#> X118th.Congressional.Districts.BASENAME X118th.Congressional.Districts.OID
#> 1 1 2119031808633255
#> X118th.Congressional.Districts.LSADC X118th.Congressional.Districts.FUNCSTAT
#> 1 C2 N
#> X118th.Congressional.Districts.INTPTLAT X118th.Congressional.Districts.NAME
#> 1 +38.7269305 Congressional District 1
#> X118th.Congressional.Districts.OBJECTID
#> 1 330
#> X118th.Congressional.Districts.CENTLON X118th.Congressional.Districts.CD118
#> 1 -090.3057680 01
#> X118th.Congressional.Districts.AREALAND
#> 1 642192499
#> X118th.Congressional.Districts.INTPTLON X118th.Congressional.Districts.MTFCC
#> 1 -090.3058980 G5200
# }