Skip to content

Commit

Permalink
Merge pull request #63 from RobLBaker/master
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
RobLBaker authored Dec 23, 2024
2 parents c87682f + 2b63bd7 commit 4a79c35
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 451 deletions.
3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ Remotes:
nationalparkservice/DPchecker,
nationalparkservice/QCkit
Imports:
EML,
dplyr,
httr,
XML,
curl,
tools,
rlang,
readr,
magrittr,
crayon,
Expand All @@ -37,7 +35,6 @@ Imports:
QCkit (>= 0.1.4),
here,
jsonlite,
cli,
purrr,
tibble,
lifecycle
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ export(load_core_metadata)
export(load_data_package)
export(load_data_package_deprecated)
export(load_data_packages)
export(load_domains)
export(load_pkg_metadata)
export(map_wkt)
export(rm_local_packages)
export(summarize_packages)
export(validate_data_package)
importFrom(lifecycle,deprecated)
importFrom(magrittr,"%>%")
importFrom(stats,na.omit)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# NPSutils 0.3.3 (under development)

##2024-12-19
* remove `validate_data_package()` as this function was listed as "still under construction" is mostly obsolete given other functions and functions in the DPchecker package.
* remove `load_domains()` as this function was not working properly and was conceived of before the data package specifications were properly set.
## 2024-12-19
* updated `load_pkg_metadata` to be simpler and essentially call `DPchecker::load_metadata` but with a preset default directory structure that works well with the default settings for `get_data_package`.
* Add meta-analysis functions for finding and producing summary statistics multiple data packages including `get_ref_list`, `get_refs_info()`, and `summarize_packages`.
Expand Down
122 changes: 0 additions & 122 deletions R/load_domains.R

This file was deleted.

1 change: 1 addition & 0 deletions R/map_wkt.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#'
#' @return The function returns a dynamic, zoomable leaflet map with the specific geometry plotted.
#' @importFrom magrittr %>%
#' @importFrom stats na.omit
#' @export
#'
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/meta_analyses.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ get_refs_info <- function (reference_type = "dataPackage",
#'
#' If a data package fails to download (or load) into R, the function will return NAs instead of summary data about the data package as well as a message about the package status ("Loads", "Error") in the dataframe that the function returns. The function will ignore files that fall outside the data package specifications (one or more .csv files and a single .xml file ending in *_metadata.xml).
#'
#' When `check_metadata` is set to the default `FALSE`, the function will attempt to and load any .csv, regardless of the contents. Data packages with restricted access can produce false positives if you do not have the appropriate permissions to download the data as the function will still download the files, but they will be populated with unhelpful hmtl rather than the intended data. Functions that fail to load into R likely violate the data package specifications in some fundamental way (e.g. .CSV file instead of .csv or no .csv files at all).
#' When `check_metadata` is set to the default `FALSE`, the function will attempt to and load any .csv, regardless of the contents. Data packages with restricted access can produce false positives if you do not have the appropriate permissions to download the data as the function will still download the files, but they will be populated with unhelpful hmtl rather than the intended data. In this case, each .csv will be listed as having 5 columns and one row of data. Functions that completely fail to load into R likely violate the data package specifications in some fundamental way (e.g. .CSV file instead of .csv or no .csv files at all).
#'
#' When `check_metadata` is set to `TRUE`, additional checks and tests are run on the data package and load errors may occur for all of the above reasons and also if there are multiple .xml files, if the metadata file name does not end in "*_metadata.xml", if there is no metadata file, or if the metadata file is EML schema-invalid.
#'
Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ globalVariables(c("capture.output",
"metaformat",
"data_format",
"metadata_format",
"fileList"
"fileList",
"attributeName"
))
24 changes: 0 additions & 24 deletions R/validateDataPackage.R

This file was deleted.

15 changes: 1 addition & 14 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,4 +3,4 @@ pkgdown: 2.1.0
pkgdown_sha: ~
articles:
NPSutils: NPSutils.html
last_built: 2024-12-20T18:46Z
last_built: 2024-12-23T17:12Z
8 changes: 0 additions & 8 deletions docs/reference/index.html

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

Loading

0 comments on commit 4a79c35

Please sign in to comment.