Skip to content

Commit 50f9597

Browse files
committed
Revise dumpsite and trash scores with updated RSA point spreadsheet
Updated spreadsheet is in the previous commit
1 parent 7d04315 commit 50f9597

File tree

6 files changed

+54
-39
lines changed

6 files changed

+54
-39
lines changed

R/trash.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ assess_trash <- function(df_reach, reach_prefix_from_table, reach_prefix_from_la
2323
id = dplyr::all_of(paste0(reach_prefix_from_table, ".featureGlobalID_key")),
2424
date = dplyr::all_of(paste0(reach_prefix_from_table, ".assessment_time")),
2525
trash_extent = dplyr::all_of(paste0(reach_prefix_from_table, ".trash_extent"))) %>%
26-
dplyr::filter(date >= start_date & date <= end_date) %>%
27-
dplyr::group_by(id) %>%
28-
dplyr::slice_max(date, n=1, with_ties = FALSE) %>% # Remove duplicate reaches. Keep most recent reach assessment. If same date/time and ID, maintain only one record
29-
dplyr::ungroup() %>%
3026
dplyr::left_join(trash_score, by = "trash_extent") %>%
3127
dplyr::left_join(location_name, by = "location_name") %>%
32-
dplyr::filter(!is.na(trash_extent)) # Remove data records with no trash extent entry
28+
dplyr::filter(!is.na(trash_extent)) %>% # Remove data records with no trash extent entry
29+
dplyr::arrange(score) %>% # Arrange assessments by score so When removing duplicates, if there are duplicate reaches with the same time, choose the lowest score to be more conservative
30+
dplyr::group_by(id) %>%
31+
dplyr::slice_max(date, n=1, with_ties = FALSE) %>% # Remove duplicate reaches. Keep most recent reach assessment. If same date/time and ID, maintain only one record
32+
dplyr::ungroup()
3333

3434

3535
df_score <- df_summary %>%

data/StreamPoints_20231002_INT.xlsx

-418 KB
Binary file not shown.

data/StreamReaches_20231002_INT.xlsx

-402 KB
Binary file not shown.

