csb_projectXY: Project Calls for Service Data Using Coordinates

View source: R/csb_projectXY.R

csb_projectXYR Documentation

Project Calls for Service Data Using Coordinates

Description

csb_projectXY converts srx and sry data into a simple features object. You can write a shapefile directly from the output of this function using sf::st_write.

Usage

csb_projectXY(.data, varX, varY, crs)

Arguments

.data

A tibble or data frame

varX

Name of column containing x coordinate data

varY

Name of column containing y coordinate data

crs

Optional; coordinate reference system for the data to be projected into

Value

Returns a sf object of the input data projected as point data.

Examples

# remove missing coordinates prior to projecting
csb <- csb_missingXY(january_2018, srx, sry, newVar = missing)
csb <- dplyr::filter(csb, missing == FALSE)

# project data
csb_projectXY(csb, srx, sry)

# project with a custom crs
csb_projectXY(csb, srx, sry, crs = 4269)


slu-openGIS/stlcsb documentation built on Jan. 28, 2024, 12:10 p.m.