Skip to contents

Transform a Water Quality Portal dataframe into a geospatial sf object.

Usage

TADA_MakeSpatial(.data, crs = 4326)

Arguments

.data

A dataframe created by TADA_DataRetrieval().

crs

The coordinate reference system (CRS) you would like the returned point features to be in. The default is CRS 4326 (WGS84).

Value

The original TADA Water Quality Portal dataframe but as geospatial sf point objects.

Details

Adds one new column to input dataset, 'geometry', which allows for mapping and additional geospatial capabilities. Check out the TADAModule2.Rmd for an example workflow.

Examples

if (FALSE) {

tada_not_spatial <- TADA_DataRetrieval(
  characteristicName = "pH",
  statecode = "SC",
  countycode = "Abbeville",
  applyautoclean = TRUE
)

# make `tada_not_spatial` an sf object, projected in crs = 4269 (NAD83)
tada_spatial <- TADA_MakeSpatial(tada_not_spatial, crs = 4269)
}