output/all_scores.csv

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
"","sci_subshed","Dumpsites","Effective Impervious Area","Temperature, water","pH","Dissolved oxygen (DO)","Escherichia coli","Turbidity","Conductivity","Nitrogen","Phosphorus, Total (as P)","Connectivity","Fish","Habitat","Macroinvertebrates"
2-
"1","Broad Branch",7,2,10,9.49484604605374,10,3.96201632162848,10,1.39551171022171,2.53189561427939,10,10,2,4,6
3-
"2","Fort Davis Tributary",1,2,10,10,10,4.56378937695466,3.40381314529514,1.28521704525446,0.950005376536892,1.78543632558786,1,1,5,5
4-
"3","Fort Dupont Tributary",2,8,10,10,8.19644566724721,4.39637929649141,3.667361623274,2.99612324159937,0.749069894299005,10,1,3,4,6
5-
"4","Fort Stanton Tributary",4,1,9.49458887028815,10,10,3.49306972579195,8.24161710963122,2.14961627380251,0.950005376536892,10,1,1,3,7
6-
"5","Normanstone Creek",4,1,10,8.9888961180284,10,4.46891175504634,10,1.49230558316491,2.58568816872641,10,10,3,3,6
7-
"6","Oxon Run",8,1,9.49482509665549,10,10,4.08034192298863,7.26446748330366,2.73668115439965,0.677223449104501,0.963293817107756,10,4,4,4
8-
"7","Pinehurst Branch",7,6,10,9.45561327204199,10,6.86529198320573,10,1.64381726305677,2.53189561427939,10,10,2,4,5
9-
"8","Rock Creek",7,1,9.03991429859265,9.63931584712039,10,4.75298766520739,8.85351874858907,3.01758638876789,2.35646823207748,10,10,5,4,5
10-
"9","Watts Branch",5,1,9.32024027311975,9.03799489304956,9.94283156569335,3.52383649640539,8.10990235278729,2.71307679688268,0.80598894736693,4.92721388547487,10,4,3,6
11-
"10","Battery Kemble Creek",10,6,10,10,10,7.17122657287291,10,1.32946707229891,1.1722461961956,10,10,3,4,7
12-
"11","Dalecarlia Tributary",10,4,9.49281310022025,9.49429215204554,10,2.26543812278347,7.88130147148155,1.57723215112077,1.64140564675688,1.50035060003774,1,2,3,6
13-
"12","Dumbarton Oaks",10,4,10,10,10,8.54782802837774,10,1.70833294620897,1.32807710704536,2.8679579947462,10,3,5,7
14-
"13","Foundry Branch",10,2,10,10,10,5.43588122762784,4.44089503244838,2.9615349603606,2.05698424129608,10,1,1,4,NA
15-
"14","Fort Chaplin Tributary",10,2,10,10,9.44055926057385,3.66863632512962,8.77121712686461,2.01955422326341,1.09628813677057,10,1,1,4,3
16-
"15","Fenwick Branch",10,3,9.49476657878656,10,10,6.8791964501452,10,1.75285115573104,2.32427732195356,10,10,2,3,6
17-
"16","Hickey Run",10,9,9.32570696570447,10,9.31006357105735,1.71733915151806,7.52739827502453,1.92353016456839,0.749069894299005,2.7927191991411,10,6,2,4
18-
"17","Klingle Valley Run",10,2,10,10,10,6.5392010054142,10,2.16336911176854,1.52948677601239,10,10,2,3,6
19-
"18","Luzon Branch",10,1,10,10,10,2.74149789121648,5.16856938057974,1.68139016788936,2.13654818496565,2.91985046082419,10,2,3,6
20-
"19","Reservation 630",10,3,9.49484222518253,10,10,4.89875662885154,6.54810880322023,1.95694969141548,2.32427732195356,10,10,4,7,7
21-
"20","Nash Run",10,3,8.97058038494947,9.49162145959481,10,2.85130675778872,8.98648127446675,3.13741218623777,1.09628813677057,10,10,6,5,4
22-
"21","Pope Branch",10,3,10,10,10,6.70307871860358,4.63848137391428,2.04750999680075,0.950005376536892,10,1,4,6,8
23-
"22","Portal Branch",10,3,10,8.98692894850945,10,4.24400479220216,6.90674993457207,1.02448007263146,2.74453544775747,10,10,1,3,6
24-
"23","Piney Branch",10,1,10,10,10,6.24485935433058,10,1.37920467622303,2.43350524767764,10,10,3,2,4
25-
"24","Soapstone Creek",10,1,10,8.98764540312439,10,6.80566463860387,10,1.91408087817814,2.53189561427939,2.88434296861746,10,2,3,6
26-
"25","Texas Avenue Tributary",10,3,10,10,10,3.54658539291944,7.3375495518317,1.74050116850977,0.837784090876652,10,1,1,5,3
1+
"","sci_subshed","Trash","Dumpsites","Effective Impervious Area","Temperature, water","pH","Dissolved oxygen (DO)","Escherichia coli","Turbidity","Conductivity","Nitrogen","Phosphorus, Total (as P)","Connectivity","Fish","Habitat","Macroinvertebrates"
2+
"1","Battery Kemble Creek",8.375,10,6,10,10,10,7.17122657287291,10,1.32946707229891,1.1722461961956,10,10,3,4,7
3+
"2","Broad Branch",8.64516129032258,7,2,10,9.49484604605374,10,3.96201632162848,10,1.39551171022171,2.53189561427939,10,10,2,4,6
4+
"3","Dalecarlia Tributary",9.25,10,4,9.49281310022025,9.49429215204554,10,2.26543812278347,7.88130147148155,1.57723215112077,1.64140564675688,1.50035060003774,1,2,3,6
5+
"4","Dumbarton Oaks",7.75,10,4,10,10,10,8.54782802837774,10,1.70833294620897,1.32807710704536,2.8679579947462,10,3,5,7
6+
"5","Fenwick Branch",7.42857142857143,10,3,9.49476657878656,10,10,6.8791964501452,10,1.75285115573104,2.32427732195356,10,10,2,3,6
7+
"6","Fort Chaplin Tributary",2.5,10,2,10,10,9.44055926057385,3.66863632512962,8.77121712686461,2.01955422326341,1.09628813677057,10,1,1,4,3
8+
"7","Fort Davis Tributary",7.27272727272727,1,2,10,10,10,4.56378937695466,3.40381314529514,1.28521704525446,0.950005376536892,1.78543632558786,1,1,5,5
9+
"8","Fort Dupont Tributary",7.51063829787234,2,8,10,10,8.19644566724721,4.39637929649141,3.667361623274,2.99612324159937,0.749069894299005,10,1,3,4,6
10+
"9","Fort Stanton Tributary",6.57142857142857,4,1,9.49458887028815,10,10,3.49306972579195,8.24161710963122,2.14961627380251,0.950005376536892,10,1,1,3,7
11+
"10","Foundry Branch",8.91803278688525,10,2,10,10,10,5.43588122762784,4.44089503244838,2.9615349603606,2.05698424129608,10,1,1,4,NA
12+
"11","Hickey Run",8.03846153846154,10,9,9.32570696570447,10,9.31006357105735,1.71733915151806,7.52739827502453,1.92353016456839,0.749069894299005,2.7927191991411,10,6,2,4
13+
"12","Klingle Valley Run",7.4,10,2,10,10,10,6.5392010054142,10,2.16336911176854,1.52948677601239,10,10,2,3,6
14+
"13","Luzon Branch",5.2,10,1,10,10,10,2.74149789121648,5.16856938057974,1.68139016788936,2.13654818496565,2.91985046082419,10,2,3,6
15+
"14","Nash Run",7.6,10,3,8.97058038494947,9.49162145959481,10,2.85130675778872,8.98648127446675,3.13741218623777,1.09628813677057,10,10,6,5,4
16+
"15","Normanstone Creek",7.35294117647059,4,1,10,8.9888961180284,10,4.46891175504634,10,1.49230558316491,2.58568816872641,10,10,3,3,6
17+
"16","Oxon Run",5.8,8,1,9.49482509665549,10,10,4.08034192298863,7.26446748330366,2.73668115439965,0.677223449104501,0.963293817107756,10,4,4,4
18+
"17","Pinehurst Branch",8.57142857142857,7,6,10,9.45561327204199,10,6.86529198320573,10,1.64381726305677,2.53189561427939,10,10,2,4,5
19+
"18","Piney Branch",8,10,1,10,10,10,6.24485935433058,10,1.37920467622303,2.43350524767764,10,10,3,2,4
20+
"19","Pope Branch",8,10,3,10,10,10,6.70307871860358,4.63848137391428,2.04750999680075,0.950005376536892,10,1,4,6,8
21+
"20","Portal Branch",7,10,3,10,8.98692894850945,10,4.24400479220216,6.90674993457207,1.02448007263146,2.74453544775747,10,10,1,3,6
22+
"21","Reservation 630",9.34782608695652,10,3,9.49484222518253,10,10,4.89875662885154,6.54810880322023,1.95694969141548,2.32427732195356,10,10,4,7,7
23+
"22","Rock Creek",8.19158878504673,7,1,9.03991429859265,9.63931584712039,10,4.75298766520739,8.85351874858907,3.01758638876789,2.35646823207748,10,10,5,4,5
24+
"23","Soapstone Creek",8.3,10,1,10,8.98764540312439,10,6.80566463860387,10,1.91408087817814,2.53189561427939,2.88434296861746,10,2,3,6
25+
"24","Texas Avenue Tributary",7,10,3,10,10,10,3.54658539291944,7.3375495518317,1.74050116850977,0.837784090876652,10,1,1,5,3
26+
"25","Watts Branch",3.71428571428571,5,1,9.32024027311975,9.03799489304956,9.94283156569335,3.52383649640539,8.10990235278729,2.71307679688268,0.80598894736693,4.92721388547487,10,4,3,6

