Skip to contents

Associate a set of coordinates to FIPS codes

Usage

coords_to_fips(x, ...)

# S3 method for sf
coords_to_fips(x, ...)

# S3 method for sfc
coords_to_fips(x, ...)

# S3 method for sfg
coords_to_fips(x, ...)

# S3 method for list
coords_to_fips(x, ...)

# S3 method for data.frame
coords_to_fips(x, coords = c(1, 2), ...)

# S3 method for matrix
coords_to_fips(x, coords = c(1, 2), ...)

# S3 method for character
coords_to_fips(x, y, ...)

# S3 method for numeric
coords_to_fips(x, y, ...)

Arguments

x

data.frame, matrix, sf/sfc/sfg object, or longitude in EPSG:4326

...

Named arguments passed on to methods

coords

Coordinates columns if x is a data.frame or matrix.

y

Latitude in EPSG:4326

Value

a character vector of FIPS codes

Examples

# Some coordinates at UC Santa Barbara
coords_to_fips(x = -119.8696, y = 34.4184)
#> [1] "06083"