Split the toxics_analysis_thru_2012.R code into four separate files to improve readability. They are functionally separated with 01 representing data retrieval and aggregation, 02 are data summary, 03 is hardness and metals evaluation and 04 is criteria and benchmark evaluation for everything else.
In hardness_eval_functions added option to remove Chromium (III) criteria calculations in favor of the Chromium (VI) criteria. Added stringr to packages loaded in criteria.R. Added some test code to evaluate metals in the All_Parameter_Analysis instead of in a separate effort. Added metals with criteria to dataframe used for summaries in data_summaries file. Had issue with willy.metals date as read in by read.xlsx2. Changed it to read.xlsx which read the dates right but added a weird character to the microgram symbol so just updating the renaming to include that. Not represented here in this commit since the file is not in this folder. I added hardness data to the willy metals dataset.
Built new function hardness.crit.calc which plugs generates a dataframe with the hardness based criteria calculated and included in the output. Fixed import of willy metals using read.xlsx weird handling of the micro symbol. NOTE: NEED TO FIX DDTs. Fleshed out All Parameter analysis to include metals and hardness based metals. In process of building out pretty outputs for use in excel.
Added separate set of code to include all void and cancelled results for raw data table output. Cleaned up code for adding in the benchmark comparison columns. Changed Table 20 to Table 30 references in all places. Made name for Table 30 consistent everywhere it occurs.
Missed this in the last commit. Added Exceed to column headers for this data frame.
Organized and added comments to the data compilation file and the All Parameter Analysis file. Fixed the order of operations for the data compilation so the complete dataset export actually includes all data and not just A and B as it was before. I also completed data flow diagrams for each of these data files.
Built out the basin summaries to match the output from Kara's earlier basin summary tables.
Added code in 01 to output lasar data compilation for use as import in the future to simplify the code. Added code in 02 to run data summaries on complete dataset and not just on data without new methods. Added saltwater criteria to data flow diagram for 03. Added comments to 03 to clarify the basin summary outputs.In criteria, updated table 20 references to say table 30.
Added example output of multiple results for a single sample and method. This is a problem that requires getting to the work orders to investigate further.