Skip to content

Commit

Permalink
Merge pull request nationalparkservice#114 from RobLBaker/master
Browse files Browse the repository at this point in the history
update get_park_polygon API;
  • Loading branch information
RobLBaker authored Jun 28, 2024
2 parents e6a882f + 4baccf7 commit 69b520b
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 36 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions R/geography.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#'
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion R/replace_blanks.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NA> with the designated missing value code.
Expand Down
14 changes: 7 additions & 7 deletions docs/news/index.html

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

4 changes: 1 addition & 3 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

14 changes: 7 additions & 7 deletions docs/reference/convert_datetime_format.html

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

4 changes: 2 additions & 2 deletions docs/reference/get_park_polygon.html

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

12 changes: 6 additions & 6 deletions docs/reference/index.html

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

14 changes: 7 additions & 7 deletions docs/reference/replace_blanks.html

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

2 changes: 1 addition & 1 deletion man/get_park_polygon.Rd

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

0 comments on commit 69b520b

Please sign in to comment.