Skip to content

Commit 82bdafa

Browse files
authored
Merge pull request nationalparkservice#73 from RobLBaker/master
update DRR documentation
2 parents cfa5a88 + 2c9d05f commit 82bdafa

File tree

6 files changed

+160
-99
lines changed

6 files changed

+160
-99
lines changed

docs/articles/Starting-a-DRR.html

Lines changed: 29 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/Using-the-DRR-Template.html

Lines changed: 50 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ articles:
55
DRR_Purpose_and_Scope: DRR_Purpose_and_Scope.html
66
Starting-a-DRR: Starting-a-DRR.html
77
Using-the-DRR-Template: Using-the-DRR-Template.html
8-
last_built: 2024-02-09T20:53Z
8+
last_built: 2024-02-12T21:24Z
99

inst/rmarkdown/templates/NPS_DRR/skeleton/skeleton.Rmd

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Specific Instructions on filling out this template:
2121
https://nationalparkservice.github.io/QCkit/articles/Using-the-DRR-Template.html
2222
--->
2323
```
24-
2524
```{r user_edited_parameterss, include=FALSE}
2625
# The title of your DRR. Should all DRR start with "Data Release Report:"? Should we enforce titles specifically referencing the data package(s) the Report is about?
2726
title <- "DRR Title"
@@ -308,7 +307,7 @@ The Data Records section should be used to explain each data record associated w
308307

309308
This DRR describes the data package *`r dataPackageTitle`* which contains a metadata file and `r length(dataPackage_fileNames)` data files. These data were compiled and processed for dissemination by the National Park Service Inventory and Monitoring Division (IMD) and are available at `r dataPackageDOI` (see Table 1).
310309

311-
```{r FileTable, echo=FALSE}
310+
```{r file_table, echo=FALSE}
312311
filelist <- data.frame(dataPackage_fileNames, dataPackage_fileSizes, dataPackage_fileDescript)
313312
314313
knitr::kable(filelist, caption = paste0("**Table 1. ", dataPackageTitle, ": List of data files.**"), col.names = c("**File Name**", "**Size**", "**Description**"), format = "pandoc")
@@ -324,31 +323,37 @@ The Data Quality Evaluation section should present any analyses that are needed
324323

325324
*Required Table*
326325

327-
```{r dataAcceptanceCriteria, echo=FALSE, eval=TRUE}
326+
```{r data_acceptance_criteria, echo = FALSE, eval = TRUE}
328327
# To turn off, set eval=FALSE.
329328
# Generates a table of acceptance criteria for each of the data quality fields in your data package. Mitigations taken when data did not meet the acceptance criteria should be described textually in the Data Quality Evaluation section.
330329
331-
# Specify which columns in your data package are data quality fields in the dataQualityFields variable. In the example below, data quality fields/columns in the data package are listed in the format [FieldName]_flag. These data quality fields relate to the respective temporal, taxonomic, and geographic data.
330+
# Specify which columns in your data package are data quality fields in the data_quality_fields variable. In the example below, data quality fields/columns in the data package are listed in the format [FieldName]_flag. These data quality fields relate to the respective temporal, taxonomic, and geographic data.
332331
333-
dataQualityFields <- c(
332+
data_quality_fields <- c(
334333
"eventDate_flag",
335334
"scientificName_flag",
336335
"coordinate_flag"
337336
)
338337
339338
# Brief description of the acceptance criteria for each respective data quality field. The order of the acceptance criteria must match the order of the data quality fields.
340339
341-
dataQualityAcceptanceCriteria <- c(
340+
data_quality_acceptance_criteria <- c(
342341
"Sampling event date within the start and end dates of the project",
343342
"Taxon exists within Integrated Taxonomic Information System and GBIF",
344343
"Sampling location is within the park unit boundaries"
345344
)
346345
347-
data_criteria<-data.frame(dataQualityFields = str_remove(dataQualityFields, "_flag"), dataQualityAcceptanceCriteria)
346+
data_criteria <- data.frame(data_quality_fields =
347+
str_remove(data_quality_fields, "_flag"),
348+
data_quality_acceptance_criteria)
348349
349350
data_criteria %>%
350351
NMFSReports::format_cells(1:3, 1, "bold") %>%
351-
knitr::kable(caption = "**Table 2. Acceptance criteria for data evaluated.**", col.names=c("**Field**", "**Acceptance Criteria**"), format="pandoc", align = 'c')
352+
knitr::kable(caption = "**Table 2. Acceptance criteria for data evaluated.**",
353+
col.names=c("**Field**",
354+
"**Acceptance Criteria**"),
355+
format="pandoc",
356+
align = 'c')
352357
353358
```
354359

@@ -357,7 +362,9 @@ data_criteria %>%
357362
# Generates a table summarizing QC at the column level within each file. All flagged columns are included. To add additional non-flagged columns, specify them with column names: cols=("my_unflagged_data1", "my_unflagged_data2)" or numbers: cols=c(1:4). All non-missing data in unflagged columns is assumed accepted. If a file has no flagged columns and no specified custom columns, all values for that data file will be listed as "NA".
358363
359364
#set directory to the location of your data package:
360-
dc_flags <- QCkit::get_custom_flags(here::here("Untitled", "BICY_Example"), output="columns")
365+
dc_flags <- QCkit::get_custom_flags(here::here("Untitled",
366+
"BICY_Example"),
367+
output="columns")
361368
dc_flags$`File Name` <- gsub(".csv", "", dc_flags$`File Name`)
362369
363370
@@ -554,7 +561,7 @@ United States Geologic Survey (USGS). 2016. BioData - Aquatic Bioassessment Data
554561

555562
In most cases, Code listing is not required. If all QA/QC and data manipulations were performed elsewhere, you should cite that code in the methods (and leave the "Listing" code chunk as the default settings: eval=FALSE and echo=FALSE). If you have developed custom scripts, you can add those to DataStore with the reference type "Script" and cite them in the DRR. Some people have developed code to perform QA/QC or data manipulation within the DRR itself. In that case, you must set the "Listing" code chunk to eval=TRUE and echo=TRUE to fully document the QA/QC process.
556563

557-
```{r Listing, ref.label=knitr::all_labels(), echo=TRUE, eval=TRUE}
564+
```{r listing, ref.label=knitr::all_labels(), echo=TRUE, eval=TRUE}
558565
559566
```
560567

@@ -564,7 +571,7 @@ In most cases, Code listing is not required. If all QA/QC and data manipulations
564571

565572
In most cases you do not need to report session info (leave the "session-info" code chunk parameters in their default state: eval=FALSE). Session and version information is only necessary if you have set the "Listing" code chunk to eval=TRUE in appendix A. In that case, change the "session-info" code chunk parameters to eval=TRUE.
566573

567-
```{r session-info, eval=TRUE, echo=FALSE, cache=FALSE}
574+
```{r session_info, eval=TRUE, echo=FALSE, cache=FALSE}
568575
sessionInfo()
569576
Sys.time()
570577
```

0 commit comments

Comments
 (0)