vignettes/faqs.Rmd

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,30 @@ knitr::opts_chunk$set(
1414
)
1515
```
1616

17-
# Effective Impervious Area (EIA)
17+
# Hydrology Index
1818

19-
1. The Rock Creek mainstem includes both the MS4 and CSS. The Rock Creek watershed also includes additional area beyond the Rock Creek SCI subwatersheds. What area of Rock Creek is used for the SCI analysis?
19+
##### *Effective Impervious Area (EIA)*
2020

21-
**The entire Rock Creek watershed is used in the SCI analysis. See the "eia_rock_creek" tab in the lookup spreadsheet for a full list of subsheds included.**
21+
**The Rock Creek mainstem includes both the MS4 and CSS. The Rock Creek watershed also includes additional area beyond the Rock Creek SCI subwatersheds. What area of Rock Creek is used for the SCI analysis?**
22+
23+
The entire Rock Creek watershed is used in the SCI analysis. See the "eia_rock_creek" tab in the lookup spreadsheet for a full list of subsheds included.
24+
25+
<br>
26+
27+
# Human Health Index
28+
29+
##### *Dumpsites, Trash, E. coli*
30+
31+
**What timeframe is used for the trash and dumpsite analyses?**
32+
33+
Since the analysis uses data from the Rapid Stream Assessments (RSA), the timeframe can vary and is not limited to a set five year period. The most recent data from each assessment point and reach is used.
2234

2335
<br>
2436

2537
# Water Quality Index
2638

39+
##### *Dissolved Oxygen, Turbidity, Conductivity, Temperature, Nitrogen, Phosphorus, pH*
40+
2741
**How are non-detects handled in the dataset?**
2842

2943
The reporting limit is used for non-detect values. For example, results reported as \<0.010, got incorporated in the analysis as 0.010.
@@ -40,6 +54,8 @@ For the nutrient WQ indicatiors (TN and TP), the assess_wq_nutrients() requires
4054

4155
# Aquatic Life Index
4256

57+
##### *Fish, Habitat, Macroinvertebrate, Connection to the Mainstem*
58+
4359
**How are the aquatic life metrics calculated?** 
4460

4561
All four metrics get calculated outside of the R package and get incorporated through lookup tables in data/lookup_tables.xlsx.
@@ -111,7 +127,7 @@ Possible things to try include:
111127

112128
<br>
113129

114-
# Contacts
130+
# Contact
115131

116132
**Who should I contact if I have questions about the R package?**
117133

workflow.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ macro <- macroinvertebrate_summary %>% dplyr::select(sci_subshed,
107107

108108

109109
# Assess RSA Data
110-
# trash <- assess_trash(df_reach, reach_prefix_from_table, reach_prefix_from_layer)
110+
trash <- assess_trash(df_reach, reach_prefix_from_table, reach_prefix_from_layer)
111111
dumpsite <- assess_dumpsites(df_point, df_reach,
112112
reach_prefix_from_table, reach_prefix_from_layer,
113113
point_prefix_from_table, point_prefix_from_layer)
@@ -117,9 +117,8 @@ eia <- assess_eia()
117117

118118
# Compile scores
119119
all_scores <-
120-
# trash[["score"]] %>%
121-
# dplyr::full_join(dumpsite[["score"]]) %>%
122-
dumpsite[["score"]] %>%
120+
trash[["score"]] %>%
121+
dplyr::full_join(dumpsite[["score"]]) %>%
123122
dplyr::full_join(eia[["score"]]) %>%
124123
dplyr::full_join(temp[["score"]]) %>%
125124
dplyr::full_join(ph[["score"]]) %>%

0 commit comments

Comments
 (0)