Skip to contents

For each geographic level present in the data, checks that the associated columns (code field, name field, and secondary code field where applicable) contain no NA values. The new_la_code column is excluded from this check as it can legitimately be blank for older Local authority records. Rows at Planning area level are excluded as they are not used in the table tool.

Usage

check_geog_level_completed(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

Details

Three cases result in a silent PASS, each intentionally caught by a dedicated check elsewhere in the screening pipeline:

Examples

check_geog_level_completed(example_data)
#>                  check result
#> 1 geog_level_completed   PASS
#>                                                   message guidance_url
#> 1 All geographic level columns are completed as expected.           NA
check_geog_level_completed(example_data, verbose = TRUE)
#>  All geographic level columns are completed as expected.
#>                  check result
#> 1 geog_level_completed   PASS
#>                                                   message guidance_url
#> 1 All geographic level columns are completed as expected.           NA