knitr::opts_chunk$set(results='asis', echo=FALSE, warning=FALSE, message = FALSE) # needed for trouble shooting boo_DEBUG <- FALSE if(boo_DEBUG==TRUE){ # myConfig <- file.path(system.file(package="ContDataQC"), "extdata", "config.ORIG.R") # source(myConfig) }## IF ~ boo_DEBUG ~ END
MassIBItools was developed to calculate benthic macroinvertebrate metrics and Indices of Biotic Integrity (IBI) for wadeable, freshwater, perennial streams in Massachusetts. Detailed documentation of IBI development can be downloaded here. Users can run any data through the IBI calculator and get a result. However, if samples do not meet the criteria listed on the Background page, results should be interpreted with caution.
The Instructions are divided into three sections: 1) preparing the input file; 2) app operation; and 3) frequently asked questions (FAQ). Links to an example input file and a document containing more detailed information on preparing the input file are also provided.
This app was developed by Ben Block from Tetra Tech, Inc. (Ben.Block@tetratech.com), with underlying R code written by Ben Block and Erik Leppo (Erik.Leppo@tetratech.com). Please contact Ben Block should any issues or questions arise.
Tetra Tech, Inc. developed the MassIBItools shiny app for the Massachusetts Department of Environmental Protection (MassDEP). It allows MassDEP and their partners to calculate IBI scores for benthic macroinvertebrate samples. The new IBIs will improve MassDEP’s diagnostic ability to identify degradation in biological integrity and water quality. The app is streamlined and easy to operate, and only requires an input dataset to function. Shiny apps are interactive web applications that serve as graphical user interfaces. They are linked to R, which is an open source programming language and software environment for statistical computing.
MassIBItools requires input files to be in a tabular format, saved as either comma-separated values (CSV) (most commonly used) or tab-separated (.txt or .tsv) files. Table 1 contains a list of required fields. Column names must be capitalized and match the spelling and symbology exactly as shown (some column headings have underscores).
Click here to view an EXAMPLE INPUT FILE.
If you are unsure how to download a data file from GitHub, watch this short video or contact Ben Block (ben.block@tetratech.com).
It is important that the input data be prepared in a way that is consistent with how the data were prepared for calibration of the IBIs. For example, if you use a different level of taxonomic resolution (family vs. species-level) or trait assignments differ (e.g., Functional Feeding Groups do not match), this will affect the results. To ensure consistency, perform the following steps when preparing your input file:
You are now ready to run your file through the IBI calculator!
library(readxl) library(knitr) library(kableExtra) # state directories table.dir <- "tables" table.file <- "Instruction_Tables.xlsx" tab1.dir <- "Instr_table2" table1 <- read_excel(file.path(table.dir, table.file), sheet = tab1.dir , na = c("NA", ""), trim_ws = TRUE, skip = 0 , col_names = TRUE) # kable(table1) table1 %>% kbl() %>% kable_styling(full_width = F, position = "left")
Once open, the user will see the IBI calculator interface. The user should follow the onscreen instructions as follows:
Load file
Calculate IBI
Download results
Use interactive map and plots for data exploration
Why am I getting an error saying that I am missing columns even when I am not?
Why does my data look strange in the data viewer?
The IBI calculation is taking forever to calculate, has the app frozen?
Why is there no map shown in the “Sites and Scores Map” tab?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.