diff --git a/NEWS.md b/NEWS.md
index 28aacbc..7ff4f68 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,7 @@
# DPchecker 0.3.5 (develoment version)
+## 2024-011-05
+* Bugfix for `test_storage_type()` data packages built in ezEML that have only 1 .csv file.
+
* Add `test_project()` function to test for DataStore projects.
* Add unit tests for all optional eml elements
* Update documentation to reflect new `test_project()` function.
diff --git a/R/required_eml_elements.R b/R/required_eml_elements.R
index 35ef2c5..57ebacc 100644
--- a/R/required_eml_elements.R
+++ b/R/required_eml_elements.R
@@ -608,30 +608,41 @@ test_storage_type <- function(metadata = load_metadata(directory)) {
function (tbl)
{list(arcticdatautils::eml_get_simple(tbl,
"storageType"))})
- #if EZeml added typeSystem="XML Schema Datatypes" to storageType element:
- if(sum(grepl("XML Schema Datatype", attr_storage_type)) > 0){
- attr_storage_type <-attr_storage_type[-length(seq_along(attr_storage_type))]
+ #if ezEML with multiple .csv (remove typeSystem="XML Schema Datatypes"):
+ if (sum(grepl("XML Schema Datatype", attr_storage_type)) > 1) {
+ attr_storage_type <- attr_storage_type[-length(seq_along(attr_storage_type))]
+ attr_storage_type <- unlist(attr_storage_type)
+ attr_storage_type <- attr_storage_type[names(attr_storage_type) %in% c("")]
+ }
+ # if ezEML with only one .csv (remove typeSystem= "XML Schema Datatypes":
+ else if (sum(grepl("XML Schema Datatype", attr_storage_type)) == 1) {
attr_storage_type <- unlist(attr_storage_type)
attr_storage_type <- attr_storage_type[names(attr_storage_type) %in% c("")]
}
# else not an ezEML product:
- else{
+ else {
attr_storage_type$`@context` <- NULL
attr_storage_type <- unlist(attr_storage_type)
}
#comparisons:
- if(identical(seq_along(metadata_attrs), seq_along(attr_storage_type))){
+ if (identical(seq_along(metadata_attrs), seq_along(attr_storage_type))) {
cli::cli_inform(c("v" = "All attributes listed in metadata have a storage type associated with them."))
}
else {
cli::cli_abort(c("x" = "Metadata attribute and storage type mis-match: attributes must have exactly one storage type."))
}
- attr_storage_list <- c("string", "float", "date", "factor", "character", "dateTime")
- if(sum(!attr_storage_type %in% attr_storage_list) > 0){
+ attr_storage_list <- c("string",
+ "float",
+ "date",
+ "factor",
+ "character",
+ "dateTime",
+ "integer")
+ if (sum(!attr_storage_type %in% attr_storage_list) > 0) {
cli::cli_warn(c("!" = "Some attribute storage types are not accepted values."))
}
- else{
+ else {
cli::cli_inform(c("v" = "All attribute storage types are valid values."))
}
return(invisible(metadata))
diff --git a/docs/news/index.html b/docs/news/index.html
index 01d4f90..098ea22 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -34,10 +34,14 @@
DPchecker 0.3.4
2024-07-29 * Update license to CC0 * Bug fix from test_missing_data()
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 11a3a31..47b672a 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -3,4 +3,4 @@ pkgdown: 2.1.0
pkgdown_sha: ~
articles:
DPchecker: DPchecker.html
-last_built: 2024-09-19T19:20Z
+last_built: 2024-11-05T22:12Z
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png
deleted file mode 100644
index 17a3580..0000000
Binary files a/docs/reference/Rplot001.png and /dev/null differ
diff --git a/docs/search.json b/docs/search.json
index 77d7feb..05997ef 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"/articles/DPchecker.html","id":"install-dp-checker","dir":"Articles","previous_headings":"","what":"Install DP checker","title":"DPchecker","text":"can install DPchecker part NPSdataverse using:","code":"install.packages(\"devtools\") devtools::install_github(\"nationalparkservice/NPSdataverse\") library(NPSdataverse)"},{"path":[]},{"path":"/articles/DPchecker.html","id":"the-entire-package","dir":"Articles","previous_headings":"Check a data package","what":"The entire package","title":"DPchecker","text":"common use case DPchecker run single function, run_congruence_checks() run DPchecker tests . need fully constructed data package single folder consisting : * EML-formatted metadata file name ends _metadata.xml * UTF-8 encoded .csv files also need supply path data package. using Rstudio started new project, can put data package folder Rproject folder tell R find : data package somewhere else hard drive, describe path data package folder. example, data package folder folder called “nps_data” located Downloads folder (“username” username):","code":"run_congruence_checks(\"my_data_package_folder\") dp<-\"C:/Users/username/Downloads/my_data_package_folder\" run_congruence_checks(dp)"},{"path":"/articles/DPchecker.html","id":"metadata-only","dir":"Articles","previous_headings":"Check a data package","what":"Metadata only","title":"DPchecker","text":"cases, may want check just EML metadata file completeness without checking whether properly coincides data files (perhaps trouble shooting metadata issue sent just metadata file check). case, can restrict run_congruence_checks() function just check metadata elements:","code":"# In this case \"my_data_package_folder\" need only contain the metadata file but could include .csvs dp<-\"C:/Users/username/Downloads/my_data_package_folder\" run_congruence_checks(dp, check_metadata_only = TRUE)"},{"path":"/articles/DPchecker.html","id":"generate-a-log-file","dir":"Articles","previous_headings":"Check a data package","what":"Generate a log file","title":"DPchecker","text":"want generate log file run_congruence_checks() results can . log file may useful collaborating trouble shooting may simply handy records. Log files included data package upload. log file written directory Rproject default, can also specify directory saved .","code":"# save log file to current working directory: run_congruence_checks(dp, output_filename = \"congruence_log_YYYY-MM-DD\") # save the log file to another directory: save_here <- \"C:/Users/username/Documents\" run_congruence_checks(dp, output_filename = \"congruence_log_YYYY-MM-DD\", output_dir = save_here)"},{"path":"/articles/DPchecker.html","id":"interpreting-results","dir":"Articles","previous_headings":"","what":"Interpreting results","title":"DPchecker","text":"DPchecker tests designed help data package creators produce high quality, complete data packages can fully leverage DataStore’s ability ingest machine-readable metadata, maximally useful downstream data users. set tests also useful data package reviewers. Passing test indicated green check mark (✓\\checkmark). test fails, may fail error (red ×\\times) warning (yellow exclamation mark, !). Errors must addressed prior upload. Please modify data package DPchecker return errors. Warnings helpful indications data package creator may want look something. may wrong, might unusual. instance, data package lacked taxonomic geographic coverage fail taxonomic geographic coverage test warning lacking taxonomy geography unusual, may incorrect. Warnings may also used alert data package creators best practices - instance abstract less 20 words long test produce warning suggesting data package creator consider writing informative abstract.","code":""},{"path":"/articles/DPchecker.html","id":"tests-conducted","dir":"Articles","previous_headings":"","what":"Tests conducted","title":"DPchecker","text":"DPchecker v0.3.2 runs two types tests: metadata tests tests determine whether metadata data files congruent. Metadata tests can broken two sub-categories, metadata compliance metadata completeness. tests run order run listed .","code":""},{"path":"/articles/DPchecker.html","id":"metadata-compliance","dir":"Articles","previous_headings":"Tests conducted","what":"Metadata compliance","title":"DPchecker","text":"tests determine whether metadata schema valid adheres rules data packages. require *_metadata.xml file run require data files present. include: metadata file schema valid (test_validate_schema()) filename used exactly metadata (test_dup_meta_entries()) version EML supported (test_metadata_version() Metadata indicates data file single-character field delimiter (test_delimiter()) Metadata indicates data file contains exactly one header row (test_header_num()) Metadata indicates data files footers (test_footer()) Metadata contains taxonomic coverage element (test_taxonomic_cov()) Metadata contains geographic coverage element (test_geographic_cov()) Metadata contains Digital Object Identifier (DOI) (test_doi()) Metadata DOI properly formatted (test_doi_format()) Metadata contains URLs data table (test_datatable_urls) Metadata URLs properly formatted correspond DOI indicated metadata (test_datatable_urls_doi) Metadata contains publisher element (test_publisher()) Metadata indicates data column names begin letter contain spaces special characters (test_valid_fieldnames()) Metadata indicates file names letter contain special characters spaces. (test_valid_filenames()) Metadata contains emails, .gov emails (test_pii_meta_emails())","code":""},{"path":"/articles/DPchecker.html","id":"eml-elements-required-for-datastore","dir":"Articles","previous_headings":"Tests conducted","what":"EML elements required for DataStore:","title":"DPchecker","text":"tests ensure EML elements necessary DataStore properly extract metadata populate reference exist, correct location, properly formatted. elements also often aspects metadata passed repositories search engines DataCite data.gov google’s dataset search. Therefore, checks may throw warnings suggestions best practices - removing stray characters abstracts suggesting informative title title unusually short. Required EML element tests require *_metadata.xml file run require data files present. Creator element exists individual creators exist, valid (<3 words) surNames (test_creator()) Publication date present correct ISO-8601 format (test_pub_date()) Data package title present metadata (test_dp_title()) Data package metadata contains least one keyword (test_keywords()) Metadata states data created NPS (test_by_for_nps()) Metadata indicates publisher National Park Service (test_publisher_name()) Metadata indicates publisher state CO (test_publisher_state()) Metadata indicates publisher city Fort Collins (test_publisher_city()) Metadata contains well formatted abstract data package (test_dp_abstract()) Metadata contains well formatted methods section data package (test_methods()) dataTables listed metadata unique file description (test_file_descript()) Metadata contains valid CUI code (test_cui_dissemination()) Metadata contains valid license name (test_license()) Metadata contains Intellectual Rights statement (test_int_rights() attributes listed metadata attribute definitions (test_attribute_defs()) attributes listed metadata storage types associated (test_storage_type()) attribute storage types valid values (test_storage_type())","code":""},{"path":"/articles/DPchecker.html","id":"recommended-eml-elements","dir":"Articles","previous_headings":"Tests conducted","what":"Recommended EML elements","title":"DPchecker","text":"elements aren’t required. missing, tests generate warning can choose ignore. However, included elements, please resolve errors submitting data package. individual Creators ORCiD associated (test_orcid_exists()) ORCiDs properly formatted (test_orcid_format()) ORCiDs resolve ORCiD profile (test_orcid_resolves()) ORCiDs resolve ORCiD profile matches Creator’s last name (test_orcid_match()) metadata contains well formatted additionalInfo (“Notes” DataStore) section (test_notes()) metadata contains DataStore Project reference “projects”(test_project())","code":""},{"path":"/articles/DPchecker.html","id":"metadata-and-data-congruence","dir":"Articles","previous_headings":"Tests conducted","what":"Metadata and Data Congruence","title":"DPchecker","text":"functions check make sure values fields metadata file accurately corresponds data files supplied. test require entire data package - *_metadata.xml file data files (*.csv) must present. data files listed metadata metadata file names refer data files (test_file_name_match()) columns data match columns metadata (test_fields_match()) NAs (missing data) properly accounted metadata (test_missing_data()) Columns indicated numeric metadata contain numeric values missing value codes data (test_numeric_fields()) Columns indicated dates metadata matching date formats metadata data. checks cell date column format provided metadata can take time larger data packages (test_dates_parse()) Columns indicated dates metadata contain values fall within stated temporal coverage metadata (test_date_range())","code":""},{"path":"/articles/DPchecker.html","id":"data-and-metadata-compliance","dir":"Articles","previous_headings":"Tests conducted","what":"Data and Metadata Compliance","title":"DPchecker","text":"functions check data metadata files compliance. Please resolve errors uploading data. Data files contain email addresses constitute personally identifiable information (PII) (test_pii_data_emails() Metadata contain GPS coordinates data package public (test_public_points())","code":""},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Rob Baker. Maintainer, author. Sarah E. Wright. Author. Issac Quevedo. Contributor. Amelia Sherman. Contributor.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Baker R, Wright SE (2024). DPchecker: Checks Data Packages Congruence. R package version 0.3.4, https://nationalparkservice.github.io/DPchecker/.","code":"@Manual{, title = {DPchecker: Checks Data Packages for Congruence}, author = {Rob Baker and Sarah E. Wright}, year = {2024}, note = {R package version 0.3.4}, url = {https://nationalparkservice.github.io/DPchecker/}, }"},{"path":[]},{"path":"/index.html","id":"v033","dir":"","previous_headings":"","what":"v0.3.3","title":"Checks Data Packages for Congruence","text":"DPchecker (Data Package checker) package series functions NPS data package authors reviewers check internal consistency among data/meta data data package standards. Currently, EML metadata .csv data files supported. recommended store data files single metadata file (filename must end “metadata.xml”) directory. function runs single check imports data metadata necessary. prefer run checks , can use run_congruence_checks().","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Checks Data Packages for Congruence","text":"can install development version DPchecker GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"nationalparkservice/DPchecker\")"},{"path":"/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples:","title":"Checks Data Packages for Congruence","text":"Run checks : Verify file names column names metadata match data:","code":"library(DPchecker) # Get the directory where example data is stored (alternately, replace this with the path to your data folder) dir <- DPchecker_example(\"BICY_veg\") # Use this to test things out with the included example data # dir <- \"C:/Users/yourusername/Documents/my_data_package\" # The path to your data package should look something like this # Run all checks and summarize results run_congruence_checks(dir) # Alternately, if your data package is stored in the root of your R project folder, you don't need to pass any arguments run_congruence_checks() library(DPchecker) dir <- DPchecker_example(\"BICY_veg\") # Use this to test things out with the included example data # dir <- \"C:/Users/yourusername/Documents/my_data_package\" # The path to your data package should look something like this test_file_name_match(dir) test_fields_match(dir)"},{"path":[]},{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"CC0 1.0 Universal","title":"CC0 1.0 Universal","text":"CREATIVE COMMONS CORPORATION LAW FIRM PROVIDE LEGAL SERVICES. DISTRIBUTION DOCUMENT CREATE ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES INFORMATION “-” BASIS. CREATIVE COMMONS MAKES WARRANTIES REGARDING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER, DISCLAIMS LIABILITY DAMAGES RESULTING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER.","code":""},{"path":"/LICENSE.html","id":"statement-of-purpose","dir":"","previous_headings":"","what":"Statement of Purpose","title":"CC0 1.0 Universal","text":"laws jurisdictions throughout world automatically confer exclusive Copyright Related Rights (defined ) upon creator subsequent owner(s) (, “owner”) original work authorship /database (, “Work”). Certain owners wish permanently relinquish rights Work purpose contributing commons creative, cultural scientific works (“Commons”) public can reliably without fear later claims infringement build upon, modify, incorporate works, reuse redistribute freely possible form whatsoever purposes, including without limitation commercial purposes. owners may contribute Commons promote ideal free culture production creative, cultural scientific works, gain reputation greater distribution Work part use efforts others. /purposes motivations, without expectation additional consideration compensation, person associating CC0 Work (“Affirmer”), extent owner Copyright Related Rights Work, voluntarily elects apply CC0 Work publicly distribute Work terms, knowledge Copyright Related Rights Work meaning intended legal effect CC0 rights. Copyright Related Rights. Work made available CC0 may protected copyright related neighboring rights (“Copyright Related Rights”). Copyright Related Rights include, limited , following: right reproduce, adapt, distribute, perform, display, communicate, translate Work; moral rights retained original author(s) /performer(s); publicity privacy rights pertaining person’s image likeness depicted Work; rights protecting unfair competition regards Work, subject limitations paragraph 4(), ; rights protecting extraction, dissemination, use reuse data Work; database rights (arising Directive 96/9/EC European Parliament Council 11 March 1996 legal protection databases, national implementation thereof, including amended successor version directive); similar, equivalent corresponding rights throughout world based applicable law treaty, national implementations thereof. Waiver. greatest extent permitted , contravention , applicable law, Affirmer hereby overtly, fully, permanently, irrevocably unconditionally waives, abandons, surrenders Affirmer’s Copyright Related Rights associated claims causes action, whether now known unknown (including existing well future claims causes action), Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“Waiver”). Affirmer makes Waiver benefit member public large detriment Affirmer’s heirs successors, fully intending Waiver shall subject revocation, rescission, cancellation, termination, legal equitable action disrupt quiet enjoyment Work public contemplated Affirmer’s express Statement Purpose. Public License Fallback. part Waiver reason judged legally invalid ineffective applicable law, Waiver shall preserved maximum extent permitted taking account Affirmer’s express Statement Purpose. addition, extent Waiver judged Affirmer hereby grants affected person royalty-free, non transferable, non sublicensable, non exclusive, irrevocable unconditional license exercise Affirmer’s Copyright Related Rights Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“License”). License shall deemed effective date CC0 applied Affirmer Work. part License reason judged legally invalid ineffective applicable law, partial invalidity ineffectiveness shall invalidate remainder License, case Affirmer hereby affirms () exercise remaining Copyright Related Rights Work (ii) assert associated claims causes action respect Work, either case contrary Affirmer’s express Statement Purpose. Limitations Disclaimers. trademark patent rights held Affirmer waived, abandoned, surrendered, licensed otherwise affected document. Affirmer offers Work -makes representations warranties kind concerning Work, express, implied, statutory otherwise, including without limitation warranties title, merchantability, fitness particular purpose, non infringement, absence latent defects, accuracy, present absence errors, whether discoverable, greatest extent permissible applicable law. Affirmer disclaims responsibility clearing rights persons may apply Work use thereof, including without limitation person’s Copyright Related Rights Work. , Affirmer disclaims responsibility obtaining necessary consents, permissions rights required use Work. Affirmer understands acknowledges Creative Commons party document duty obligation respect CC0 use Work.","code":""},{"path":"/reference/DPchecker-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","title":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","text":"Allows user (reviewer) check data package test whether meets congruence standards set forth NPS upload DataStore datapackage.","code":""},{"path":[]},{"path":"/reference/DPchecker-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","text":"Maintainer: Rob Baker robert_baker@nps.gov (ORCID) Authors: Sarah E. Wright sarah_wright@nps.gov contributors: Issac Quevedo [contributor] Amelia Sherman [contributor]","code":""},{"path":"/reference/DPchecker_example.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate path to example data — DPchecker_example","title":"Generate path to example data — DPchecker_example","text":"Generate path example data","code":""},{"path":"/reference/DPchecker_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate path to example data — DPchecker_example","text":"","code":"DPchecker_example(dp_name = c(\"BICY_veg\", \"BUIS_herps\"))"},{"path":"/reference/DPchecker_example.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate path to example data — DPchecker_example","text":"dp_name Name data package.","code":""},{"path":"/reference/DPchecker_example.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate path to example data — DPchecker_example","text":"Path example data, dp_name specified.","code":""},{"path":"/reference/DPchecker_example.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate path to example data — DPchecker_example","text":"","code":"DPchecker_example() #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. #> [1] \"C:/Users/rlbaker/Documents/RDev/DPchecker_devspace/inst/extdata/BICY_veg\" DPchecker_example(\"BUIS_herps\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. #> [1] \"C:/Users/rlbaker/Documents/RDev/DPchecker_devspace/inst/extdata/BUIS_herps\""},{"path":"/reference/is_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if metadata is eml object — is_eml","title":"Check if metadata is eml object — is_eml","text":"Helper function validate argument belongs emld class.","code":""},{"path":"/reference/is_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if metadata is eml object — is_eml","text":"","code":"is_eml(metadata)"},{"path":"/reference/is_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if metadata is eml object — is_eml","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Data — load_data","title":"Load Data — load_data","text":"load_data() inspects working directory data files. Loads existing data files tibble.","code":""},{"path":"/reference/load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Data — load_data","text":"","code":"load_data(directory = here::here())"},{"path":"/reference/load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Data — load_data","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory.","code":""},{"path":"/reference/load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Data — load_data","text":"tibble .csvs","code":""},{"path":"/reference/load_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load Data — load_data","text":"loads data files specified directory (default working directory) tibble later use congruence checking. Returns user working directory upon exit. Currently supports .csv files.","code":""},{"path":"/reference/load_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Data — load_data","text":"","code":"data_pkg_dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. my_data <- load_data(data_pkg_dir)"},{"path":"/reference/load_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Metadata — load_metadata","title":"Load Metadata — load_metadata","text":"load_metadata() loads metadata file given path directory.","code":""},{"path":"/reference/load_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Metadata — load_metadata","text":"","code":"load_metadata(directory = here::here(), inform_success = FALSE)"},{"path":"/reference/load_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Metadata — load_metadata","text":"directory directory metadata file found - .e. data package. Defaults current project directory. inform_success Boolean indicating whether display message metadata successfully loaded.","code":""},{"path":"/reference/load_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Metadata — load_metadata","text":"R-object formatted EML metadata.","code":""},{"path":"/reference/load_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load Metadata — load_metadata","text":"Given path directory - default working directory - load_metadata() looks files ending *_metadata.xml. function quits error tells user files found one file found. one metadata file found, checked one 3 formats: FGDC, ISO, EML. Currently EML supported function fail error, inform user, quit non-EML metadata found. EML metadata file loaded R's work space future use congruence checking. context National Park Service data packages, function can slightly easier use loading metadata R EML::read_eml() require filename type specified.","code":""},{"path":"/reference/load_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Metadata — load_metadata","text":"","code":"data_pkg_dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. my_metadata <- load_metadata(data_pkg_dir)"},{"path":"/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. QCkit convert_datetime_format","code":""},{"path":"/reference/run_congruence_checks.html","id":null,"dir":"Reference","previous_headings":"","what":"Run all congruence checks — run_congruence_checks","title":"Run all congruence checks — run_congruence_checks","text":"Run congruence checks","code":""},{"path":"/reference/run_congruence_checks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run all congruence checks — run_congruence_checks","text":"","code":"run_congruence_checks( directory = here::here(), metadata = load_metadata(directory), check_metadata_only = FALSE, skip_cols = NA, output_filename, output_dir = here::here() )"},{"path":"/reference/run_congruence_checks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run all congruence checks — run_congruence_checks","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. check_metadata_only run checks metadata skip anything involving data files. skip_cols String. Defaults NA. list one columns data skip testing whether dates within data fall within dates range specified metadata. Useful , instance, columns within data associated QA/QC process dates expected fall outside date range specified data. output_filename Optional. specified, saves results congruence checks file. omitted, prints results console. file already exists, results appended existing file. output_dir Location save output file, using.","code":""},{"path":"/reference/run_congruence_checks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run all congruence checks — run_congruence_checks","text":"Invisibly returns metadata.","code":""},{"path":"/reference/run_congruence_checks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run all congruence checks — run_congruence_checks","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. run_congruence_checks(dir) #> #> ── Running all congruence checks ─────────────────────────────────────────────── #> #> ── Reading metadata ── #> #> ── Checking metadata compliance ── #> #> ✔ Your metadata is schema valid. #> ✔ Each data file name is used exactly once in the metadata file. #> ✔ Your EML version is supported. #> ✔ Metadata indicates that each data file contains a field delimiter that is a #> single character #> ✔ Metadata indicates that each data file contains exactly one header row. #> ✔ Metadata indicates data files do not have footers. #> ✔ Metadata contains taxonomic coverage element. #> ✔ Metadata contains geographic coverage element #> ✔ Metadata contains a digital object identifier, \"doi: #> https://doi.org/10.57830/2295086\". #> ✔ Metadata Digital Object Identifier appears to be properly formatted. #> ✔ Metadata contains URLs for all data tables. #> ✔ Data table URLs are properly formmatted and correspond to the specified DOI. #> ✔ Metadata contains publisher element. #> ✔ Field names begin with a letter and do not contain spaces or special #> characters. #> ✔ File names begin with a letter and do not contain spaces or special #> characters. #> ✔ Metadata does not appear to contain any personal emails. #> #> ── Checking that metadata contains required elements for DataStore extraction ── #> #> ✔ Any individual Creators in metadata have a surNames with less than three #> words. #> ! Publication date, 2022, predates the Data Package Reference Type. #> ✔ Data package title is present in metadata. #> ✔ Metadata contains keyword(s). #> ✔ Metadata states data was created by or for NPS. #> ✔ Metadata indicates the publisher is the National Park Service. #> ✔ Metadata indicates the publisher state is CO. #> ✔ Metadata indicates the publisher city is Fort Collins. #> ! The data package abstract contains non-standard characters: . Use #> `EMLeditor::set_abstract()` to revise. #> ! The metadata methods contains non-standard characters such as \\r or #> . Use `EMLeditor::set_methods()` to revise. #> ✔ All dataTables listed in metadata have a unique file description. #> ! Data file 3 description is greater than 15 words. Consider a more concise #> description. #> ✖ The CUI dissemination code PUBVER is not a valid code. Use #> `EMLeditor::set_cui()`. #> ✖ Metadata does not contain a license name. Use `EMLeditor::set_int_rights()` #> to add a license name. #> ✔ Metadata contains an Intellectual Rights statement. #> ✔ All attributes listed in metadata have attribute definitions. #> ✔ All attributes listed in metadata have a storage type associated with them. #> ✔ All attribute storage types are valid values. #> #> ── Checking additional/optional metadata elements ── #> #> ✔ All individual creators have associated ORCiDs. #> ✔ All Creator ORCiDs are properly formatted. #> ✔ All Creator ORCiDs resolved to a valid ORCiD profile. #> ✔ All Creator ORCiDs resolve to an ORCiD profile that matches the Creator last #> name. #> ! Metadata does not contain additionalInfo (notes). Use #> `EMLeditor::set_additional_info()` to add notes. #> ! No project associated with the metadata. To add a DataStore project, use #> `EMLeditor::set_project()`. #> #> ── Checking that metadata is consistent with data file(s) ── #> #> ✔ All data files are listed in metadata and all metadata files names refer to #> data files. #> ✔ All columns in data match all columns in metadata. #> ✖ Undocumented missing data detected. Please document all missing data in #> metadata: #> ---> Mini_BICY_Veg_Intercept_Cleaned.csv contains missing data without a #> corresponding missing data code in metadata. #> ---> Mini_BICY_Veg_Transect_Cleaned.csv contains missing data without a #> corresponding missing data code in metadata. #> ✔ Columns indicated as numeric in metadata contain only numeric values and #> valid missing value codes. #> ✔ Metadata and data date formatting is in congruence. #> ✔ Columns indicated as date/time in metadata are within the stated temporal #> coverage range. #> #> ── Checking data and metadata compliance ── #> #> ✔ Data files do not appear to contain any personal emails. #> ! CUI is not set to PUBLIC. GPS coordinates detected in metadata will be #> publicly available. Are you sure? #> #> ── Summary ── #> #> ✖ 3 errors to address #> ! 7 warnings to look into"},{"path":"/reference/test_attribute_defs.html","id":null,"dir":"Reference","previous_headings":"","what":"Test metadata for attribute definitions — test_attribute_defs","title":"Test metadata for attribute definitions — test_attribute_defs","text":"test_attribute_defs() extracts attributeNames attributeDefinitions EML metadata. tests make sure number attributeNames attributeDefinitions. true, test passes. , fails error. test looks metadata, look data files. Passing test mean data columns attributes metadata associated . test , see test_fields_match().","code":""},{"path":"/reference/test_attribute_defs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test metadata for attribute definitions — test_attribute_defs","text":"","code":"test_attribute_defs(metadata = load_metadata(directory))"},{"path":"/reference/test_attribute_defs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test metadata for attribute definitions — test_attribute_defs","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_attribute_defs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test metadata for attribute definitions — test_attribute_defs","text":"invisibly returns metadata","code":""},{"path":"/reference/test_attribute_defs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test metadata for attribute definitions — test_attribute_defs","text":"","code":"if (FALSE) { # \\dontrun{ test_attribute_defs() } # }"},{"path":"/reference/test_by_for_nps.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for ","title":"Test for ","text":"Test \"NPS\"","code":""},{"path":"/reference/test_by_for_nps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for ","text":"","code":"test_by_for_nps(metadata = load_metadata(directory))"},{"path":"/reference/test_by_for_nps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for ","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_by_for_nps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for ","text":"invisibly returns metadata","code":""},{"path":"/reference/test_by_for_nps.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test for ","text":"test_by_for_nps() test presence \"NPS\" field. test fails error information missing metadata. test fails warning metadata indicate data created NPS (expected relatively rare). Otherwise test passes.","code":""},{"path":"/reference/test_by_for_nps.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for ","text":"","code":"if (FALSE) { # \\dontrun{ test_by_for_nps() } # }"},{"path":"/reference/test_creator.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of creator and surName — test_creator","title":"Test for presence of creator and surName — test_creator","text":"test_creator() examines Creator element metadata. creator element missing, test fails error. creator element present, function looks individual creators. individual creators present lacks surName, test fails error. individual creators surName two words, test fails warning. Otherwise, test passes.","code":""},{"path":"/reference/test_creator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of creator and surName — test_creator","text":"","code":"test_creator(metadata = load_metadata(directory))"},{"path":"/reference/test_creator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of creator and surName — test_creator","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_creator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of creator and surName — test_creator","text":"invisible(metadata)","code":""},{"path":"/reference/test_creator.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of creator and surName — test_creator","text":"","code":"if (FALSE) { # \\dontrun{ test_creator() } # }"},{"path":"/reference/test_cui_dissemination.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for CUI dissemination code — test_cui_dissemination","title":"Test for CUI dissemination code — test_cui_dissemination","text":"test_cui_dissemination() examines EML metadata presence Controlled Unclassified Information (CUI) dissemination code. function fails error code exist match list valid codes. valid code \"PUBLIC\" test produce warning. valid code results pass.","code":""},{"path":"/reference/test_cui_dissemination.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for CUI dissemination code — test_cui_dissemination","text":"","code":"test_cui_dissemination(metadata = load_metadata(directory))"},{"path":"/reference/test_cui_dissemination.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for CUI dissemination code — test_cui_dissemination","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_cui_dissemination.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for CUI dissemination code — test_cui_dissemination","text":"invisibly returns metadata","code":""},{"path":"/reference/test_cui_dissemination.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for CUI dissemination code — test_cui_dissemination","text":"","code":"if (FALSE) { # \\dontrun{ test_cui_dissemination() } # }"},{"path":"/reference/test_datatable_urls.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks for consistency in data file URLs — test_datatable_urls","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"test_datatable_urls Checks make sure URLs listed data files correctly correspond DOI metadata. last 7 digits URL data tables identical last 7 digits DOI, test passes. DOI, test fails warning. data table lacks URL, test fails error. data table URL's last 7 digits identical DOI's last 7 digits, test fails error.","code":""},{"path":"/reference/test_datatable_urls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"","code":"test_datatable_urls(metadata = load_metadata(directory))"},{"path":"/reference/test_datatable_urls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_datatable_urls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"invisible(metadata)","code":""},{"path":"/reference/test_datatable_urls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"suggestions functions use correct errors/warnings provided.","code":""},{"path":"/reference/test_datatable_urls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"","code":"if (FALSE) { # \\dontrun{ dir <- DPchecker_example(\"BICY_veg\") test_datatable_urls(dir) } # }"},{"path":"/reference/test_datatable_urls_doi.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"test_datatable_urls_doi() passes data tables URLs properly formatted (.e. \"https://irma.nps.gov/DataStore/Reference/Profile/xxxxxxx\") \"xxxxxx\" identical DOI specified metadata. Fails warning DOI specified metadata. DOI specified metadata, data table URL properly coincide url landing page doi points one table, test fails warning (indicates table failed). data table urls exist, fails error indicates add .","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"","code":"test_datatable_urls_doi(metadata = load_metadata(directory))"},{"path":"/reference/test_datatable_urls_doi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"invisible(metadata)","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"","code":"if (FALSE) { # \\dontrun{ dir <- DPchecker_example(\"BICY_veg\") test_datatable_urls_doi(dir) } # }"},{"path":"/reference/test_dates_parse.html","id":null,"dir":"Reference","previous_headings":"","what":"Test data and metadata data formats match — test_dates_parse","title":"Test data and metadata data formats match — test_dates_parse","text":"test_dates_parse() examine data columns described containing dates times. Although can handle multiple different formats, ISO-8601 format dates times HIHGLY recommended (ISO YYYY-MM-DDThh:mm:ss just YYYY-MM-DD). function compare format provided data files format indicated metadata. dates indicated metadata, test fails warning. dates formats match, test passes. formats match, test fails error. specific files columns failed indicated results.","code":""},{"path":"/reference/test_dates_parse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test data and metadata data formats match — test_dates_parse","text":"","code":"test_dates_parse(directory = here::here(), metadata = load_metadata(directory))"},{"path":"/reference/test_dates_parse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test data and metadata data formats match — test_dates_parse","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dates_parse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test data and metadata data formats match — test_dates_parse","text":"Invisibly returns metadata","code":""},{"path":"/reference/test_dates_parse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test data and metadata data formats match — test_dates_parse","text":"test_dates_parse() examine EVERY cell column dates hits date format match format specified metadata. large datasets, process can take minute two. even one typo data file, cause function throw error. Frequent source error include viewing dates Excel, can deceptive, typos, changes date format time changing personnel.","code":""},{"path":"/reference/test_dates_parse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test data and metadata data formats match — test_dates_parse","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_dates_parse(dir) #> ✔ Metadata and data date formatting is in congruence."},{"path":"/reference/test_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Date Range — test_date_range","title":"Test Date Range — test_date_range","text":"test_date_range() verifies dates dataset consistent date range metadata. HIGHLY recommended provide dates times ISO-8601 formatting: YYYY-MM-DDThh:mm:ss (time can us just YYYY-MM-DD component).","code":""},{"path":"/reference/test_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Date Range — test_date_range","text":"","code":"test_date_range( directory = here::here(), metadata = load_metadata(directory), skip_cols = NA )"},{"path":"/reference/test_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Date Range — test_date_range","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. skip_cols String. Defaults NA. One columns omit test_date_range function.","code":""},{"path":"/reference/test_date_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Date Range — test_date_range","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_date_range.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Date Range — test_date_range","text":"function checks columns identified date/time metadata. metadata lacks date range, function fails warning. fails error dates contained columns outside temporal coverage specified metadata. date/time format string specified metadata match actual format date CSV, likely fail parse result failing test error. Failure parse indicated results text \"(failed parse)\". test also inform user file columns causing test fail failing (.e. outside date range failed parse). date columns causing test fail associated QA/QC process expected fall outside date range specified data, columns can omitted test using skip_cols.","code":""},{"path":"/reference/test_date_range.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Date Range — test_date_range","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_date_range(dir) #> ✔ Columns indicated as date/time in metadata are within the stated temporal #> coverage range."},{"path":"/reference/test_delimiter.html","id":null,"dir":"Reference","previous_headings":"","what":"Field Delimiter Check — test_delimiter","title":"Field Delimiter Check — test_delimiter","text":"test_delimiter() checks metadata file ensures data file field delimiter exactly one character (e.g. \", \").","code":""},{"path":"/reference/test_delimiter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Field Delimiter Check — test_delimiter","text":"","code":"test_delimiter(metadata = load_metadata(here::here()))"},{"path":"/reference/test_delimiter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Field Delimiter Check — test_delimiter","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_delimiter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Field Delimiter Check — test_delimiter","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_delimiter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Field Delimiter Check — test_delimiter","text":"test_delimiter() examines fieldDelimiter element EML (currently EML supported) metadata determine many characters . fieldDelimiter element, test returns error. field delimiter anything exactly one character length, test returns error.","code":""},{"path":"/reference/test_delimiter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Field Delimiter Check — test_delimiter","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_delimiter(meta) #> ✔ Metadata indicates that each data file contains a field delimiter that is a #> single character"},{"path":"/reference/test_doi.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for presence of a Digital Object Identifier — test_doi","title":"Check for presence of a Digital Object Identifier — test_doi","text":"test_doi() checks whether DOI data package present metadata. currently validate DOI. DOI present, test passes. DOI present, test fails warning.","code":""},{"path":"/reference/test_doi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for presence of a Digital Object Identifier — test_doi","text":"","code":"test_doi(metadata = load_metadata(directory))"},{"path":"/reference/test_doi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for presence of a Digital Object Identifier — test_doi","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_doi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for presence of a Digital Object Identifier — test_doi","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_doi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for presence of a Digital Object Identifier — test_doi","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_doi(meta) #> ✔ Metadata contains a digital object identifier, \"doi: #> https://doi.org/10.57830/2295086\"."},{"path":"/reference/test_doi_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Check DOI formatting — test_doi_format","title":"Check DOI formatting — test_doi_format","text":"test_doi_format() runs basic formatting checks. DOI absent, test fail error. DOI exactly 37 characters contain \"doi: https://doi.org/10.57830/\" test fail error. test passes entry alternateIdentifier field exactly 37 characters long contains \"doi: https://doi.org/10.57830/\". Please note cursory formatting check; check make sure DOI active (probably stage data package authoring). check make sure correct correctly corresponds anything DataStore elsewhere within metadata.","code":""},{"path":"/reference/test_doi_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check DOI formatting — test_doi_format","text":"","code":"test_doi_format(metadata = load_metadata(directory))"},{"path":"/reference/test_doi_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check DOI formatting — test_doi_format","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_doi_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check DOI formatting — test_doi_format","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_doi_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check DOI formatting — test_doi_format","text":"","code":"if (FALSE) { # \\dontrun{ meta <- test_doi_format(metadata) } # }"},{"path":"/reference/test_dp_abstract.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML abstract — test_dp_abstract","title":"Test EML abstract — test_dp_abstract","text":"test_dp_abstract() inspects EML presence data package abstract. test Fails error abstract absent. abstract present, test fails warning abstract <20 words, >250 words, contains subset common characters indicate improper formatting. Otherwise test passes.","code":""},{"path":"/reference/test_dp_abstract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML abstract — test_dp_abstract","text":"","code":"test_dp_abstract(metadata = load_metadata(directory))"},{"path":"/reference/test_dp_abstract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML abstract — test_dp_abstract","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dp_abstract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML abstract — test_dp_abstract","text":"invisibly returns metadata","code":""},{"path":"/reference/test_dp_abstract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML abstract — test_dp_abstract","text":"","code":"if (FALSE) { # \\dontrun{ test_dp_abstract() } # }"},{"path":"/reference/test_dp_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Test data package title — test_dp_title","title":"Test data package title — test_dp_title","text":"test_dp_title() tests EML metadata presence data package title. test fails error title absent. test fails warning title > 20 < 5 words. Otherwise, test passes.","code":""},{"path":"/reference/test_dp_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test data package title — test_dp_title","text":"","code":"test_dp_title(metadata = load_metadata(directory))"},{"path":"/reference/test_dp_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test data package title — test_dp_title","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dp_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test data package title — test_dp_title","text":"invisibly returns metadata","code":""},{"path":"/reference/test_dp_title.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test data package title — test_dp_title","text":"","code":"if (FALSE) { # \\dontrun{ test_dp_title() } # }"},{"path":"/reference/test_dup_meta_entries.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"test_dup_meta_entries() tests see whether duplicate filenames listed data files (EML) metadata.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"","code":"test_dup_meta_entries(metadata = load_metadata(here::here()))"},{"path":"/reference/test_dup_meta_entries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"specifically, test_dup_meta_entries() looks 'physical' elements metadata file, describe data file, asks whether duplicates entries objectName child element, file name data file stored. Duplicate entries result test failing error.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_dup_meta_entries(meta) #> ✔ Each data file name is used exactly once in the metadata file."},{"path":"/reference/test_fields_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Matching Data/Metadata Fields — test_fields_match","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"test_fields_match() compares attributes dataTable within EML metadata columns corresponding .csv. columns names order, test passes. columns differ, test fails error.","code":""},{"path":"/reference/test_fields_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"","code":"test_fields_match( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_fields_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_fields_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_fields_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"test_fields_match briefly checks data files match, really run test_file_name_match() run test.","code":""},{"path":"/reference/test_fields_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_fields_match(dir) #> ✔ All columns in data match all columns in metadata."},{"path":"/reference/test_file_descript.html","id":null,"dir":"Reference","previous_headings":"","what":"Test presence of file descriptions — test_file_descript","title":"Test presence of file descriptions — test_file_descript","text":"test_file_descript() tests presence file descriptions (entityDescription) fields. fails error one entityDescription fields empty dataTable. fails error two file descriptions identical. test fails warning file description longer 15 words shorter three words. Otherwise test passes.","code":""},{"path":"/reference/test_file_descript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test presence of file descriptions — test_file_descript","text":"","code":"test_file_descript(metadata = load_metadata(directory))"},{"path":"/reference/test_file_descript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test presence of file descriptions — test_file_descript","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_file_descript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test presence of file descriptions — test_file_descript","text":"invisibly returns metadata","code":""},{"path":"/reference/test_file_descript.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test presence of file descriptions — test_file_descript","text":"","code":"if (FALSE) { # \\dontrun{ test_file_descript() } # }"},{"path":"/reference/test_file_name_match.html","id":null,"dir":"Reference","previous_headings":"","what":"File Name Match — test_file_name_match","title":"File Name Match — test_file_name_match","text":"test_file_name_match() checks see whether data files (.csv) within specified directory listed objectName (child physical) element EML metadata file directory, vice versa. Mismatches result test failing error message.","code":""},{"path":"/reference/test_file_name_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"File Name Match — test_file_name_match","text":"","code":"test_file_name_match( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_file_name_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"File Name Match — test_file_name_match","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_file_name_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"File Name Match — test_file_name_match","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_file_name_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"File Name Match — test_file_name_match","text":"directory current working directory specified, test.file_name_match() returns current working directory exit. Note metadata file must follow NPS naming conventions, specifically ending *_metadata.xml. test.file_name_match() assumes number data files directory dataTables metadata file.","code":""},{"path":"/reference/test_file_name_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"File Name Match — test_file_name_match","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_file_name_match(dir) #> ✔ All data files are listed in metadata and all metadata files names refer to #> data files."},{"path":"/reference/test_footer.html","id":null,"dir":"Reference","previous_headings":"","what":"Footer Check — test_footer","title":"Footer Check — test_footer","text":"test_footer() checks metadata files determine whether data files contain footer lines .","code":""},{"path":"/reference/test_footer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Footer Check — test_footer","text":"","code":"test_footer(metadata = load_metadata(here::here()))"},{"path":"/reference/test_footer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Footer Check — test_footer","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_footer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Footer Check — test_footer","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_footer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Footer Check — test_footer","text":"footer lines present, data package passes test. footer lines present, data package fails test error user instructed remove footer lines prior data package upload. Currently EML metadata supported.","code":""},{"path":"/reference/test_footer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Footer Check — test_footer","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_footer(meta) #> ✔ Metadata indicates data files do not have footers."},{"path":"/reference/test_geographic_cov.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Geographic Coverage — test_geographic_cov","title":"Check for Geographic Coverage — test_geographic_cov","text":"test_geographic_cov() checks geographic coverage element present metadata. perform validation geographic coverage information. geographicCoverage element present, test passes. absent, test fails warning.","code":""},{"path":"/reference/test_geographic_cov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Geographic Coverage — test_geographic_cov","text":"","code":"test_geographic_cov(metadata = load_metadata(directory))"},{"path":"/reference/test_geographic_cov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Geographic Coverage — test_geographic_cov","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_geographic_cov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Geographic Coverage — test_geographic_cov","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_geographic_cov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Geographic Coverage — test_geographic_cov","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_geographic_cov(meta) #> ✔ Metadata contains geographic coverage element"},{"path":"/reference/test_header_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Header Check — test_header_num","title":"Header Check — test_header_num","text":"test_header_num() checks metadata files ensure data file contains exactly one header row.","code":""},{"path":"/reference/test_header_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Header Check — test_header_num","text":"","code":"test_header_num(metadata = load_metadata(here::here()))"},{"path":"/reference/test_header_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Header Check — test_header_num","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_header_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Header Check — test_header_num","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_header_num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Header Check — test_header_num","text":"test_header_num() examines numHeaderLines element EML (currently EML supported) metadata determine many header rows . header rows one header row, test fails error. test also fails error information number header rows.","code":""},{"path":"/reference/test_header_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Header Check — test_header_num","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_header_num(meta) #> ✔ Metadata indicates that each data file contains exactly one header row."},{"path":"/reference/test_int_rights.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of Intellectual Rights — test_int_rights","title":"Test for presence of Intellectual Rights — test_int_rights","text":"test_int_rights() tests presence text within intellectualRights element EML formatted metadata. text present, test passes. Otherwise, test fails. test_int_rights() makes attempt parse text test whether properly coincides CUI dissemination codes licenseName metadata. simple presence/absence test.","code":""},{"path":"/reference/test_int_rights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of Intellectual Rights — test_int_rights","text":"","code":"test_int_rights(metadata = load_metadata(directory))"},{"path":"/reference/test_int_rights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of Intellectual Rights — test_int_rights","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_int_rights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of Intellectual Rights — test_int_rights","text":"invisibly returns metadata","code":""},{"path":"/reference/test_int_rights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of Intellectual Rights — test_int_rights","text":"","code":"if (FALSE) { # \\dontrun{ test_int_rights() } # }"},{"path":"/reference/test_keywords.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for Keywords — test_keywords","title":"Test for Keywords — test_keywords","text":"test_keywords() tests see whether metadata contains least one \"Keywords Set\".","code":""},{"path":"/reference/test_keywords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for Keywords — test_keywords","text":"","code":"test_keywords(metadata = load_metadata(directory))"},{"path":"/reference/test_keywords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for Keywords — test_keywords","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_keywords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for Keywords — test_keywords","text":"invisilbe(meatadatda)","code":""},{"path":"/reference/test_keywords.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for Keywords — test_keywords","text":"","code":"if (FALSE) { # \\dontrun{ test_keywords() } # }"},{"path":"/reference/test_license.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of a license name — test_license","title":"Test for presence of a license name — test_license","text":"test_license() examines licenseName element EML metadata. license name, test fails ab error. license name match list valid license names, test fails. metadata contain valid license name, license name CUI dissemination code agree, test fails error. Otherwise, test passes. Additionally, license name \"Public Domain\" \"CC0 1.0 Universal\", function produce warning data package public.","code":""},{"path":"/reference/test_license.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of a license name — test_license","text":"","code":"test_license(metadata = load_metadata(directory))"},{"path":"/reference/test_license.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of a license name — test_license","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_license.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of a license name — test_license","text":"invisibly returns metadata","code":""},{"path":"/reference/test_license.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of a license name — test_license","text":"","code":"if (FALSE) { # \\dontrun{ test_license() } # }"},{"path":"/reference/test_metadata_version.html","id":null,"dir":"Reference","previous_headings":"","what":"EML Version Check — test_metadata_version","title":"EML Version Check — test_metadata_version","text":"test_metadata_version() determines whether version metadata supplied meets current criteria NPS data package.","code":""},{"path":"/reference/test_metadata_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"EML Version Check — test_metadata_version","text":"","code":"test_metadata_version(metadata = load_metadata(here::here()))"},{"path":"/reference/test_metadata_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"EML Version Check — test_metadata_version","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_metadata_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"EML Version Check — test_metadata_version","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_metadata_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"EML Version Check — test_metadata_version","text":"currently EML supported. EML must version >= 2.2.0.","code":""},{"path":"/reference/test_metadata_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"EML Version Check — test_metadata_version","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_metadata_version(meta) #> ✔ Your EML version is supported."},{"path":"/reference/test_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Examines the Methods section of EML — test_methods","title":"Examines the Methods section of EML — test_methods","text":"test_methods() first extracts methods EML object. methods present, test fails error. methods present, tests asks 1) section longer 20 words? , test fails warning. 2) methods section contain unconventional characters
? , test fails warning. 2) methods section contain additional spaces (two consecuitive spaces)? , test fails warning. tests pass, test whole passes. error warning, users advised use EMLeditor::set_methods() correct problem.","code":""},{"path":"/reference/test_methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Examines the Methods section of EML — test_methods","text":"","code":"test_methods(metadata = load_metadata(directory))"},{"path":"/reference/test_methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Examines the Methods section of EML — test_methods","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_methods.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Examines the Methods section of EML — test_methods","text":"invisible(metadata)","code":""},{"path":"/reference/test_methods.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Examines the Methods section of EML — test_methods","text":"","code":"if (FALSE) { # \\dontrun{ test_methods() } # }"},{"path":"/reference/test_missing_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Looks for undocumented missing data (NAs) — test_missing_data","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"test_missing_data scans data package common missing data (blanks/empty cells NA cell). blanks NAs, test passes. missing data found properly documented (missingValueCode either \"NA\", \"empty\", \"blank\"), test passes. missing data detected properly documented metadata, test fails error. Commonly, R interpret blank cells missing fill NA. pass test, need either delete columns tables missing data (completely blank), add appropriate missing data code metadata creation (corresponding attributes.txt file). fairly simple test checks NA blanks. Although many common missing data codes (-99999, \"Missing\", \"NaN\" etc) anticipate . running test_missing_data() via run_congruence_checks(), default \"detail_level\" used file-level information undocumented missing values reported condense error message output. attempting identify specifically data undocumented missing values, may helpful run test_missing_data() parameter \"detail_level\" set \"columns\". output list columns within file undocumented missing data. important document missing data? user wants use data missing without explanation acknowledgement, user trust data data package complete.","code":""},{"path":"/reference/test_missing_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"","code":"test_missing_data( directory = here::here(), metadata = load_metadata(directory), detail_level = \"files\" )"},{"path":"/reference/test_missing_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. detail_level String. Choose either \"files\" \"columns\". Defaults \"files\".","code":""},{"path":"/reference/test_missing_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_missing_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"","code":"if (FALSE) { # \\dontrun{ test_missing_data(directory = here::here(), metadata = load_metadata(directory)) test_missing_data(directory = here::here(), metadata = load_metadata(directory), detail_level = \"columns\") } # }"},{"path":"/reference/test_notes.html","id":null,"dir":"Reference","previous_headings":"","what":"Examines the additionalInfo elment of EML metadata — test_notes","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"test_notes() extracts additionalInfo components EML metadata. elements used populate \"Notes\" section DataStore landing page. Notes section blank, test fails warning. notes section contains non-standard characters (
) two consecutive spaces, test fails warning. Otherwise test passes. warnings, user advised use EMLeditor::set_additional_info() fix additionalInfo section.","code":""},{"path":"/reference/test_notes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"","code":"test_notes(metadata = load_metadata(directory))"},{"path":"/reference/test_notes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_notes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"invisible(metadata)","code":""},{"path":"/reference/test_notes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"","code":"if (FALSE) { # \\dontrun{ test_notes() } # }"},{"path":"/reference/test_numeric_fields.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Numeric Fields — test_numeric_fields","title":"Test Numeric Fields — test_numeric_fields","text":"test_numeric_fields() verifies columns listed numeric metadata free non-numeric data. non-numeric data encountered, test fails error.","code":""},{"path":"/reference/test_numeric_fields.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Numeric Fields — test_numeric_fields","text":"","code":"test_numeric_fields( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_numeric_fields.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Numeric Fields — test_numeric_fields","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_numeric_fields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Numeric Fields — test_numeric_fields","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_numeric_fields.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Numeric Fields — test_numeric_fields","text":"\"NA\" missing data codes documented metadata cause test fail. Note test assumes column types metadata intended types, .e., metadata says column text actually numeric, caught test. hand, metadata indicates text column numeric, function generate error.","code":""},{"path":"/reference/test_numeric_fields.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Numeric Fields — test_numeric_fields","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_numeric_fields(dir) #> ✔ Columns indicated as numeric in metadata contain only numeric values and #> valid missing value codes."},{"path":"/reference/test_orcid_exists.html","id":null,"dir":"Reference","previous_headings":"","what":"Test creators for presence of an ORCiD — test_orcid_exists","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"test_orcid_exists() inspect metadata test creator listed individual person (individualName) creators organizations presence ORCiD. ORCiD found individual creators, test passes. individual creator lacks ORCiD, test fails warning users pointed towards EMLeditor::set_creator_orcids() add ORCiDs choose.","code":""},{"path":"/reference/test_orcid_exists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"","code":"test_orcid_exists(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_exists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_exists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_exists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_exists() } # }"},{"path":"/reference/test_orcid_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for ORCiD formatting (and presence) — test_orcid_format","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"test_orcid_format() inspects metadata looks ORCiDs individual creator (organizations listed creators). individuals correctly formatted ORCiDs (.e 37-character string \"https://orcid.org/xxxx-xxxx-xxxx-xxxx\"), test passes. simple test just looks string length, content. individual improperly formatted ORCiD, test fails error. improperly formatted ORCiDs one ORCiDs missing, test fails warning. Note improperly formatted ORCiDs, test inspect presence/absence individual ORCiDs. full accounting () ORCiDs missing (formatting check), use test_orcid_exists.","code":""},{"path":"/reference/test_orcid_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"","code":"test_orcid_format(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_format() } # }"},{"path":"/reference/test_orcid_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"test_orcid_match() evaluate Creators individuals (organizations). ORCiD supplied, function attempt access indicated ORCiD profile test whether last name indicated ORCiD profile matches surName indicated Metadata. surNames match ORCiD profiles, test passes. surName match indicated ORCID profile, test fails error.","code":""},{"path":"/reference/test_orcid_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"","code":"test_orcid_match(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"Potential reasons failing test include entered wrong ORCiD metadata, improperly formatted ORCiD metadata (listed https://orcid.org/xxxx-xxxx-xxxx-xxxx - see test_orcid_format()), set ORCiD profile \"private\" (case function access name associated profile) differences ORCiD profile name name metadata (maiden vs. married name, transposing given surnames, variation surName spelling).","code":""},{"path":"/reference/test_orcid_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_match() } # }"},{"path":"/reference/test_orcid_resolves.html","id":null,"dir":"Reference","previous_headings":"","what":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"test_orcid_resolves() examine ORCiDs supplied individual Creators (organizations). ORCiD supplied consists URL leads valid ORCiD profile, test passes. ORCiD supplied URL resolves valid ORCiD profile - either ORCiD exist ORCiD supplied incorrect format, test fails error. test examine Creators associated ORCiDs; ORCiDs provided test return pass fail.","code":""},{"path":"/reference/test_orcid_resolves.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"","code":"test_orcid_resolves(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_resolves.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_resolves.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_resolves.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_resolves() } # }"},{"path":"/reference/test_pii_data_emails.html","id":null,"dir":"Reference","previous_headings":"","what":"Check data files for PII (emails) — test_pii_data_emails","title":"Check data files for PII (emails) — test_pii_data_emails","text":"test_pii_data_emails() tool help identify emails data files (.csv) may constitute Personally Identifiable Information (PII). tool guaranteed find emails, can definitely tell whether email constitutes PII . test_pii_data_emails() reads .csv file specified directory. uses regular expressions extract emails (truth, hard test regex possible emails chance miss one ). emails end anything .gov, function fails warning lists offending files emails contain. emails data files emails data files end .gov, assumed public emails function passes without listing emails.","code":""},{"path":"/reference/test_pii_data_emails.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check data files for PII (emails) — test_pii_data_emails","text":"","code":"test_pii_data_emails(directory = here::here())"},{"path":"/reference/test_pii_data_emails.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check data files for PII (emails) — test_pii_data_emails","text":"directory String. directory data package resides. Defaults current working directory.","code":""},{"path":"/reference/test_pii_data_emails.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check data files for PII (emails) — test_pii_data_emails","text":"String","code":""},{"path":"/reference/test_pii_data_emails.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check data files for PII (emails) — test_pii_data_emails","text":"","code":"if (FALSE) { # \\dontrun{ test_pii_data_emails() } # }"},{"path":"/reference/test_pii_meta_emails.html","id":null,"dir":"Reference","previous_headings":"","what":"Check metadata for PII (emails) — test_pii_meta_emails","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"test_pii_meta_emails() tool help identify emails metadata may constitute Personally Identifiable Information (PII). tool guaranteed find emails, can definitely tell whether email constitutes PII . test_pii_meta_emails() reads *_metadata.xml file specified directory. uses regular expressions extract emails (truth, hard test regex possible emails chance miss one ). emails metadata, function fails warning (probably email contact somewhere metadata). emails end anything .gov, function fails warning lists offending emails. emails metadata end .gov, assumed public emails function passes without listing emails.","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"","code":"test_pii_meta_emails(directory = here::here())"},{"path":"/reference/test_pii_meta_emails.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"directory String. directory metadata file resides. Defaults current working directory.","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"invisible(metadata)","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"","code":"if (FALSE) { # \\dontrun{ test_pii_meta_emails() } # }"},{"path":"/reference/test_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for a DataStore project — test_project","title":"Test for a DataStore project — test_project","text":"Test DataStore project","code":""},{"path":"/reference/test_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for a DataStore project — test_project","text":"","code":"test_project(metadata = load_metadata(directory))"},{"path":"/reference/test_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for a DataStore project — test_project","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for a DataStore project — test_project","text":"invisible(metadata)","code":""},{"path":"/reference/test_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for a DataStore project — test_project","text":"","code":"if (FALSE) { # \\dontrun{ test_project() } # }"},{"path":"/reference/test_public_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for public GPS point coordinates — test_public_points","title":"Test for public GPS point coordinates — test_public_points","text":"test_public_points() look GPS point coordinates metadata, data package public warn users potentially publishing confidential unclassified information (CUI). Specifically, GPS points identified, function passes. CUI dissemination code set \"PUBLIC\" GPS points identified, function passes. CUI dissemination code set \"PUBLIC\" GPS points identified, function fail warning. CUI dissemination code detected, function fails error.","code":""},{"path":"/reference/test_public_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for public GPS point coordinates — test_public_points","text":"","code":"test_public_points(metadata = load_metadata(directory))"},{"path":"/reference/test_public_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for public GPS point coordinates — test_public_points","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_public_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for public GPS point coordinates — test_public_points","text":"invisible(metadata)","code":""},{"path":"/reference/test_public_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test for public GPS point coordinates — test_public_points","text":"contents metadata public even data restricted. means GPS coordinates (common type data must redacted fuzzed can made public) exist metadata, GPS coordinates publicly available. function warn people potentiality. function flag GPS points (bounding boxes polygons shapes). function checks GPS points geographicCoverage element.","code":""},{"path":"/reference/test_public_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for public GPS point coordinates — test_public_points","text":"","code":"if (FALSE) { # \\dontrun{ test_public_points() } # }"},{"path":"/reference/test_publisher.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Publisher — test_publisher","title":"Check for Publisher — test_publisher","text":"test_publisher() checks publisher information present metadata, option require valid NPS publisher information. publisher information present, test passes. publisher information absent, test fails error. require_nps set TRUE (defaults FALSE), test also ensure valid NPS publisher information present. case, even publisher element present, test fail error unless publisher NPS (publisher fields exactly match expected information NPS data packages).","code":""},{"path":"/reference/test_publisher.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Publisher — test_publisher","text":"","code":"test_publisher(metadata = load_metadata(directory), require_nps = FALSE)"},{"path":"/reference/test_publisher.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Publisher — test_publisher","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. require_nps TRUE, throw error publisher information correct NPS published data.","code":""},{"path":"/reference/test_publisher.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Publisher — test_publisher","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_publisher.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Publisher — test_publisher","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_publisher(meta) #> ✔ Metadata contains publisher element."},{"path":"/reference/test_publisher_city.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML metadata for publisher city — test_publisher_city","title":"Test EML metadata for publisher city — test_publisher_city","text":"test_publisher_city() inspects publisher address EML metadata. fails error city element empty. fails warning \"Fort Collins\". test passes \"Fort Collins\"","code":""},{"path":"/reference/test_publisher_city.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML metadata for publisher city — test_publisher_city","text":"","code":"test_publisher_city(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_city.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML metadata for publisher city — test_publisher_city","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_city.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML metadata for publisher city — test_publisher_city","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_city.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML metadata for publisher city — test_publisher_city","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_city() } # }"},{"path":"/reference/test_publisher_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests EML metadata for the publisher name — test_publisher_name","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"Tests EML metadata publisher name","code":""},{"path":"/reference/test_publisher_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"","code":"test_publisher_name(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_name.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"test_publisher_name() test presence data package publisher name. fails error publisher name missing, fails warning publisher name \"National Park Service\" (expected rare). Passes test publisher name \"National Park Service\"","code":""},{"path":"/reference/test_publisher_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_name() } # }"},{"path":"/reference/test_publisher_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML metadata for publisher state — test_publisher_state","title":"Test EML metadata for publisher state — test_publisher_state","text":"test_publisher_state() inspects publisher address EML metadata. test faisl error administrativeArea (state) element empty. test fails warning \"CO\" (, expected exceedingly rare). test passes \"CO\".","code":""},{"path":"/reference/test_publisher_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML metadata for publisher state — test_publisher_state","text":"","code":"test_publisher_state(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML metadata for publisher state — test_publisher_state","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML metadata for publisher state — test_publisher_state","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML metadata for publisher state — test_publisher_state","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_state() } # }"},{"path":"/reference/test_pub_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Test publication date presence and ISO-8601 formatting — test_pub_date","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"test_pub_date() tests presence ISO-8601 formatting publication date. Also tests whether publication date within reasonable bounds; .e. date prior beginning data package Reference Type (2022) future year. publication date missing improperly formatted, test fails error. publication date outside reasonable range, test fails warning. Otherwiset test passes.","code":""},{"path":"/reference/test_pub_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"","code":"test_pub_date(metadata = load_metadata(directory))"},{"path":"/reference/test_pub_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_pub_date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"invisibly returns metadata","code":""},{"path":"/reference/test_pub_date.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"","code":"if (FALSE) { # \\dontrun{ meta <- load_metadata(DPchecker_example(\"BICY_Veg\")) test_pub_date(meta) } # }"},{"path":"/reference/test_storage_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for attribute storage type — test_storage_type","title":"Tests for attribute storage type — test_storage_type","text":"test_storage_type() checks see number attributes (attributeName) storageTypes metadata. Equal numbers elements pass; unequal numbers fail test error. test_storage_type() attempt verify number storageType elements matches number columns data package data files (functionality, use test_fields_match()). test_storage_type() also verifies storageType valid; .e. member accepted list possible storage types. Currently : string, float, date, factor, dateTime, characters. Validity test based solely observed ezEML/EAL output (theory string storageType schema-valid). Invalid storageTypes result warning. test_storage_type() attempt verify value storageType logically matches type data corresponding column.","code":""},{"path":"/reference/test_storage_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for attribute storage type — test_storage_type","text":"","code":"test_storage_type(metadata = load_metadata(directory))"},{"path":"/reference/test_storage_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for attribute storage type — test_storage_type","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_storage_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for attribute storage type — test_storage_type","text":"invisibly returns metadata","code":""},{"path":"/reference/test_storage_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests for attribute storage type — test_storage_type","text":"","code":"if (FALSE) { # \\dontrun{ test_storage_type() } # }"},{"path":"/reference/test_taxonomic_cov.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Taxonomic Coverage test — test_taxonomic_cov","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"'test_taxnomomic_cov()` checks whether taxonomic coverage element present metadata. perform validation taxonomic coverage information. taxonomic coverage present, test passes. absent, test fails warning.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"","code":"test_taxonomic_cov(metadata = load_metadata(directory))"},{"path":"/reference/test_taxonomic_cov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_taxonomic_cov(meta) #> ✔ Metadata contains taxonomic coverage element."},{"path":"/reference/test_validate_schema.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate Metadata Schema — test_validate_schema","title":"Validate Metadata Schema — test_validate_schema","text":"test_validate_schema() inspects metadata object loaded R determines whether schema-valid. test fails, functio produces error message.","code":""},{"path":"/reference/test_validate_schema.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate Metadata Schema — test_validate_schema","text":"","code":"test_validate_schema(metadata = load_metadata(here::here()))"},{"path":"/reference/test_validate_schema.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate Metadata Schema — test_validate_schema","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_validate_schema.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate Metadata Schema — test_validate_schema","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_validate_schema.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate Metadata Schema — test_validate_schema","text":"currently, EML supported. now just wrapper form EML::eml_validate().","code":""},{"path":"/reference/test_validate_schema.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate Metadata Schema — test_validate_schema","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_validate_schema(meta) #> ✔ Your metadata is schema valid."},{"path":"/reference/test_valid_fieldnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Field Names for Invalid Characters — test_valid_fieldnames","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"test_valid_fieldnames() checks field names (e.g data column names) metadata contain invalid special characters. underscores alphanumeric characters permitted, names must begin letter. invalid column names exist, test fail warning, otherwise test passes.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"","code":"test_valid_fieldnames(metadata = load_metadata(here::here()))"},{"path":"/reference/test_valid_fieldnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"run test_fields_match() run function, since function checks field names metadata.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_valid_fieldnames(meta) #> ✔ Field names begin with a letter and do not contain spaces or special #> characters."},{"path":"/reference/test_valid_filenames.html","id":null,"dir":"Reference","previous_headings":"","what":"Test File Names for Invalid Characters — test_valid_filenames","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"test_valid_filenames() checks file names metadata contain invalid special characters. underscores, hyphens, alphanumeric characters permitted, names must begin letter. Currently, invalid filenames result test failing warning, otherwise test passes.","code":""},{"path":"/reference/test_valid_filenames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"","code":"test_valid_filenames(metadata = load_metadata(here::here()))"},{"path":"/reference/test_valid_filenames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_valid_filenames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_valid_filenames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"run test_file_name_match() run function, since function checks file names metadata.","code":""},{"path":"/reference/test_valid_filenames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_valid_filenames(meta) #> ✔ File names begin with a letter and do not contain spaces or special #> characters."},{"path":"/news/index.html","id":"dpchecker-035-develoment-version","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.5 (develoment version)","title":"DPchecker 0.3.5 (develoment version)","text":"Add test_project() function test DataStore projects. Add unit tests optional eml elements Update documentation reflect new test_project() function.","code":""},{"path":"/news/index.html","id":"dpchecker-034","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.4","title":"DPchecker 0.3.4","text":"2024-07-29 * Update license CC0 * Bug fix test_missing_data() 2024-06-24 * Fixed bug test_missing_data() order files listed metadata match order files produced list.files() function evaluate wrong file produce inadvertent unhelpful errors. 2024-02-05 * Fix bug test_date_range() adding UTC temporalCoverage * test_missing_data() now also handles missing data codes “blank” “empty”. * Update test_missing_data() default flag whole files, column undocumented missing data. condenses error output running run_congruence_checks(). trouble shooting attempting pinpoint data lack missing values, test_missing_data() can run parameter detail_level = “columns”. 2024-01-26 * Bugfixes test_dates_parse() test_date_range(): now ignore files times dates date times. * Bugfixes test_valid_fieldnames(), test_valid_filenames(), test_numeric_fields(), test_dates_parse(), test_date_range() - bug; must something deep dependency chain changed. * Bugfix attempt test_fields_match() reportedly needs testing * Add function test_missing_data() scans data NAs documented metadata","code":""},{"path":"/news/index.html","id":"dpchecker-033","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.3","title":"DPchecker 0.3.3","text":"Bug fixes test_date_range() test_dates_parse(). Adjusted test_datatable_urls() test_datatable_urls_doi() work properly data table urls present metadata. Move convert_datetime_format QCkit; add QCkit re-export DPchecker Updated tabular_data_congruence.R speed stability per codefactor suggests","code":""},{"path":"/news/index.html","id":"dpchecker-032","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.2","title":"DPchecker 0.3.2","text":"Adjusted test_date_range() can handle data columns contain dates times. Times truncated midnight data collected first day indicated considered “range” data collected last day indicated considered “range”. Added test_public_points() list functions DPchecker.Rmd file. Added test_public_points() list functions run run_congruence_checks(). Added test_public_points() function test whether metadata contains GPS coordinates package public. Added test_keywords() list function DPchecker.Rmd file. Added test_keywords() list functions run run_congruence_checks(). Added new function, test_keywords() test presence keywords metadata; something required EML extraction DataStore. Updated test_valid_filenames() accept filenames hyphens (addition filenames alpha-numerics underscore). Filenames still must start letter. Added test_dates_parse() function list functions DPchecker.Rmd file. Added test_dates_parse() function list functions run function run_congruence_checks() called. Added function test_dates_parse() test whether date formats supplied metadata match values supplied data files. Added NEWS.md file track changes DPchecker R package.","code":""}]
+[{"path":"/articles/DPchecker.html","id":"install-dp-checker","dir":"Articles","previous_headings":"","what":"Install DP checker","title":"DPchecker","text":"can install DPchecker part NPSdataverse using:","code":"install.packages(\"devtools\") devtools::install_github(\"nationalparkservice/NPSdataverse\") library(NPSdataverse)"},{"path":[]},{"path":"/articles/DPchecker.html","id":"the-entire-package","dir":"Articles","previous_headings":"Check a data package","what":"The entire package","title":"DPchecker","text":"common use case DPchecker run single function, run_congruence_checks() run DPchecker tests . need fully constructed data package single folder consisting : * EML-formatted metadata file name ends _metadata.xml * UTF-8 encoded .csv files also need supply path data package. using Rstudio started new project, can put data package folder Rproject folder tell R find : data package somewhere else hard drive, describe path data package folder. example, data package folder folder called “nps_data” located Downloads folder (“username” username):","code":"run_congruence_checks(\"my_data_package_folder\") dp<-\"C:/Users/username/Downloads/my_data_package_folder\" run_congruence_checks(dp)"},{"path":"/articles/DPchecker.html","id":"metadata-only","dir":"Articles","previous_headings":"Check a data package","what":"Metadata only","title":"DPchecker","text":"cases, may want check just EML metadata file completeness without checking whether properly coincides data files (perhaps trouble shooting metadata issue sent just metadata file check). case, can restrict run_congruence_checks() function just check metadata elements:","code":"# In this case \"my_data_package_folder\" need only contain the metadata file but could include .csvs dp<-\"C:/Users/username/Downloads/my_data_package_folder\" run_congruence_checks(dp, check_metadata_only = TRUE)"},{"path":"/articles/DPchecker.html","id":"generate-a-log-file","dir":"Articles","previous_headings":"Check a data package","what":"Generate a log file","title":"DPchecker","text":"want generate log file run_congruence_checks() results can . log file may useful collaborating trouble shooting may simply handy records. Log files included data package upload. log file written directory Rproject default, can also specify directory saved .","code":"# save log file to current working directory: run_congruence_checks(dp, output_filename = \"congruence_log_YYYY-MM-DD\") # save the log file to another directory: save_here <- \"C:/Users/username/Documents\" run_congruence_checks(dp, output_filename = \"congruence_log_YYYY-MM-DD\", output_dir = save_here)"},{"path":"/articles/DPchecker.html","id":"interpreting-results","dir":"Articles","previous_headings":"","what":"Interpreting results","title":"DPchecker","text":"DPchecker tests designed help data package creators produce high quality, complete data packages can fully leverage DataStore’s ability ingest machine-readable metadata, maximally useful downstream data users. set tests also useful data package reviewers. Passing test indicated green check mark (✓\\checkmark). test fails, may fail error (red ×\\times) warning (yellow exclamation mark, !). Errors must addressed prior upload. Please modify data package DPchecker return errors. Warnings helpful indications data package creator may want look something. may wrong, might unusual. instance, data package lacked taxonomic geographic coverage fail taxonomic geographic coverage test warning lacking taxonomy geography unusual, may incorrect. Warnings may also used alert data package creators best practices - instance abstract less 20 words long test produce warning suggesting data package creator consider writing informative abstract.","code":""},{"path":"/articles/DPchecker.html","id":"tests-conducted","dir":"Articles","previous_headings":"","what":"Tests conducted","title":"DPchecker","text":"DPchecker v0.3.2 runs two types tests: metadata tests tests determine whether metadata data files congruent. Metadata tests can broken two sub-categories, metadata compliance metadata completeness. tests run order run listed .","code":""},{"path":"/articles/DPchecker.html","id":"metadata-compliance","dir":"Articles","previous_headings":"Tests conducted","what":"Metadata compliance","title":"DPchecker","text":"tests determine whether metadata schema valid adheres rules data packages. require *_metadata.xml file run require data files present. include: metadata file schema valid (test_validate_schema()) filename used exactly metadata (test_dup_meta_entries()) version EML supported (test_metadata_version() Metadata indicates data file single-character field delimiter (test_delimiter()) Metadata indicates data file contains exactly one header row (test_header_num()) Metadata indicates data files footers (test_footer()) Metadata contains taxonomic coverage element (test_taxonomic_cov()) Metadata contains geographic coverage element (test_geographic_cov()) Metadata contains Digital Object Identifier (DOI) (test_doi()) Metadata DOI properly formatted (test_doi_format()) Metadata contains URLs data table (test_datatable_urls) Metadata URLs properly formatted correspond DOI indicated metadata (test_datatable_urls_doi) Metadata contains publisher element (test_publisher()) Metadata indicates data column names begin letter contain spaces special characters (test_valid_fieldnames()) Metadata indicates file names letter contain special characters spaces. (test_valid_filenames()) Metadata contains emails, .gov emails (test_pii_meta_emails())","code":""},{"path":"/articles/DPchecker.html","id":"eml-elements-required-for-datastore","dir":"Articles","previous_headings":"Tests conducted","what":"EML elements required for DataStore:","title":"DPchecker","text":"tests ensure EML elements necessary DataStore properly extract metadata populate reference exist, correct location, properly formatted. elements also often aspects metadata passed repositories search engines DataCite data.gov google’s dataset search. Therefore, checks may throw warnings suggestions best practices - removing stray characters abstracts suggesting informative title title unusually short. Required EML element tests require *_metadata.xml file run require data files present. Creator element exists individual creators exist, valid (<3 words) surNames (test_creator()) Publication date present correct ISO-8601 format (test_pub_date()) Data package title present metadata (test_dp_title()) Data package metadata contains least one keyword (test_keywords()) Metadata states data created NPS (test_by_for_nps()) Metadata indicates publisher National Park Service (test_publisher_name()) Metadata indicates publisher state CO (test_publisher_state()) Metadata indicates publisher city Fort Collins (test_publisher_city()) Metadata contains well formatted abstract data package (test_dp_abstract()) Metadata contains well formatted methods section data package (test_methods()) dataTables listed metadata unique file description (test_file_descript()) Metadata contains valid CUI code (test_cui_dissemination()) Metadata contains valid license name (test_license()) Metadata contains Intellectual Rights statement (test_int_rights() attributes listed metadata attribute definitions (test_attribute_defs()) attributes listed metadata storage types associated (test_storage_type()) attribute storage types valid values (test_storage_type())","code":""},{"path":"/articles/DPchecker.html","id":"recommended-eml-elements","dir":"Articles","previous_headings":"Tests conducted","what":"Recommended EML elements","title":"DPchecker","text":"elements aren’t required. missing, tests generate warning can choose ignore. However, included elements, please resolve errors submitting data package. individual Creators ORCiD associated (test_orcid_exists()) ORCiDs properly formatted (test_orcid_format()) ORCiDs resolve ORCiD profile (test_orcid_resolves()) ORCiDs resolve ORCiD profile matches Creator’s last name (test_orcid_match()) metadata contains well formatted additionalInfo (“Notes” DataStore) section (test_notes()) metadata contains DataStore Project reference “projects”(test_project())","code":""},{"path":"/articles/DPchecker.html","id":"metadata-and-data-congruence","dir":"Articles","previous_headings":"Tests conducted","what":"Metadata and Data Congruence","title":"DPchecker","text":"functions check make sure values fields metadata file accurately corresponds data files supplied. test require entire data package - *_metadata.xml file data files (*.csv) must present. data files listed metadata metadata file names refer data files (test_file_name_match()) columns data match columns metadata (test_fields_match()) NAs (missing data) properly accounted metadata (test_missing_data()) Columns indicated numeric metadata contain numeric values missing value codes data (test_numeric_fields()) Columns indicated dates metadata matching date formats metadata data. checks cell date column format provided metadata can take time larger data packages (test_dates_parse()) Columns indicated dates metadata contain values fall within stated temporal coverage metadata (test_date_range())","code":""},{"path":"/articles/DPchecker.html","id":"data-and-metadata-compliance","dir":"Articles","previous_headings":"Tests conducted","what":"Data and Metadata Compliance","title":"DPchecker","text":"functions check data metadata files compliance. Please resolve errors uploading data. Data files contain email addresses constitute personally identifiable information (PII) (test_pii_data_emails() Metadata contain GPS coordinates data package public (test_public_points())","code":""},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Rob Baker. Maintainer, author. Sarah E. Wright. Author. Issac Quevedo. Contributor. Amelia Sherman. Contributor.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Baker R, Wright SE (2024). DPchecker: Checks Data Packages Congruence. R package version 0.3.4, https://nationalparkservice.github.io/DPchecker/.","code":"@Manual{, title = {DPchecker: Checks Data Packages for Congruence}, author = {Rob Baker and Sarah E. Wright}, year = {2024}, note = {R package version 0.3.4}, url = {https://nationalparkservice.github.io/DPchecker/}, }"},{"path":[]},{"path":"/index.html","id":"v033","dir":"","previous_headings":"","what":"v0.3.3","title":"Checks Data Packages for Congruence","text":"DPchecker (Data Package checker) package series functions NPS data package authors reviewers check internal consistency among data/meta data data package standards. Currently, EML metadata .csv data files supported. recommended store data files single metadata file (filename must end “metadata.xml”) directory. function runs single check imports data metadata necessary. prefer run checks , can use run_congruence_checks().","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Checks Data Packages for Congruence","text":"can install development version DPchecker GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"nationalparkservice/DPchecker\")"},{"path":"/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples:","title":"Checks Data Packages for Congruence","text":"Run checks : Verify file names column names metadata match data:","code":"library(DPchecker) # Get the directory where example data is stored (alternately, replace this with the path to your data folder) dir <- DPchecker_example(\"BICY_veg\") # Use this to test things out with the included example data # dir <- \"C:/Users/yourusername/Documents/my_data_package\" # The path to your data package should look something like this # Run all checks and summarize results run_congruence_checks(dir) # Alternately, if your data package is stored in the root of your R project folder, you don't need to pass any arguments run_congruence_checks() library(DPchecker) dir <- DPchecker_example(\"BICY_veg\") # Use this to test things out with the included example data # dir <- \"C:/Users/yourusername/Documents/my_data_package\" # The path to your data package should look something like this test_file_name_match(dir) test_fields_match(dir)"},{"path":[]},{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"CC0 1.0 Universal","title":"CC0 1.0 Universal","text":"CREATIVE COMMONS CORPORATION LAW FIRM PROVIDE LEGAL SERVICES. DISTRIBUTION DOCUMENT CREATE ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES INFORMATION “-” BASIS. CREATIVE COMMONS MAKES WARRANTIES REGARDING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER, DISCLAIMS LIABILITY DAMAGES RESULTING USE DOCUMENT INFORMATION WORKS PROVIDED HEREUNDER.","code":""},{"path":"/LICENSE.html","id":"statement-of-purpose","dir":"","previous_headings":"","what":"Statement of Purpose","title":"CC0 1.0 Universal","text":"laws jurisdictions throughout world automatically confer exclusive Copyright Related Rights (defined ) upon creator subsequent owner(s) (, “owner”) original work authorship /database (, “Work”). Certain owners wish permanently relinquish rights Work purpose contributing commons creative, cultural scientific works (“Commons”) public can reliably without fear later claims infringement build upon, modify, incorporate works, reuse redistribute freely possible form whatsoever purposes, including without limitation commercial purposes. owners may contribute Commons promote ideal free culture production creative, cultural scientific works, gain reputation greater distribution Work part use efforts others. /purposes motivations, without expectation additional consideration compensation, person associating CC0 Work (“Affirmer”), extent owner Copyright Related Rights Work, voluntarily elects apply CC0 Work publicly distribute Work terms, knowledge Copyright Related Rights Work meaning intended legal effect CC0 rights. Copyright Related Rights. Work made available CC0 may protected copyright related neighboring rights (“Copyright Related Rights”). Copyright Related Rights include, limited , following: right reproduce, adapt, distribute, perform, display, communicate, translate Work; moral rights retained original author(s) /performer(s); publicity privacy rights pertaining person’s image likeness depicted Work; rights protecting unfair competition regards Work, subject limitations paragraph 4(), ; rights protecting extraction, dissemination, use reuse data Work; database rights (arising Directive 96/9/EC European Parliament Council 11 March 1996 legal protection databases, national implementation thereof, including amended successor version directive); similar, equivalent corresponding rights throughout world based applicable law treaty, national implementations thereof. Waiver. greatest extent permitted , contravention , applicable law, Affirmer hereby overtly, fully, permanently, irrevocably unconditionally waives, abandons, surrenders Affirmer’s Copyright Related Rights associated claims causes action, whether now known unknown (including existing well future claims causes action), Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“Waiver”). Affirmer makes Waiver benefit member public large detriment Affirmer’s heirs successors, fully intending Waiver shall subject revocation, rescission, cancellation, termination, legal equitable action disrupt quiet enjoyment Work public contemplated Affirmer’s express Statement Purpose. Public License Fallback. part Waiver reason judged legally invalid ineffective applicable law, Waiver shall preserved maximum extent permitted taking account Affirmer’s express Statement Purpose. addition, extent Waiver judged Affirmer hereby grants affected person royalty-free, non transferable, non sublicensable, non exclusive, irrevocable unconditional license exercise Affirmer’s Copyright Related Rights Work () territories worldwide, (ii) maximum duration provided applicable law treaty (including future time extensions), (iii) current future medium number copies, (iv) purpose whatsoever, including without limitation commercial, advertising promotional purposes (“License”). License shall deemed effective date CC0 applied Affirmer Work. part License reason judged legally invalid ineffective applicable law, partial invalidity ineffectiveness shall invalidate remainder License, case Affirmer hereby affirms () exercise remaining Copyright Related Rights Work (ii) assert associated claims causes action respect Work, either case contrary Affirmer’s express Statement Purpose. Limitations Disclaimers. trademark patent rights held Affirmer waived, abandoned, surrendered, licensed otherwise affected document. Affirmer offers Work -makes representations warranties kind concerning Work, express, implied, statutory otherwise, including without limitation warranties title, merchantability, fitness particular purpose, non infringement, absence latent defects, accuracy, present absence errors, whether discoverable, greatest extent permissible applicable law. Affirmer disclaims responsibility clearing rights persons may apply Work use thereof, including without limitation person’s Copyright Related Rights Work. , Affirmer disclaims responsibility obtaining necessary consents, permissions rights required use Work. Affirmer understands acknowledges Creative Commons party document duty obligation respect CC0 use Work.","code":""},{"path":"/reference/DPchecker-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","title":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","text":"Allows user (reviewer) check data package test whether meets congruence standards set forth NPS upload DataStore datapackage.","code":""},{"path":[]},{"path":"/reference/DPchecker-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"DPchecker: Checks Data Packages for Congruence — DPchecker-package","text":"Maintainer: Rob Baker robert_baker@nps.gov (ORCID) Authors: Sarah E. Wright sarah_wright@nps.gov contributors: Issac Quevedo [contributor] Amelia Sherman [contributor]","code":""},{"path":"/reference/DPchecker_example.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate path to example data — DPchecker_example","title":"Generate path to example data — DPchecker_example","text":"Generate path example data","code":""},{"path":"/reference/DPchecker_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate path to example data — DPchecker_example","text":"","code":"DPchecker_example(dp_name = c(\"BICY_veg\", \"BUIS_herps\"))"},{"path":"/reference/DPchecker_example.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate path to example data — DPchecker_example","text":"dp_name Name data package.","code":""},{"path":"/reference/DPchecker_example.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate path to example data — DPchecker_example","text":"Path example data, dp_name specified.","code":""},{"path":"/reference/DPchecker_example.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate path to example data — DPchecker_example","text":"","code":"DPchecker_example() #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. #> [1] \"C:/Users/rlbaker/Documents/RDev/DPchecker_devspace/inst/extdata/BICY_veg\" DPchecker_example(\"BUIS_herps\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. #> [1] \"C:/Users/rlbaker/Documents/RDev/DPchecker_devspace/inst/extdata/BUIS_herps\""},{"path":"/reference/is_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if metadata is eml object — is_eml","title":"Check if metadata is eml object — is_eml","text":"Helper function validate argument belongs emld class.","code":""},{"path":"/reference/is_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if metadata is eml object — is_eml","text":"","code":"is_eml(metadata)"},{"path":"/reference/is_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if metadata is eml object — is_eml","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Data — load_data","title":"Load Data — load_data","text":"load_data() inspects working directory data files. Loads existing data files tibble.","code":""},{"path":"/reference/load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Data — load_data","text":"","code":"load_data(directory = here::here())"},{"path":"/reference/load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Data — load_data","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory.","code":""},{"path":"/reference/load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Data — load_data","text":"tibble .csvs","code":""},{"path":"/reference/load_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load Data — load_data","text":"loads data files specified directory (default working directory) tibble later use congruence checking. Returns user working directory upon exit. Currently supports .csv files.","code":""},{"path":"/reference/load_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Data — load_data","text":"","code":"data_pkg_dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. my_data <- load_data(data_pkg_dir)"},{"path":"/reference/load_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Metadata — load_metadata","title":"Load Metadata — load_metadata","text":"load_metadata() loads metadata file given path directory.","code":""},{"path":"/reference/load_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Metadata — load_metadata","text":"","code":"load_metadata(directory = here::here(), inform_success = FALSE)"},{"path":"/reference/load_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Metadata — load_metadata","text":"directory directory metadata file found - .e. data package. Defaults current project directory. inform_success Boolean indicating whether display message metadata successfully loaded.","code":""},{"path":"/reference/load_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Metadata — load_metadata","text":"R-object formatted EML metadata.","code":""},{"path":"/reference/load_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load Metadata — load_metadata","text":"Given path directory - default working directory - load_metadata() looks files ending *_metadata.xml. function quits error tells user files found one file found. one metadata file found, checked one 3 formats: FGDC, ISO, EML. Currently EML supported function fail error, inform user, quit non-EML metadata found. EML metadata file loaded R's work space future use congruence checking. context National Park Service data packages, function can slightly easier use loading metadata R EML::read_eml() require filename type specified.","code":""},{"path":"/reference/load_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Metadata — load_metadata","text":"","code":"data_pkg_dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. my_metadata <- load_metadata(data_pkg_dir)"},{"path":"/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. QCkit convert_datetime_format","code":""},{"path":"/reference/run_congruence_checks.html","id":null,"dir":"Reference","previous_headings":"","what":"Run all congruence checks — run_congruence_checks","title":"Run all congruence checks — run_congruence_checks","text":"Run congruence checks","code":""},{"path":"/reference/run_congruence_checks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run all congruence checks — run_congruence_checks","text":"","code":"run_congruence_checks( directory = here::here(), metadata = load_metadata(directory), check_metadata_only = FALSE, skip_cols = NA, output_filename, output_dir = here::here() )"},{"path":"/reference/run_congruence_checks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run all congruence checks — run_congruence_checks","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. check_metadata_only run checks metadata skip anything involving data files. skip_cols String. Defaults NA. list one columns data skip testing whether dates within data fall within dates range specified metadata. Useful , instance, columns within data associated QA/QC process dates expected fall outside date range specified data. output_filename Optional. specified, saves results congruence checks file. omitted, prints results console. file already exists, results appended existing file. output_dir Location save output file, using.","code":""},{"path":"/reference/run_congruence_checks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run all congruence checks — run_congruence_checks","text":"Invisibly returns metadata.","code":""},{"path":"/reference/run_congruence_checks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run all congruence checks — run_congruence_checks","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. run_congruence_checks(dir) #> #> ── Running all congruence checks ─────────────────────────────────────────────── #> #> ── Reading metadata ── #> #> ── Checking metadata compliance ── #> #> ✔ Your metadata is schema valid. #> ✔ Each data file name is used exactly once in the metadata file. #> ✔ Your EML version is supported. #> ✔ Metadata indicates that each data file contains a field delimiter that is a #> single character #> ✔ Metadata indicates that each data file contains exactly one header row. #> ✔ Metadata indicates data files do not have footers. #> ✔ Metadata contains taxonomic coverage element. #> ✔ Metadata contains geographic coverage element #> ✔ Metadata contains a digital object identifier, \"doi: #> https://doi.org/10.57830/2295086\". #> ✔ Metadata Digital Object Identifier appears to be properly formatted. #> ✔ Metadata contains URLs for all data tables. #> ✔ Data table URLs are properly formmatted and correspond to the specified DOI. #> ✔ Metadata contains publisher element. #> ✔ Field names begin with a letter and do not contain spaces or special #> characters. #> ✔ File names begin with a letter and do not contain spaces or special #> characters. #> ✔ Metadata does not appear to contain any personal emails. #> #> ── Checking that metadata contains required elements for DataStore extraction ── #> #> ✔ Any individual Creators in metadata have a surNames with less than three #> words. #> ! Publication date, 2022, predates the Data Package Reference Type. #> ✔ Data package title is present in metadata. #> ✔ Metadata contains keyword(s). #> ✔ Metadata states data was created by or for NPS. #> ✔ Metadata indicates the publisher is the National Park Service. #> ✔ Metadata indicates the publisher state is CO. #> ✔ Metadata indicates the publisher city is Fort Collins. #> ! The data package abstract contains non-standard characters: . Use #> `EMLeditor::set_abstract()` to revise. #> ! The metadata methods contains non-standard characters such as \\r or #> . Use `EMLeditor::set_methods()` to revise. #> ✔ All dataTables listed in metadata have a unique file description. #> ! Data file 3 description is greater than 15 words. Consider a more concise #> description. #> ✖ The CUI dissemination code PUBVER is not a valid code. Use #> `EMLeditor::set_cui()`. #> ✖ Metadata does not contain a license name. Use `EMLeditor::set_int_rights()` #> to add a license name. #> ✔ Metadata contains an Intellectual Rights statement. #> ✔ All attributes listed in metadata have attribute definitions. #> ✔ All attributes listed in metadata have a storage type associated with them. #> ✔ All attribute storage types are valid values. #> #> ── Checking additional/optional metadata elements ── #> #> ✔ All individual creators have associated ORCiDs. #> ✔ All Creator ORCiDs are properly formatted. #> ✔ All Creator ORCiDs resolved to a valid ORCiD profile. #> ✔ All Creator ORCiDs resolve to an ORCiD profile that matches the Creator last #> name. #> ! Metadata does not contain additionalInfo (notes). Use #> `EMLeditor::set_additional_info()` to add notes. #> ! No project associated with the metadata. To add a DataStore project, use #> `EMLeditor::set_project()`. #> #> ── Checking that metadata is consistent with data file(s) ── #> #> ✔ All data files are listed in metadata and all metadata files names refer to #> data files. #> ✔ All columns in data match all columns in metadata. #> ✖ Undocumented missing data detected. Please document all missing data in #> metadata: #> ---> Mini_BICY_Veg_Intercept_Cleaned.csv contains missing data without a #> corresponding missing data code in metadata. #> ---> Mini_BICY_Veg_Transect_Cleaned.csv contains missing data without a #> corresponding missing data code in metadata. #> ✔ Columns indicated as numeric in metadata contain only numeric values and #> valid missing value codes. #> ✔ Metadata and data date formatting is in congruence. #> ✔ Columns indicated as date/time in metadata are within the stated temporal #> coverage range. #> #> ── Checking data and metadata compliance ── #> #> ✔ Data files do not appear to contain any personal emails. #> ! CUI is not set to PUBLIC. GPS coordinates detected in metadata will be #> publicly available. Are you sure? #> #> ── Summary ── #> #> ✖ 3 errors to address #> ! 7 warnings to look into"},{"path":"/reference/test_attribute_defs.html","id":null,"dir":"Reference","previous_headings":"","what":"Test metadata for attribute definitions — test_attribute_defs","title":"Test metadata for attribute definitions — test_attribute_defs","text":"test_attribute_defs() extracts attributeNames attributeDefinitions EML metadata. tests make sure number attributeNames attributeDefinitions. true, test passes. , fails error. test looks metadata, look data files. Passing test mean data columns attributes metadata associated . test , see test_fields_match().","code":""},{"path":"/reference/test_attribute_defs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test metadata for attribute definitions — test_attribute_defs","text":"","code":"test_attribute_defs(metadata = load_metadata(directory))"},{"path":"/reference/test_attribute_defs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test metadata for attribute definitions — test_attribute_defs","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_attribute_defs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test metadata for attribute definitions — test_attribute_defs","text":"invisibly returns metadata","code":""},{"path":"/reference/test_attribute_defs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test metadata for attribute definitions — test_attribute_defs","text":"","code":"if (FALSE) { # \\dontrun{ test_attribute_defs() } # }"},{"path":"/reference/test_by_for_nps.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for ","title":"Test for ","text":"Test \"NPS\"","code":""},{"path":"/reference/test_by_for_nps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for ","text":"","code":"test_by_for_nps(metadata = load_metadata(directory))"},{"path":"/reference/test_by_for_nps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for ","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_by_for_nps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for ","text":"invisibly returns metadata","code":""},{"path":"/reference/test_by_for_nps.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test for ","text":"test_by_for_nps() test presence \"NPS\" field. test fails error information missing metadata. test fails warning metadata indicate data created NPS (expected relatively rare). Otherwise test passes.","code":""},{"path":"/reference/test_by_for_nps.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for ","text":"","code":"if (FALSE) { # \\dontrun{ test_by_for_nps() } # }"},{"path":"/reference/test_creator.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of creator and surName — test_creator","title":"Test for presence of creator and surName — test_creator","text":"test_creator() examines Creator element metadata. creator element missing, test fails error. creator element present, function looks individual creators. individual creators present lacks surName, test fails error. individual creators surName two words, test fails warning. Otherwise, test passes.","code":""},{"path":"/reference/test_creator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of creator and surName — test_creator","text":"","code":"test_creator(metadata = load_metadata(directory))"},{"path":"/reference/test_creator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of creator and surName — test_creator","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_creator.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of creator and surName — test_creator","text":"invisible(metadata)","code":""},{"path":"/reference/test_creator.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of creator and surName — test_creator","text":"","code":"if (FALSE) { # \\dontrun{ test_creator() } # }"},{"path":"/reference/test_cui_dissemination.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for CUI dissemination code — test_cui_dissemination","title":"Test for CUI dissemination code — test_cui_dissemination","text":"test_cui_dissemination() examines EML metadata presence Controlled Unclassified Information (CUI) dissemination code. function fails error code exist match list valid codes. valid code \"PUBLIC\" test produce warning. valid code results pass.","code":""},{"path":"/reference/test_cui_dissemination.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for CUI dissemination code — test_cui_dissemination","text":"","code":"test_cui_dissemination(metadata = load_metadata(directory))"},{"path":"/reference/test_cui_dissemination.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for CUI dissemination code — test_cui_dissemination","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_cui_dissemination.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for CUI dissemination code — test_cui_dissemination","text":"invisibly returns metadata","code":""},{"path":"/reference/test_cui_dissemination.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for CUI dissemination code — test_cui_dissemination","text":"","code":"if (FALSE) { # \\dontrun{ test_cui_dissemination() } # }"},{"path":"/reference/test_datatable_urls.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks for consistency in data file URLs — test_datatable_urls","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"test_datatable_urls Checks make sure URLs listed data files correctly correspond DOI metadata. last 7 digits URL data tables identical last 7 digits DOI, test passes. DOI, test fails warning. data table lacks URL, test fails error. data table URL's last 7 digits identical DOI's last 7 digits, test fails error.","code":""},{"path":"/reference/test_datatable_urls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"","code":"test_datatable_urls(metadata = load_metadata(directory))"},{"path":"/reference/test_datatable_urls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_datatable_urls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"invisible(metadata)","code":""},{"path":"/reference/test_datatable_urls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"suggestions functions use correct errors/warnings provided.","code":""},{"path":"/reference/test_datatable_urls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks for consistency in data file URLs — test_datatable_urls","text":"","code":"if (FALSE) { # \\dontrun{ dir <- DPchecker_example(\"BICY_veg\") test_datatable_urls(dir) } # }"},{"path":"/reference/test_datatable_urls_doi.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"test_datatable_urls_doi() passes data tables URLs properly formatted (.e. \"https://irma.nps.gov/DataStore/Reference/Profile/xxxxxxx\") \"xxxxxx\" identical DOI specified metadata. Fails warning DOI specified metadata. DOI specified metadata, data table URL properly coincide url landing page doi points one table, test fails warning (indicates table failed). data table urls exist, fails error indicates add .","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"","code":"test_datatable_urls_doi(metadata = load_metadata(directory))"},{"path":"/reference/test_datatable_urls_doi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"invisible(metadata)","code":""},{"path":"/reference/test_datatable_urls_doi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests for data table URL formatting & correspondence with DOI — test_datatable_urls_doi","text":"","code":"if (FALSE) { # \\dontrun{ dir <- DPchecker_example(\"BICY_veg\") test_datatable_urls_doi(dir) } # }"},{"path":"/reference/test_dates_parse.html","id":null,"dir":"Reference","previous_headings":"","what":"Test data and metadata data formats match — test_dates_parse","title":"Test data and metadata data formats match — test_dates_parse","text":"test_dates_parse() examine data columns described containing dates times. Although can handle multiple different formats, ISO-8601 format dates times HIHGLY recommended (ISO YYYY-MM-DDThh:mm:ss just YYYY-MM-DD). function compare format provided data files format indicated metadata. dates indicated metadata, test fails warning. dates formats match, test passes. formats match, test fails error. specific files columns failed indicated results.","code":""},{"path":"/reference/test_dates_parse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test data and metadata data formats match — test_dates_parse","text":"","code":"test_dates_parse(directory = here::here(), metadata = load_metadata(directory))"},{"path":"/reference/test_dates_parse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test data and metadata data formats match — test_dates_parse","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dates_parse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test data and metadata data formats match — test_dates_parse","text":"Invisibly returns metadata","code":""},{"path":"/reference/test_dates_parse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test data and metadata data formats match — test_dates_parse","text":"test_dates_parse() examine EVERY cell column dates hits date format match format specified metadata. large datasets, process can take minute two. even one typo data file, cause function throw error. Frequent source error include viewing dates Excel, can deceptive, typos, changes date format time changing personnel.","code":""},{"path":"/reference/test_dates_parse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test data and metadata data formats match — test_dates_parse","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_dates_parse(dir) #> ✔ Metadata and data date formatting is in congruence."},{"path":"/reference/test_date_range.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Date Range — test_date_range","title":"Test Date Range — test_date_range","text":"test_date_range() verifies dates dataset consistent date range metadata. HIGHLY recommended provide dates times ISO-8601 formatting: YYYY-MM-DDThh:mm:ss (time can us just YYYY-MM-DD component).","code":""},{"path":"/reference/test_date_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Date Range — test_date_range","text":"","code":"test_date_range( directory = here::here(), metadata = load_metadata(directory), skip_cols = NA )"},{"path":"/reference/test_date_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Date Range — test_date_range","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. skip_cols String. Defaults NA. One columns omit test_date_range function.","code":""},{"path":"/reference/test_date_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Date Range — test_date_range","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_date_range.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Date Range — test_date_range","text":"function checks columns identified date/time metadata. metadata lacks date range, function fails warning. fails error dates contained columns outside temporal coverage specified metadata. date/time format string specified metadata match actual format date CSV, likely fail parse result failing test error. Failure parse indicated results text \"(failed parse)\". test also inform user file columns causing test fail failing (.e. outside date range failed parse). date columns causing test fail associated QA/QC process expected fall outside date range specified data, columns can omitted test using skip_cols.","code":""},{"path":"/reference/test_date_range.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Date Range — test_date_range","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_date_range(dir) #> ✔ Columns indicated as date/time in metadata are within the stated temporal #> coverage range."},{"path":"/reference/test_delimiter.html","id":null,"dir":"Reference","previous_headings":"","what":"Field Delimiter Check — test_delimiter","title":"Field Delimiter Check — test_delimiter","text":"test_delimiter() checks metadata file ensures data file field delimiter exactly one character (e.g. \", \").","code":""},{"path":"/reference/test_delimiter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Field Delimiter Check — test_delimiter","text":"","code":"test_delimiter(metadata = load_metadata(here::here()))"},{"path":"/reference/test_delimiter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Field Delimiter Check — test_delimiter","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_delimiter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Field Delimiter Check — test_delimiter","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_delimiter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Field Delimiter Check — test_delimiter","text":"test_delimiter() examines fieldDelimiter element EML (currently EML supported) metadata determine many characters . fieldDelimiter element, test returns error. field delimiter anything exactly one character length, test returns error.","code":""},{"path":"/reference/test_delimiter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Field Delimiter Check — test_delimiter","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_delimiter(meta) #> ✔ Metadata indicates that each data file contains a field delimiter that is a #> single character"},{"path":"/reference/test_doi.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for presence of a Digital Object Identifier — test_doi","title":"Check for presence of a Digital Object Identifier — test_doi","text":"test_doi() checks whether DOI data package present metadata. currently validate DOI. DOI present, test passes. DOI present, test fails warning.","code":""},{"path":"/reference/test_doi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for presence of a Digital Object Identifier — test_doi","text":"","code":"test_doi(metadata = load_metadata(directory))"},{"path":"/reference/test_doi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for presence of a Digital Object Identifier — test_doi","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_doi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for presence of a Digital Object Identifier — test_doi","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_doi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for presence of a Digital Object Identifier — test_doi","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_doi(meta) #> ✔ Metadata contains a digital object identifier, \"doi: #> https://doi.org/10.57830/2295086\"."},{"path":"/reference/test_doi_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Check DOI formatting — test_doi_format","title":"Check DOI formatting — test_doi_format","text":"test_doi_format() runs basic formatting checks. DOI absent, test fail error. DOI exactly 37 characters contain \"doi: https://doi.org/10.57830/\" test fail error. test passes entry alternateIdentifier field exactly 37 characters long contains \"doi: https://doi.org/10.57830/\". Please note cursory formatting check; check make sure DOI active (probably stage data package authoring). check make sure correct correctly corresponds anything DataStore elsewhere within metadata.","code":""},{"path":"/reference/test_doi_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check DOI formatting — test_doi_format","text":"","code":"test_doi_format(metadata = load_metadata(directory))"},{"path":"/reference/test_doi_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check DOI formatting — test_doi_format","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_doi_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check DOI formatting — test_doi_format","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_doi_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check DOI formatting — test_doi_format","text":"","code":"if (FALSE) { # \\dontrun{ meta <- test_doi_format(metadata) } # }"},{"path":"/reference/test_dp_abstract.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML abstract — test_dp_abstract","title":"Test EML abstract — test_dp_abstract","text":"test_dp_abstract() inspects EML presence data package abstract. test Fails error abstract absent. abstract present, test fails warning abstract <20 words, >250 words, contains subset common characters indicate improper formatting. Otherwise test passes.","code":""},{"path":"/reference/test_dp_abstract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML abstract — test_dp_abstract","text":"","code":"test_dp_abstract(metadata = load_metadata(directory))"},{"path":"/reference/test_dp_abstract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML abstract — test_dp_abstract","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dp_abstract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML abstract — test_dp_abstract","text":"invisibly returns metadata","code":""},{"path":"/reference/test_dp_abstract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML abstract — test_dp_abstract","text":"","code":"if (FALSE) { # \\dontrun{ test_dp_abstract() } # }"},{"path":"/reference/test_dp_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Test data package title — test_dp_title","title":"Test data package title — test_dp_title","text":"test_dp_title() tests EML metadata presence data package title. test fails error title absent. test fails warning title > 20 < 5 words. Otherwise, test passes.","code":""},{"path":"/reference/test_dp_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test data package title — test_dp_title","text":"","code":"test_dp_title(metadata = load_metadata(directory))"},{"path":"/reference/test_dp_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test data package title — test_dp_title","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dp_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test data package title — test_dp_title","text":"invisibly returns metadata","code":""},{"path":"/reference/test_dp_title.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test data package title — test_dp_title","text":"","code":"if (FALSE) { # \\dontrun{ test_dp_title() } # }"},{"path":"/reference/test_dup_meta_entries.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"test_dup_meta_entries() tests see whether duplicate filenames listed data files (EML) metadata.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"","code":"test_dup_meta_entries(metadata = load_metadata(here::here()))"},{"path":"/reference/test_dup_meta_entries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"specifically, test_dup_meta_entries() looks 'physical' elements metadata file, describe data file, asks whether duplicates entries objectName child element, file name data file stored. Duplicate entries result test failing error.","code":""},{"path":"/reference/test_dup_meta_entries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Metadata for Duplicate Filenames — test_dup_meta_entries","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_dup_meta_entries(meta) #> ✔ Each data file name is used exactly once in the metadata file."},{"path":"/reference/test_fields_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Matching Data/Metadata Fields — test_fields_match","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"test_fields_match() compares attributes dataTable within EML metadata columns corresponding .csv. columns names order, test passes. columns differ, test fails error.","code":""},{"path":"/reference/test_fields_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"","code":"test_fields_match( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_fields_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_fields_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_fields_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"test_fields_match briefly checks data files match, really run test_file_name_match() run test.","code":""},{"path":"/reference/test_fields_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Matching Data/Metadata Fields — test_fields_match","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_fields_match(dir) #> ✔ All columns in data match all columns in metadata."},{"path":"/reference/test_file_descript.html","id":null,"dir":"Reference","previous_headings":"","what":"Test presence of file descriptions — test_file_descript","title":"Test presence of file descriptions — test_file_descript","text":"test_file_descript() tests presence file descriptions (entityDescription) fields. fails error one entityDescription fields empty dataTable. fails error two file descriptions identical. test fails warning file description longer 15 words shorter three words. Otherwise test passes.","code":""},{"path":"/reference/test_file_descript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test presence of file descriptions — test_file_descript","text":"","code":"test_file_descript(metadata = load_metadata(directory))"},{"path":"/reference/test_file_descript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test presence of file descriptions — test_file_descript","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_file_descript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test presence of file descriptions — test_file_descript","text":"invisibly returns metadata","code":""},{"path":"/reference/test_file_descript.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test presence of file descriptions — test_file_descript","text":"","code":"if (FALSE) { # \\dontrun{ test_file_descript() } # }"},{"path":"/reference/test_file_name_match.html","id":null,"dir":"Reference","previous_headings":"","what":"File Name Match — test_file_name_match","title":"File Name Match — test_file_name_match","text":"test_file_name_match() checks see whether data files (.csv) within specified directory listed objectName (child physical) element EML metadata file directory, vice versa. Mismatches result test failing error message.","code":""},{"path":"/reference/test_file_name_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"File Name Match — test_file_name_match","text":"","code":"test_file_name_match( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_file_name_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"File Name Match — test_file_name_match","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_file_name_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"File Name Match — test_file_name_match","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_file_name_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"File Name Match — test_file_name_match","text":"directory current working directory specified, test.file_name_match() returns current working directory exit. Note metadata file must follow NPS naming conventions, specifically ending *_metadata.xml. test.file_name_match() assumes number data files directory dataTables metadata file.","code":""},{"path":"/reference/test_file_name_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"File Name Match — test_file_name_match","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_file_name_match(dir) #> ✔ All data files are listed in metadata and all metadata files names refer to #> data files."},{"path":"/reference/test_footer.html","id":null,"dir":"Reference","previous_headings":"","what":"Footer Check — test_footer","title":"Footer Check — test_footer","text":"test_footer() checks metadata files determine whether data files contain footer lines .","code":""},{"path":"/reference/test_footer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Footer Check — test_footer","text":"","code":"test_footer(metadata = load_metadata(here::here()))"},{"path":"/reference/test_footer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Footer Check — test_footer","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_footer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Footer Check — test_footer","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_footer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Footer Check — test_footer","text":"footer lines present, data package passes test. footer lines present, data package fails test error user instructed remove footer lines prior data package upload. Currently EML metadata supported.","code":""},{"path":"/reference/test_footer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Footer Check — test_footer","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_footer(meta) #> ✔ Metadata indicates data files do not have footers."},{"path":"/reference/test_geographic_cov.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Geographic Coverage — test_geographic_cov","title":"Check for Geographic Coverage — test_geographic_cov","text":"test_geographic_cov() checks geographic coverage element present metadata. perform validation geographic coverage information. geographicCoverage element present, test passes. absent, test fails warning.","code":""},{"path":"/reference/test_geographic_cov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Geographic Coverage — test_geographic_cov","text":"","code":"test_geographic_cov(metadata = load_metadata(directory))"},{"path":"/reference/test_geographic_cov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Geographic Coverage — test_geographic_cov","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_geographic_cov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Geographic Coverage — test_geographic_cov","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_geographic_cov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Geographic Coverage — test_geographic_cov","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_geographic_cov(meta) #> ✔ Metadata contains geographic coverage element"},{"path":"/reference/test_header_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Header Check — test_header_num","title":"Header Check — test_header_num","text":"test_header_num() checks metadata files ensure data file contains exactly one header row.","code":""},{"path":"/reference/test_header_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Header Check — test_header_num","text":"","code":"test_header_num(metadata = load_metadata(here::here()))"},{"path":"/reference/test_header_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Header Check — test_header_num","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_header_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Header Check — test_header_num","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_header_num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Header Check — test_header_num","text":"test_header_num() examines numHeaderLines element EML (currently EML supported) metadata determine many header rows . header rows one header row, test fails error. test also fails error information number header rows.","code":""},{"path":"/reference/test_header_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Header Check — test_header_num","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_header_num(meta) #> ✔ Metadata indicates that each data file contains exactly one header row."},{"path":"/reference/test_int_rights.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of Intellectual Rights — test_int_rights","title":"Test for presence of Intellectual Rights — test_int_rights","text":"test_int_rights() tests presence text within intellectualRights element EML formatted metadata. text present, test passes. Otherwise, test fails. test_int_rights() makes attempt parse text test whether properly coincides CUI dissemination codes licenseName metadata. simple presence/absence test.","code":""},{"path":"/reference/test_int_rights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of Intellectual Rights — test_int_rights","text":"","code":"test_int_rights(metadata = load_metadata(directory))"},{"path":"/reference/test_int_rights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of Intellectual Rights — test_int_rights","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_int_rights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of Intellectual Rights — test_int_rights","text":"invisibly returns metadata","code":""},{"path":"/reference/test_int_rights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of Intellectual Rights — test_int_rights","text":"","code":"if (FALSE) { # \\dontrun{ test_int_rights() } # }"},{"path":"/reference/test_keywords.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for Keywords — test_keywords","title":"Test for Keywords — test_keywords","text":"test_keywords() tests see whether metadata contains least one \"Keywords Set\".","code":""},{"path":"/reference/test_keywords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for Keywords — test_keywords","text":"","code":"test_keywords(metadata = load_metadata(directory))"},{"path":"/reference/test_keywords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for Keywords — test_keywords","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_keywords.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for Keywords — test_keywords","text":"invisilbe(meatadatda)","code":""},{"path":"/reference/test_keywords.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for Keywords — test_keywords","text":"","code":"if (FALSE) { # \\dontrun{ test_keywords() } # }"},{"path":"/reference/test_license.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for presence of a license name — test_license","title":"Test for presence of a license name — test_license","text":"test_license() examines licenseName element EML metadata. license name, test fails ab error. license name match list valid license names, test fails. metadata contain valid license name, license name CUI dissemination code agree, test fails error. Otherwise, test passes. Additionally, license name \"Public Domain\" \"CC0 1.0 Universal\", function produce warning data package public.","code":""},{"path":"/reference/test_license.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for presence of a license name — test_license","text":"","code":"test_license(metadata = load_metadata(directory))"},{"path":"/reference/test_license.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for presence of a license name — test_license","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_license.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for presence of a license name — test_license","text":"invisibly returns metadata","code":""},{"path":"/reference/test_license.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for presence of a license name — test_license","text":"","code":"if (FALSE) { # \\dontrun{ test_license() } # }"},{"path":"/reference/test_metadata_version.html","id":null,"dir":"Reference","previous_headings":"","what":"EML Version Check — test_metadata_version","title":"EML Version Check — test_metadata_version","text":"test_metadata_version() determines whether version metadata supplied meets current criteria NPS data package.","code":""},{"path":"/reference/test_metadata_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"EML Version Check — test_metadata_version","text":"","code":"test_metadata_version(metadata = load_metadata(here::here()))"},{"path":"/reference/test_metadata_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"EML Version Check — test_metadata_version","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_metadata_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"EML Version Check — test_metadata_version","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_metadata_version.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"EML Version Check — test_metadata_version","text":"currently EML supported. EML must version >= 2.2.0.","code":""},{"path":"/reference/test_metadata_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"EML Version Check — test_metadata_version","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_metadata_version(meta) #> ✔ Your EML version is supported."},{"path":"/reference/test_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Examines the Methods section of EML — test_methods","title":"Examines the Methods section of EML — test_methods","text":"test_methods() first extracts methods EML object. methods present, test fails error. methods present, tests asks 1) section longer 20 words? , test fails warning. 2) methods section contain unconventional characters
? , test fails warning. 2) methods section contain additional spaces (two consecuitive spaces)? , test fails warning. tests pass, test whole passes. error warning, users advised use EMLeditor::set_methods() correct problem.","code":""},{"path":"/reference/test_methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Examines the Methods section of EML — test_methods","text":"","code":"test_methods(metadata = load_metadata(directory))"},{"path":"/reference/test_methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Examines the Methods section of EML — test_methods","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_methods.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Examines the Methods section of EML — test_methods","text":"invisible(metadata)","code":""},{"path":"/reference/test_methods.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Examines the Methods section of EML — test_methods","text":"","code":"if (FALSE) { # \\dontrun{ test_methods() } # }"},{"path":"/reference/test_missing_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Looks for undocumented missing data (NAs) — test_missing_data","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"test_missing_data scans data package common missing data (blanks/empty cells NA cell). blanks NAs, test passes. missing data found properly documented (missingValueCode either \"NA\", \"empty\", \"blank\"), test passes. missing data detected properly documented metadata, test fails error. Commonly, R interpret blank cells missing fill NA. pass test, need either delete columns tables missing data (completely blank), add appropriate missing data code metadata creation (corresponding attributes.txt file). fairly simple test checks NA blanks. Although many common missing data codes (-99999, \"Missing\", \"NaN\" etc) anticipate . running test_missing_data() via run_congruence_checks(), default \"detail_level\" used file-level information undocumented missing values reported condense error message output. attempting identify specifically data undocumented missing values, may helpful run test_missing_data() parameter \"detail_level\" set \"columns\". output list columns within file undocumented missing data. important document missing data? user wants use data missing without explanation acknowledgement, user trust data data package complete.","code":""},{"path":"/reference/test_missing_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"","code":"test_missing_data( directory = here::here(), metadata = load_metadata(directory), detail_level = \"files\" )"},{"path":"/reference/test_missing_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. detail_level String. Choose either \"files\" \"columns\". Defaults \"files\".","code":""},{"path":"/reference/test_missing_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_missing_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Looks for undocumented missing data (NAs) — test_missing_data","text":"","code":"if (FALSE) { # \\dontrun{ test_missing_data(directory = here::here(), metadata = load_metadata(directory)) test_missing_data(directory = here::here(), metadata = load_metadata(directory), detail_level = \"columns\") } # }"},{"path":"/reference/test_notes.html","id":null,"dir":"Reference","previous_headings":"","what":"Examines the additionalInfo elment of EML metadata — test_notes","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"test_notes() extracts additionalInfo components EML metadata. elements used populate \"Notes\" section DataStore landing page. Notes section blank, test fails warning. notes section contains non-standard characters (
) two consecutive spaces, test fails warning. Otherwise test passes. warnings, user advised use EMLeditor::set_additional_info() fix additionalInfo section.","code":""},{"path":"/reference/test_notes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"","code":"test_notes(metadata = load_metadata(directory))"},{"path":"/reference/test_notes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_notes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"invisible(metadata)","code":""},{"path":"/reference/test_notes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Examines the additionalInfo elment of EML metadata — test_notes","text":"","code":"if (FALSE) { # \\dontrun{ test_notes() } # }"},{"path":"/reference/test_numeric_fields.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Numeric Fields — test_numeric_fields","title":"Test Numeric Fields — test_numeric_fields","text":"test_numeric_fields() verifies columns listed numeric metadata free non-numeric data. non-numeric data encountered, test fails error.","code":""},{"path":"/reference/test_numeric_fields.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Numeric Fields — test_numeric_fields","text":"","code":"test_numeric_fields( directory = here::here(), metadata = load_metadata(directory) )"},{"path":"/reference/test_numeric_fields.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Numeric Fields — test_numeric_fields","text":"directory directory data file(s) found (.e. data package). Defaults current working directory. exit, returns current working directory. metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_numeric_fields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Numeric Fields — test_numeric_fields","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_numeric_fields.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Numeric Fields — test_numeric_fields","text":"\"NA\" missing data codes documented metadata cause test fail. Note test assumes column types metadata intended types, .e., metadata says column text actually numeric, caught test. hand, metadata indicates text column numeric, function generate error.","code":""},{"path":"/reference/test_numeric_fields.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Numeric Fields — test_numeric_fields","text":"","code":"dir <- DPchecker_example(\"BICY_veg\") #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_numeric_fields(dir) #> ✔ Columns indicated as numeric in metadata contain only numeric values and #> valid missing value codes."},{"path":"/reference/test_orcid_exists.html","id":null,"dir":"Reference","previous_headings":"","what":"Test creators for presence of an ORCiD — test_orcid_exists","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"test_orcid_exists() inspect metadata test creator listed individual person (individualName) creators organizations presence ORCiD. ORCiD found individual creators, test passes. individual creator lacks ORCiD, test fails warning users pointed towards EMLeditor::set_creator_orcids() add ORCiDs choose.","code":""},{"path":"/reference/test_orcid_exists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"","code":"test_orcid_exists(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_exists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_exists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_exists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test creators for presence of an ORCiD — test_orcid_exists","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_exists() } # }"},{"path":"/reference/test_orcid_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for ORCiD formatting (and presence) — test_orcid_format","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"test_orcid_format() inspects metadata looks ORCiDs individual creator (organizations listed creators). individuals correctly formatted ORCiDs (.e 37-character string \"https://orcid.org/xxxx-xxxx-xxxx-xxxx\"), test passes. simple test just looks string length, content. individual improperly formatted ORCiD, test fails error. improperly formatted ORCiDs one ORCiDs missing, test fails warning. Note improperly formatted ORCiDs, test inspect presence/absence individual ORCiDs. full accounting () ORCiDs missing (formatting check), use test_orcid_exists.","code":""},{"path":"/reference/test_orcid_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"","code":"test_orcid_format(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for ORCiD formatting (and presence) — test_orcid_format","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_format() } # }"},{"path":"/reference/test_orcid_match.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"test_orcid_match() evaluate Creators individuals (organizations). ORCiD supplied, function attempt access indicated ORCiD profile test whether last name indicated ORCiD profile matches surName indicated Metadata. surNames match ORCiD profiles, test passes. surName match indicated ORCID profile, test fails error.","code":""},{"path":"/reference/test_orcid_match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"","code":"test_orcid_match(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"Potential reasons failing test include entered wrong ORCiD metadata, improperly formatted ORCiD metadata (listed https://orcid.org/xxxx-xxxx-xxxx-xxxx - see test_orcid_format()), set ORCiD profile \"private\" (case function access name associated profile) differences ORCiD profile name name metadata (maiden vs. married name, transposing given surnames, variation surName spelling).","code":""},{"path":"/reference/test_orcid_match.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests whether metadata creator matches the ORCiD profile — test_orcid_match","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_match() } # }"},{"path":"/reference/test_orcid_resolves.html","id":null,"dir":"Reference","previous_headings":"","what":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"test_orcid_resolves() examine ORCiDs supplied individual Creators (organizations). ORCiD supplied consists URL leads valid ORCiD profile, test passes. ORCiD supplied URL resolves valid ORCiD profile - either ORCiD exist ORCiD supplied incorrect format, test fails error. test examine Creators associated ORCiDs; ORCiDs provided test return pass fail.","code":""},{"path":"/reference/test_orcid_resolves.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"","code":"test_orcid_resolves(metadata = load_metadata(directory))"},{"path":"/reference/test_orcid_resolves.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_orcid_resolves.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"invisibly returns metadata","code":""},{"path":"/reference/test_orcid_resolves.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test whether supplied Creator ORCiDs resolve to a valid ORCiD profile — test_orcid_resolves","text":"","code":"if (FALSE) { # \\dontrun{ test_orcid_resolves() } # }"},{"path":"/reference/test_pii_data_emails.html","id":null,"dir":"Reference","previous_headings":"","what":"Check data files for PII (emails) — test_pii_data_emails","title":"Check data files for PII (emails) — test_pii_data_emails","text":"test_pii_data_emails() tool help identify emails data files (.csv) may constitute Personally Identifiable Information (PII). tool guaranteed find emails, can definitely tell whether email constitutes PII . test_pii_data_emails() reads .csv file specified directory. uses regular expressions extract emails (truth, hard test regex possible emails chance miss one ). emails end anything .gov, function fails warning lists offending files emails contain. emails data files emails data files end .gov, assumed public emails function passes without listing emails.","code":""},{"path":"/reference/test_pii_data_emails.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check data files for PII (emails) — test_pii_data_emails","text":"","code":"test_pii_data_emails(directory = here::here())"},{"path":"/reference/test_pii_data_emails.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check data files for PII (emails) — test_pii_data_emails","text":"directory String. directory data package resides. Defaults current working directory.","code":""},{"path":"/reference/test_pii_data_emails.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check data files for PII (emails) — test_pii_data_emails","text":"String","code":""},{"path":"/reference/test_pii_data_emails.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check data files for PII (emails) — test_pii_data_emails","text":"","code":"if (FALSE) { # \\dontrun{ test_pii_data_emails() } # }"},{"path":"/reference/test_pii_meta_emails.html","id":null,"dir":"Reference","previous_headings":"","what":"Check metadata for PII (emails) — test_pii_meta_emails","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"test_pii_meta_emails() tool help identify emails metadata may constitute Personally Identifiable Information (PII). tool guaranteed find emails, can definitely tell whether email constitutes PII . test_pii_meta_emails() reads *_metadata.xml file specified directory. uses regular expressions extract emails (truth, hard test regex possible emails chance miss one ). emails metadata, function fails warning (probably email contact somewhere metadata). emails end anything .gov, function fails warning lists offending emails. emails metadata end .gov, assumed public emails function passes without listing emails.","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"","code":"test_pii_meta_emails(directory = here::here())"},{"path":"/reference/test_pii_meta_emails.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"directory String. directory metadata file resides. Defaults current working directory.","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"invisible(metadata)","code":""},{"path":"/reference/test_pii_meta_emails.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check metadata for PII (emails) — test_pii_meta_emails","text":"","code":"if (FALSE) { # \\dontrun{ test_pii_meta_emails() } # }"},{"path":"/reference/test_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for a DataStore project — test_project","title":"Test for a DataStore project — test_project","text":"Test DataStore project","code":""},{"path":"/reference/test_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for a DataStore project — test_project","text":"","code":"test_project(metadata = load_metadata(directory))"},{"path":"/reference/test_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for a DataStore project — test_project","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for a DataStore project — test_project","text":"invisible(metadata)","code":""},{"path":"/reference/test_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for a DataStore project — test_project","text":"","code":"if (FALSE) { # \\dontrun{ test_project() } # }"},{"path":"/reference/test_public_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Test for public GPS point coordinates — test_public_points","title":"Test for public GPS point coordinates — test_public_points","text":"test_public_points() look GPS point coordinates metadata, data package public warn users potentially publishing confidential unclassified information (CUI). Specifically, GPS points identified, function passes. CUI dissemination code set \"PUBLIC\" GPS points identified, function passes. CUI dissemination code set \"PUBLIC\" GPS points identified, function fail warning. CUI dissemination code detected, function fails error.","code":""},{"path":"/reference/test_public_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test for public GPS point coordinates — test_public_points","text":"","code":"test_public_points(metadata = load_metadata(directory))"},{"path":"/reference/test_public_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test for public GPS point coordinates — test_public_points","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_public_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test for public GPS point coordinates — test_public_points","text":"invisible(metadata)","code":""},{"path":"/reference/test_public_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test for public GPS point coordinates — test_public_points","text":"contents metadata public even data restricted. means GPS coordinates (common type data must redacted fuzzed can made public) exist metadata, GPS coordinates publicly available. function warn people potentiality. function flag GPS points (bounding boxes polygons shapes). function checks GPS points geographicCoverage element.","code":""},{"path":"/reference/test_public_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test for public GPS point coordinates — test_public_points","text":"","code":"if (FALSE) { # \\dontrun{ test_public_points() } # }"},{"path":"/reference/test_publisher.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Publisher — test_publisher","title":"Check for Publisher — test_publisher","text":"test_publisher() checks publisher information present metadata, option require valid NPS publisher information. publisher information present, test passes. publisher information absent, test fails error. require_nps set TRUE (defaults FALSE), test also ensure valid NPS publisher information present. case, even publisher element present, test fail error unless publisher NPS (publisher fields exactly match expected information NPS data packages).","code":""},{"path":"/reference/test_publisher.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Publisher — test_publisher","text":"","code":"test_publisher(metadata = load_metadata(directory), require_nps = FALSE)"},{"path":"/reference/test_publisher.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Publisher — test_publisher","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory. require_nps TRUE, throw error publisher information correct NPS published data.","code":""},{"path":"/reference/test_publisher.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Publisher — test_publisher","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_publisher.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Publisher — test_publisher","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_publisher(meta) #> ✔ Metadata contains publisher element."},{"path":"/reference/test_publisher_city.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML metadata for publisher city — test_publisher_city","title":"Test EML metadata for publisher city — test_publisher_city","text":"test_publisher_city() inspects publisher address EML metadata. fails error city element empty. fails warning \"Fort Collins\". test passes \"Fort Collins\"","code":""},{"path":"/reference/test_publisher_city.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML metadata for publisher city — test_publisher_city","text":"","code":"test_publisher_city(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_city.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML metadata for publisher city — test_publisher_city","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_city.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML metadata for publisher city — test_publisher_city","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_city.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML metadata for publisher city — test_publisher_city","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_city() } # }"},{"path":"/reference/test_publisher_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests EML metadata for the publisher name — test_publisher_name","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"Tests EML metadata publisher name","code":""},{"path":"/reference/test_publisher_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"","code":"test_publisher_name(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_name.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"test_publisher_name() test presence data package publisher name. fails error publisher name missing, fails warning publisher name \"National Park Service\" (expected rare). Passes test publisher name \"National Park Service\"","code":""},{"path":"/reference/test_publisher_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests EML metadata for the publisher name — test_publisher_name","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_name() } # }"},{"path":"/reference/test_publisher_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Test EML metadata for publisher state — test_publisher_state","title":"Test EML metadata for publisher state — test_publisher_state","text":"test_publisher_state() inspects publisher address EML metadata. test faisl error administrativeArea (state) element empty. test fails warning \"CO\" (, expected exceedingly rare). test passes \"CO\".","code":""},{"path":"/reference/test_publisher_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test EML metadata for publisher state — test_publisher_state","text":"","code":"test_publisher_state(metadata = load_metadata(directory))"},{"path":"/reference/test_publisher_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test EML metadata for publisher state — test_publisher_state","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_publisher_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test EML metadata for publisher state — test_publisher_state","text":"invisibly returns metadata","code":""},{"path":"/reference/test_publisher_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test EML metadata for publisher state — test_publisher_state","text":"","code":"if (FALSE) { # \\dontrun{ test_publisher_state() } # }"},{"path":"/reference/test_pub_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Test publication date presence and ISO-8601 formatting — test_pub_date","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"test_pub_date() tests presence ISO-8601 formatting publication date. Also tests whether publication date within reasonable bounds; .e. date prior beginning data package Reference Type (2022) future year. publication date missing improperly formatted, test fails error. publication date outside reasonable range, test fails warning. Otherwiset test passes.","code":""},{"path":"/reference/test_pub_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"","code":"test_pub_date(metadata = load_metadata(directory))"},{"path":"/reference/test_pub_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_pub_date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"invisibly returns metadata","code":""},{"path":"/reference/test_pub_date.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test publication date presence and ISO-8601 formatting — test_pub_date","text":"","code":"if (FALSE) { # \\dontrun{ meta <- load_metadata(DPchecker_example(\"BICY_Veg\")) test_pub_date(meta) } # }"},{"path":"/reference/test_storage_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests for attribute storage type — test_storage_type","title":"Tests for attribute storage type — test_storage_type","text":"test_storage_type() checks see number attributes (attributeName) storageTypes metadata. Equal numbers elements pass; unequal numbers fail test error. test_storage_type() attempt verify number storageType elements matches number columns data package data files (functionality, use test_fields_match()). test_storage_type() also verifies storageType valid; .e. member accepted list possible storage types. Currently : string, float, date, factor, dateTime, characters. Validity test based solely observed ezEML/EAL output (theory string storageType schema-valid). Invalid storageTypes result warning. test_storage_type() attempt verify value storageType logically matches type data corresponding column.","code":""},{"path":"/reference/test_storage_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests for attribute storage type — test_storage_type","text":"","code":"test_storage_type(metadata = load_metadata(directory))"},{"path":"/reference/test_storage_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests for attribute storage type — test_storage_type","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_storage_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests for attribute storage type — test_storage_type","text":"invisibly returns metadata","code":""},{"path":"/reference/test_storage_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests for attribute storage type — test_storage_type","text":"","code":"if (FALSE) { # \\dontrun{ test_storage_type() } # }"},{"path":"/reference/test_taxonomic_cov.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Taxonomic Coverage test — test_taxonomic_cov","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"'test_taxnomomic_cov()` checks whether taxonomic coverage element present metadata. perform validation taxonomic coverage information. taxonomic coverage present, test passes. absent, test fails warning.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"","code":"test_taxonomic_cov(metadata = load_metadata(directory))"},{"path":"/reference/test_taxonomic_cov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_taxonomic_cov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Taxonomic Coverage test — test_taxonomic_cov","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_taxonomic_cov(meta) #> ✔ Metadata contains taxonomic coverage element."},{"path":"/reference/test_validate_schema.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate Metadata Schema — test_validate_schema","title":"Validate Metadata Schema — test_validate_schema","text":"test_validate_schema() inspects metadata object loaded R determines whether schema-valid. test fails, functio produces error message.","code":""},{"path":"/reference/test_validate_schema.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate Metadata Schema — test_validate_schema","text":"","code":"test_validate_schema(metadata = load_metadata(here::here()))"},{"path":"/reference/test_validate_schema.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate Metadata Schema — test_validate_schema","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_validate_schema.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate Metadata Schema — test_validate_schema","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_validate_schema.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate Metadata Schema — test_validate_schema","text":"currently, EML supported. now just wrapper form EML::eml_validate().","code":""},{"path":"/reference/test_validate_schema.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate Metadata Schema — test_validate_schema","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_validate_schema(meta) #> ✔ Your metadata is schema valid."},{"path":"/reference/test_valid_fieldnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Field Names for Invalid Characters — test_valid_fieldnames","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"test_valid_fieldnames() checks field names (e.g data column names) metadata contain invalid special characters. underscores alphanumeric characters permitted, names must begin letter. invalid column names exist, test fail warning, otherwise test passes.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"","code":"test_valid_fieldnames(metadata = load_metadata(here::here()))"},{"path":"/reference/test_valid_fieldnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"run test_fields_match() run function, since function checks field names metadata.","code":""},{"path":"/reference/test_valid_fieldnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test Field Names for Invalid Characters — test_valid_fieldnames","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_valid_fieldnames(meta) #> ✔ Field names begin with a letter and do not contain spaces or special #> characters."},{"path":"/reference/test_valid_filenames.html","id":null,"dir":"Reference","previous_headings":"","what":"Test File Names for Invalid Characters — test_valid_filenames","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"test_valid_filenames() checks file names metadata contain invalid special characters. underscores, hyphens, alphanumeric characters permitted, names must begin letter. Currently, invalid filenames result test failing warning, otherwise test passes.","code":""},{"path":"/reference/test_valid_filenames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"","code":"test_valid_filenames(metadata = load_metadata(here::here()))"},{"path":"/reference/test_valid_filenames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"metadata metadata object returned load_metadata. parameter provided, defaults calling load_metadata current project directory.","code":""},{"path":"/reference/test_valid_filenames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"Invisibly returns metadata.","code":""},{"path":"/reference/test_valid_filenames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"run test_file_name_match() run function, since function checks file names metadata.","code":""},{"path":"/reference/test_valid_filenames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test File Names for Invalid Characters — test_valid_filenames","text":"","code":"meta <- load_metadata(DPchecker_example(\"BICY_veg\")) #> Data are provided for example use only. Do not assume that they are complete, accurate, or up to date. test_valid_filenames(meta) #> ✔ File names begin with a letter and do not contain spaces or special #> characters."},{"path":[]},{"path":"/news/index.html","id":"id_2024-0-3-5","dir":"Changelog","previous_headings":"","what":"2024-011-05","title":"DPchecker 0.3.5 (develoment version)","text":"Bugfix test_storage_type() data packages built ezEML 1 .csv file. Add test_project() function test DataStore projects. Add unit tests optional eml elements Update documentation reflect new test_project() function.","code":""},{"path":"/news/index.html","id":"dpchecker-034","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.4","title":"DPchecker 0.3.4","text":"2024-07-29 * Update license CC0 * Bug fix test_missing_data() 2024-06-24 * Fixed bug test_missing_data() order files listed metadata match order files produced list.files() function evaluate wrong file produce inadvertent unhelpful errors. 2024-02-05 * Fix bug test_date_range() adding UTC temporalCoverage * test_missing_data() now also handles missing data codes “blank” “empty”. * Update test_missing_data() default flag whole files, column undocumented missing data. condenses error output running run_congruence_checks(). trouble shooting attempting pinpoint data lack missing values, test_missing_data() can run parameter detail_level = “columns”. 2024-01-26 * Bugfixes test_dates_parse() test_date_range(): now ignore files times dates date times. * Bugfixes test_valid_fieldnames(), test_valid_filenames(), test_numeric_fields(), test_dates_parse(), test_date_range() - bug; must something deep dependency chain changed. * Bugfix attempt test_fields_match() reportedly needs testing * Add function test_missing_data() scans data NAs documented metadata","code":""},{"path":"/news/index.html","id":"dpchecker-033","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.3","title":"DPchecker 0.3.3","text":"Bug fixes test_date_range() test_dates_parse(). Adjusted test_datatable_urls() test_datatable_urls_doi() work properly data table urls present metadata. Move convert_datetime_format QCkit; add QCkit re-export DPchecker Updated tabular_data_congruence.R speed stability per codefactor suggests","code":""},{"path":"/news/index.html","id":"dpchecker-032","dir":"Changelog","previous_headings":"","what":"DPchecker 0.3.2","title":"DPchecker 0.3.2","text":"Adjusted test_date_range() can handle data columns contain dates times. Times truncated midnight data collected first day indicated considered “range” data collected last day indicated considered “range”. Added test_public_points() list functions DPchecker.Rmd file. Added test_public_points() list functions run run_congruence_checks(). Added test_public_points() function test whether metadata contains GPS coordinates package public. Added test_keywords() list function DPchecker.Rmd file. Added test_keywords() list functions run run_congruence_checks(). Added new function, test_keywords() test presence keywords metadata; something required EML extraction DataStore. Updated test_valid_filenames() accept filenames hyphens (addition filenames alpha-numerics underscore). Filenames still must start letter. Added test_dates_parse() function list functions DPchecker.Rmd file. Added test_dates_parse() function list functions run function run_congruence_checks() called. Added function test_dates_parse() test whether date formats supplied metadata match values supplied data files. Added NEWS.md file track changes DPchecker R package.","code":""}]