-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
85 lines (49 loc) · 3.42 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# IRsupportR
<!-- badges: start -->
<!-- badges: end -->
The objective of this package is to compile and evaluate historic water quality data to verify if the data supports impairments attributed to toxics. In order to accomplish this objective, data from various datasets are compiled and processed into one consistent dataset for comparing to numeric water quality criteria. Exceedances of the water quality criteria are determined and categorization reevaluation decisions are proposed based on the implementation of an approved decision logic.
## Installation
You can install the development version of IRsupportR from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("LimnoTech/IRsupportR")
```
The repository can also be downloaded as a zip file by clicking on the green 'code' dropdown button.
## Using the Package
This package contains several functions that encompass the analysis for reevaluating toxic impairments in District of Columbia waterbodies.
### Data Processing
The original formatted data used for this analysis can be found in the [data-raw](https://github.com/LimnoTech/IRsupportR/tree/main/data-raw/formatted_data) folder. Data was compiled for seven different datasets and formatting was standardized across the datasets. The [all_processed_data.R](https://github.com/LimnoTech/IRsupportR/blob/main/data-raw/all_processed_data.R) script is used to further process the data. The final output of the script is saved as all_processed_data.rda in the [data](https://github.com/LimnoTech/IRsupportR/tree/main/data) folder.
### Lookup Tables
In addition to the input data, the [data](https://github.com/LimnoTech/IRsupportR/tree/main/data) folder contains various lookup tables used throughout the analysis. The package utilizes the .rda files. For ease of reference, .xlsx files have also been included for each lookup table.
### Data Analysis
The steps for the data analysis can be found in the [worflow.R](https://github.com/LimnoTech/IRsupportR/blob/main/workflow.r) file. Source the contents of this document to complete the analysis. Functions are run to evaluate criteria, perform summary statistics, execute decision logic, and compile results tables.
### Outputs
Multiple tables and spreadsheets are produced from the analysis and saved in the [output](https://github.com/LimnoTech/IRsupportR/tree/main/output) folder. They include the following:
- Intermediate results with criteria evaluated
- criteria_results.csv
- Final results as CSVs
- results\_class_c.csv
- results\_class_d.csv
- Final results with merged cell formatting. Excel files required for merged cells. Csv files used for dataset parts with no merged cells
- Class C
- results\_class_c\_merge_part1.xlsx
- results\_class_c\_merge_part2.xlsx
- results\_class_c\_merge_part3.csv
- Class D
- results\_class_d\_merge_part1.xlsx
- results\_class_d\_merge_part2.csv
- Final results as combined Excel spreadsheets. Includes merged cell formatting. Combined manually
- merge_parts_manual/results\_class_c\_merged_all.xlsx
- merge_parts_manual/results\_class_d\_merged_all.xlsx