TADA_MakeSpatial: TADA_MakeSpatial

View source: R/GeospatialFunctions.R

TADA_MakeSpatialR Documentation

TADA_MakeSpatial

Description

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).

Details

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

Value

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

See Also

TADA_DataRetrieval()

Examples

## Not run: 

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

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

## End(Not run)


USEPA/TADA documentation built on April 12, 2025, 1:47 p.m.