Skip to content

Commit

Permalink
In prep_geonames if using internal lookup, filter out historical names
Browse files Browse the repository at this point in the history
  • Loading branch information
truenomad committed May 19, 2024
1 parent 4f28e4a commit ed18bf8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 19 deletions.
9 changes: 0 additions & 9 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#' \item{\code{LVL}}{Integer, admin level}
#' \item{\code{WHO_STATUS}}{Character, membership status in WHO}
#' \item{\code{UN_CODE}}{Integer, United Nations code}
#' \item{\code{UNICEF_REG}}{Character, UNICEF regional classification}
#' \item{\code{CENTER_LON}}{Numeric, longitude of the center point}
#' \item{\code{CENTER_LAT}}{Numeric, latitude of the center point}
#' \item{\code{GlobalID}}{Character, another form of unique identifier}
Expand All @@ -39,15 +38,7 @@
#' \item{\code{ADM0_GUID}}{Character, GUID for admin level 0 (country)}
#' \item{\code{NOTES}}{Character, additional notes}
#' \item{\code{ADM0_VIZ_NAME}}{Character, visual name for the country}
#' \item{\code{ADM2_SHAPE_ID}}{Character, shape identifier for level 2 div}
#' \item{\code{ADM1_SHAPE_ID}}{Character, shape identifier for level 1 div}
#' \item{\code{ADM0_SHAPE_ID}}{Character, shape identifier for the country}
#' \item{\code{ADM2_PCODE}}{Character, p-code for admin level 2}
#' \item{\code{ADM1_PCODE}}{Character, p-code for admin level 1}
#' \item{\code{ADM0_PCODE}}{Character, p-code for the country}
#' \item{\code{WHO_SUBREGION}}{Character, WHO subregion classification}
#' \item{\code{Shape__Area}}{Numeric, area of the shape}
#' \item{\code{Shape__Length}}{Numeric, perimeter length of the shape}
#' }
#' @source https://hub.arcgis.com/datasets/WHO::polio-administrative-boundaries
#' @keywords datasets
Expand Down
2 changes: 1 addition & 1 deletion R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ globalVariables(
"distance", "longname_corrected", "longname_corrected2",
"match_rank", "matched_names", "form_id_num", "last_date_in_chunk", "x",
"date_last_updated", "form_id", "name_of_creator", "created_time",
"user_name", "ADM0_NAME", "ADM1_NAME", "ADM2_NAME"
"user_name", "ADM0_NAME", "ADM1_NAME", "ADM2_NAME", "ENDDATE"
)
)

1 change: 1 addition & 0 deletions R/prep_geonames.R
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ prep_geonames <- function(target_df, lookup_df = NULL,
# is not provided
if (is.null(lookup_df)) {
lookup_df <- poliprep::shp_global |>
dplyr::filter(ENDDATE == "9999-12-31 01:00:00") |>
dplyr::select(
!!level0 := ADM0_NAME,
!!level1 := ADM1_NAME,
Expand Down
Binary file modified data/shp_global.rda
Binary file not shown.
9 changes: 0 additions & 9 deletions man/shp_global.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed18bf8

Please sign in to comment.