Skip to contents

For geographic levels that have both a code and a name column, checks that any location with the GSS not-available code "x" also has the corresponding name "Not available". Applies to all geographic levels except those with their own combinations checks, RSC region, Institution, and Planning area.

Usage

check_geog_na(data, verbose = FALSE, stop_on_error = FALSE)

Arguments

data

A data frame of the data file

verbose

logical, if TRUE prints feedback messages to console for every test, if FALSE run silently

stop_on_error

logical, if TRUE will stop with an error if the result is "FAIL", and will throw genuine warning if result is "WARNING"

Value

a single row data frame

Examples

check_geog_na(example_data)
#>     check result                                  message guidance_url
#> 1 geog_na   PASS No applicable geographic levels to test.           NA
check_geog_na(example_data, verbose = TRUE)
#>  No applicable geographic levels to test.
#>     check result                                  message guidance_url
#> 1 geog_na   PASS No applicable geographic levels to test.           NA