Applies pointblank validation rules to check data quality and schema compliance for an eData Sites table. Checks that site codes and names are non-null and unique, geographic feature and country fields are within their controlled vocabularies, coordinates are within valid ranges, and required metadata fields are present.
Usage
pb_validate_sites(
data,
actions = action_levels(),
agent = TRUE,
northern_hemisphere = FALSE
)Arguments
- data
Data frame containing Sites table data to validate
- actions
Action levels for pointblank agent (only used when
agent = TRUE)- agent
Logical. If
TRUE(default), returns a pointblank agent object. IfFALSE, returns the validated data with validation failures removed.- northern_hemisphere
Logical. If
TRUE, constrains latitude validation to northern hemisphere (0-90). Default isFALSE(allows -90 to 90).
Value
If agent = TRUE, a pointblank agent object containing validation results.
If agent = FALSE, the input data with validation failures removed.
Details
Validation thresholds are configured using pointblank::action_levels().
See also
pb_validate_edata_table() for the underlying validation framework,
pb_validate_all_edata_tables() to validate all tables at once,
example_sites_tibble() for an example Sites table.
Other validation:
pb_validate_CREED_data_relevance(),
pb_validate_CREED_data_reliability(),
pb_validate_CREED_scores(),
pb_validate_all_edata_tables(),
pb_validate_biota(),
pb_validate_campaign(),
pb_validate_edata_table(),
pb_validate_measurements(),
pb_validate_methods(),
pb_validate_parameters(),
pb_validate_reference(),
pb_validate_samples()
Examples
if (FALSE) { # \dontrun{
pb_validate_sites(example_sites_tibble())
# Constrain latitude to the northern hemisphere
pb_validate_sites(example_sites_tibble(), northern_hemisphere = TRUE)
} # }