tbep-tech / tbeptools

R package for Tampa Bay Estuary Program functions
https://tbep-tech.github.io/tbeptools/
Other
7 stars 3 forks source link

3F creeks with missing data automatically get assigned target/green #16

Closed fawda123 closed 4 years ago

fawda123 commented 4 years ago

An example of geometric means for JEI MC02 and wbid 1816:

   id wbid  JEI class Creek_Length_m year CHLAC COLOR COND DO DOSAT NO23 ORGN SALIN TKN TN TP TSS TURB
1 375 1816 MC02    3F       23783.52   NA    NA    NA   NA NA    NA   NA   NA    NA  NA NA NA  NA   NA

And the final score:

     id wbid  JEI   class target caution investigate   act score 
  <int> <chr> <chr> <chr>  <int>   <int>       <int> <int> <chr> 
1   375 1816  MC02  3F         1      NA          NA    NA Target

This is done here https://github.com/tbep-tech/tbeptools/blob/853897fb40f74bb5612ab8e3c5fcf525e453f0b3/R/anlz_tdlcrk.R#L74

Output from the tbeptools matches that from MW, so need to verify that this was on purpose.

mikewessel commented 4 years ago

Marcus - you are correct in identifying this as an issue. 3F WBIDs with no data should not be assigned a target level. In addition, to clarify, 3F wbids do not get a caution score either so the categories are red, orange, green or no data. Hope this helps and good catch. I hope to get to the vignette this week. Mike

On Mon, Feb 10, 2020 at 1:49 PM Marcus W Beck notifications@github.com wrote:

Assigned #16 https://github.com/tbep-tech/tbeptools/issues/16 to @mikewessel https://github.com/mikewessel.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/tbep-tech/tbeptools/issues/16?email_source=notifications&email_token=ADYTBYAPMFMRAOUFK5PJS23RCGOT5A5CNFSM4KSTRWJ2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWQ6YFWI#event-3023930073, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYTBYFS5LPPNN5Y5WKWEFLRCGOT5ANCNFSM4KSTRWJQ .

fawda123 commented 4 years ago

Okay, got it. Here are the score tallies currently. Note that 3F and "No Data" is at zero and there are no 3F creeks scored as "Caution":

     score
class Act Caution Investigate No Data Target
   1    0       0           0       0      1
   2    0       0           0      34      4
   3F   3       0           4       0     64
   3M  10       4           5      75     24

And here are the tallies after fixing the scores for 3F creeks with no data.

     score
class Act Caution Investigate No Data Target
   1    0       0           0       1      0
   2    0       0           0      34      4
   3F   3       0           4      38     26
   3M  10       4           5      75     24

Fix is here ac784b5f4ac139ded8bfa382a177684c4dfaac35