coords_to_fips {fipio}R Documentation

Associate a set of coordinates to FIPS codes

Description

Associate a set of coordinates to FIPS codes

Usage

coords_to_fips(x, ...)

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

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

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

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

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

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

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

## S3 method for class '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)

[Package fipio version 1.1.2 Index]