Skip to contents

test_public_points() will look for GPS point coordinates in metadata, if the data package is not public will warn users that they are potentially publishing confidential unclassified information (CUI). Specifically, if no GPS points are identified, the function passes. If the CUI dissemination code is set to "PUBLIC" and GPS points are identified, the function passes. If the CUI dissemination code is not set to "PUBLIC" and GPS points are identified, the function will fail with a warning. If no CUI dissemination code is detected, the function fails with an error.

Usage

test_public_points(metadata = load_metadata(directory))

Arguments

metadata

The metadata object returned by load_metadata. If parameter is not provided, it defaults to calling load_metadata in the current project directory.

Value

invisible(metadata)

Details

The contents of metadata are public even if the data itself is restricted. This means that if GPS coordinates (a common type of data that must be redacted or fuzzed before it can be made public) exist in metadata, these GPS coordinates will be publicly available. The function will warn people of that potentiality. The function will only flag GPS points (not bounding boxes or polygons or other shapes). The function only checks for GPS points in the geographicCoverage element.

Examples

if (FALSE) {
test_public_points()
}