-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documentation with geog_level_lookup
- Loading branch information
Showing
7 changed files
with
98 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#' Create geographic_level API shorthand to natural language look-up | ||
#' | ||
#' @description | ||
#' Script for updating the package data file geog_level_lookup.rda with the look-up between API | ||
#' shorthands and natural language versions of geographic levels. | ||
#' | ||
#' @returns NULL | ||
#' @keywords internal | ||
#' | ||
#' @examples | ||
#' \dontrun{ | ||
#' create_geog_level_lookup() | ||
#' } | ||
create_geog_level_lookup <- function() { | ||
geog_level_lookup <- data.frame( | ||
api_friendly = c( | ||
"EDA", "INST", "LA", "LAD", | ||
"LEP", "LSIP", | ||
"MAT", "MCA", | ||
"NAT", "OA", | ||
"PA", "PCON", "PROV", | ||
"REG", "RSC", "SCH", "SPON", "WARD" | ||
), | ||
human_friendly = c( | ||
"English devolved area", "Institution", "Local authority", "Local authority district", | ||
"Local enterprise partnership", "Local skills improvement plan area", | ||
"Multi-academy trust", "MCA", | ||
"National", "Opportunity area", | ||
"Planning area", "Parliamentary constituency", "Provider", | ||
"Regional", "Regional school commissioner region", "School", "Sponsor", "Ward" | ||
) | ||
) | ||
# write it out to the data folder | ||
|
||
usethis::use_data(geog_level_lookup, overwrite = TRUE) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#' Look-up for API geographic_level shorthands | ||
#' | ||
#' A look-up of API geographic_level shorthands and their respective natural forms. | ||
#' | ||
#' @format ## `geog_level_lookup` | ||
#' A data frame with 18 rows and 2 columns: | ||
#' \describe{ | ||
#' \item{api_friendly}{API geographic level shorthands} | ||
#' \item{human_friendly}{Narural language geographic levels} | ||
#' } | ||
#' @source curated by explore.statistics@@education.gov.uk | ||
"geog_level_lookup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.