diff --git a/NEWS.md b/NEWS.md index f2e0e6c..31aeca7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # QCkit v0.1.8 (not yet released) +2024-06-28 +* Updated `get_park_polygon()` to use the new API (had been using a legacy API). Added documentation to specify that the function is getting the convexhull for the park, which may not work particularly well for some parks. 2024-06-27 * bug fixes for `generate_ll_from_utm()` * add function `remove_empty_tables()` (and associated unit tests) diff --git a/R/geography.R b/R/geography.R index 2b89c94..8f41d47 100644 --- a/R/geography.R +++ b/R/geography.R @@ -103,7 +103,7 @@ return(in_park) #' Retrieve the polygon information for the park unit from NPS REST services #' #' @description `get_park_polygon()` retrieves a geoJSON string for a polygon of -#'a park unit. This is not the official boundary. +#'a park unit. This is not the official boundary. Note that the REST API call returns the default "convexHull". This is will work better or worse for some parks, depending on the park shape/geography/number of disjunct areas. #' #' #' @param unit_code is the four-character unit code as designated by NPS. #' @@ -114,7 +114,7 @@ return(in_park) #' } get_park_polygon <- function(unit_code) { # get geography from NPS Rest Services - units_url <- paste0("https://irmaservices.nps.gov/v2/rest/unit/", + units_url <- paste0("https://irmaservices.nps.gov/Unit/v2/api/", unit_code, "/geography") xml <- httr::content(httr::GET(units_url)) diff --git a/R/replace_blanks.R b/R/replace_blanks.R index 3f028d2..6b9a835 100644 --- a/R/replace_blanks.R +++ b/R/replace_blanks.R @@ -69,7 +69,7 @@ replace_blanks <- function(directory = here::here(), missing_val_code = NA) { #extract just the file name my_path <- basename(my_path) - #give each dataframe a name basd on the filename where it originated + #give each dataframe a name based on the filename where it originated names(my_data) <- gsub(".csv", "", my_path) #replace all with the designated missing value code. diff --git a/docs/news/index.html b/docs/news/index.html index af13b37..836f289 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -3,7 +3,7 @@ - +
- +
@@ -65,7 +65,7 @@

Changelog

-

2024-06-27 * bug fixes for generate_ll_from_utm() * add function remove_empty_tables() (and associated unit tests) * update documentation for replace blanks() to indicate it can replace blanks with more than just NA

+

2024-06-28 * Updated get_park_polygon() to use the new API (had been using a legacy API). Added documentation to specify that the function is getting the convexhull for the park, which may not work particularly well for some parks. 2024-06-27 * bug fixes for generate_ll_from_utm() * add function remove_empty_tables() (and associated unit tests) * update documentation for replace blanks() to indicate it can replace blanks with more than just NA

@@ -167,10 +167,10 @@
+ - - + diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 96f20dc..c6ecf10 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,5 @@ articles: DRR_Purpose_and_Scope: DRR_Purpose_and_Scope.html Starting-a-DRR: Starting-a-DRR.html Using-the-DRR-Template: Using-the-DRR-Template.html - -last_built: 2024-06-27T19:41Z - +last_built: 2024-06-28T15:11Z diff --git a/docs/reference/convert_datetime_format.html b/docs/reference/convert_datetime_format.html index 039e2c7..640a906 100644 --- a/docs/reference/convert_datetime_format.html +++ b/docs/reference/convert_datetime_format.html @@ -3,7 +3,7 @@ - +
- +
@@ -84,7 +84,7 @@

Arguments

Value

- +

A character vector of date/time format strings that can be parsed by readr or strptime.

@@ -119,10 +119,10 @@

Examples

+ - - + diff --git a/docs/reference/get_park_polygon.html b/docs/reference/get_park_polygon.html index 0235462..346f7ed 100644 --- a/docs/reference/get_park_polygon.html +++ b/docs/reference/get_park_polygon.html @@ -1,6 +1,6 @@ Retrieve the polygon information for the park unit from NPS REST services — get_park_polygon • QCkit - +
- +
@@ -164,10 +164,10 @@

All functions

+ - - + diff --git a/docs/reference/replace_blanks.html b/docs/reference/replace_blanks.html index ec7dd61..364491f 100644 --- a/docs/reference/replace_blanks.html +++ b/docs/reference/replace_blanks.html @@ -23,7 +23,7 @@ - +
- +
@@ -125,7 +125,7 @@

Arguments

Value

- +

list of data frames (invisibly)

@@ -168,10 +168,10 @@

Examples

+ - - + diff --git a/man/get_park_polygon.Rd b/man/get_park_polygon.Rd index 706bac9..572b269 100644 --- a/man/get_park_polygon.Rd +++ b/man/get_park_polygon.Rd @@ -11,7 +11,7 @@ get_park_polygon(unit_code) } \description{ \code{get_park_polygon()} retrieves a geoJSON string for a polygon of -a park unit. This is not the official boundary. +a park unit. This is not the official boundary. Note that the REST API call returns the default "convexHull". This is will work better or worse for some parks, depending on the park shape/geography/number of disjunct areas. #' } \examples{