Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# NPSutils 1.1.0
## 2025-09-15
* Update Unit service API to use current version (instead of discontinued legacy endpoint)
## 2025-05-16
* Add a vignette going over basic functions and how to use NPSutils
## 2025-05-08
Expand Down
8 changes: 4 additions & 4 deletions R/getParkUnitInfo.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get_unit_code <- function(unit) { # input must have quotes to indicate strings
f <- file.path(tempdir(), "irmadownload.xml")
if (!file.exists(f)) {
# access all park codes from NPS xml file
curl::curl_download("https://irmaservices.nps.gov/v2/rest/unit/", f)
curl::curl_download("https://irmaservices.nps.gov/unit/v2/api/", f)
}
result <- XML::xmlParse(file = f) # parse xml
dat <- XML::xmlToDataFrame(result)
Expand Down Expand Up @@ -55,7 +55,7 @@ get_park_code <- function(park) {
f <- file.path(tempdir(), "irmadownload.xml")
if (!file.exists(f)) {
# access all park codes from NPS xml file
curl::curl_download("https://irmaservices.nps.gov/v2/rest/unit/", f)
curl::curl_download("https://irmaservices.nps.gov/unit/v2/api/", f)
}
result <- XML::xmlParse(file = f)
dat <- XML::xmlToDataFrame(result)
Expand Down Expand Up @@ -85,7 +85,7 @@ get_unit_code_info <- function(code) {
f <- file.path(tempdir(), "irmadownload.xml")
if (!file.exists(f)) {
# access all park codes from NPS xml file
curl::curl_download(paste0("https://irmaservices.nps.gov/v2/rest/unit/", f))
curl::curl_download(paste0("https://irmaservices.nps.gov/unit/v2/api/", f))
}
result <- XML::xmlParse(file = f)
dat <- XML::xmlToDataFrame(result)
Expand Down Expand Up @@ -131,7 +131,7 @@ get_unit_info <- function(code = NULL,
f <- file.path(tempdir(), "irmadownload.xml")
if (!file.exists(f)) {
# access all park codes from NPS xml file
curl::curl_download("https://irmaservices.nps.gov/v2/rest/unit/", f)
curl::curl_download("https://irmaservices.nps.gov/unit/v2/api/", f)
}
result <- XML::xmlParse(file = f)
dat <- XML::xmlToDataFrame(result)
Expand Down
5 changes: 3 additions & 2 deletions docs/news/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.1.1
pkgdown_sha: ~
articles:
NPSutils: NPSutils.html
last_built: 2025-05-19T15:48Z
last_built: 2025-09-15T21:47Z
urls:
reference: https://nationalparkservice.github.io/NPSutils/reference
article: https://nationalparkservice.github.io/NPSutils/articles
4 changes: 2 additions & 2 deletions docs/reference/get_data_packages.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/load_data_packages.html

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

2 changes: 1 addition & 1 deletion docs/reference/rm_local_packages.html

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

Loading