Transforms a Water Quality Portal dataframe into a geospatial sf object.
Arguments
- .data
A dataframe that has been processed using
TADA_DataRetrieval()andTADA_AutoClean().- crs
The coordinate reference system (CRS) for the returned point features. The default is CRS 4326 (WGS84).
Value
An sf object, which is the original TADA Water Quality Portal dataframe transformed into geospatial point objects.
Details
This function adds a new column, 'geometry', to the input dataframe, enabling mapping and additional geospatial capabilities. For an example workflow, refer to the TADAModule2.Rmd file.
Examples
if (FALSE) { # \dontrun{
# Retrieve water quality data
tada_not_spatial <- TADA_DataRetrieval(
characteristicName = "pH",
statecode = "SC",
countycode = "Abbeville",
applyautoclean = TRUE,
ask = FALSE
)
# Convert `tada_not_spatial` into an `sf` object, projected in CRS 4269 (NAD83)
tada_spatial <- TADA_MakeSpatial(tada_not_spatial, crs = 4269)
} # }