
Assert the HOOD_* schema version of a TPS data.frame
Source:R/toronto_neighbourhoods.R
morie_tps_assert_hood_version.RdErrors when the expected schema's column is absent. Warns when BOTH schemas are present (downstream code MAY accidentally use the wrong one).
Usage
morie_tps_assert_hood_version(df, expected = c("158", "140"))Examples
cw <- morie_to_hood_crosswalk()
df <- data.frame(HOOD_158 = utils::head(cw$hood_158, 5))
res <- try(morie_tps_assert_hood_version(df, expected = "158"))