SouthForkResearch / CHaMP_Metrics

GNU General Public License v3.0
6 stars 0 forks source link

TopoAux Tier 1 metrics: null and zero issues #97

Open volkcj opened 7 years ago

volkcj commented 7 years ago

0) If a Tier 1 Unit Type doesn't exist for a site, then there should be NULLS for the following records. This rule trumps all metric calc adjustments listed below.

FishCovAqVeg FishCovArt FishCovLW FishCovNone FishCovTVeg FishCovTotal FishCovUcut (2011 only) SubEstBldr SubEstCbl SubEstGrvl SubEstSandFines

Example Tier and VisitID: 3998, Fast-Turbulent/Glide

1) Small Side Channels should have null records for all Tier 1 Topo Aux metrics. Like Rule 0 (above) this should trump all rules listed below. FishCovAqVeg FishCovArt FishCovLW FishCovNone FishCovTVeg FishCovTotal FishCovUcut (2011 only) SubEstBldr SubEstCbl SubEstGrvl SubEstSandFines

E.g. Visit 4015 has a 0 value for FishCovTotal right now.

2) The following metrics are currently null for some visits and should be zeros if one value exists for any of the metrics. This is true for all Tier Types except Small Side Channel (see #1) FishCovAqVeg FishCovArt FishCovLW FishCovNone FishCovTVeg

E.g Visit 1097 has null for FishCovArt but values for FishCovAqVeg, FishCovLW, FishCovNone, and FishCovTVeg.

3) In 2011, the metric FishCovUcut should be included in the list above. This is true for all Tier Types except Small Side Channel (see #1)

4) The following metrics are currently null for some visits and should be zeros if one value exists for any of the metrics. This is true for all Tier Types except Small Side Channel (see #1)

SubEstBldr SubEstCbl SubEstGrvl SubEstSandFines

E.g. visit 1869 has a null for SubEstBldr but values for SubEstCbl, SubEstGrvl and SubEstSandFines.

5) If all Fish Cover Type metrics are null (FishCovAqVeg, FishCovLW, FishCovNone, FishCovTVeg) then FishCovTotal should be null not zero. Example visit ID is 1611. This is true for all Tier Types except Small Side Channel (see #1)

MattReimer commented 7 years ago

fix 7756c62 allows totals to be null when there isn't anything else to go on. Everything else is the same.

volkcj commented 7 years ago

Issue 0: resolved Issue 1: resolved Issue 2: not resolved Issue 3: not resolved, but skip Issue 4: not resolved Issue 5: resolved

MattReimer commented 6 years ago

Issue 2 proof: https://gist.github.com/MattReimer/5c8d2a91256f4543caf02e700556ea6d/revisions?diff=split

Issue 4 seems fixed to me (xml from visit 1869:

                <Substrate>
                    <Bldr>0.0</Bldr>
                    <Cbl>30.0</Cbl>
                    <Grvl>65.0</Grvl>
                    <SandFines>5.0</SandFines>
                    <Total>100.0</Total>
                </Substrate>
volkcj commented 6 years ago

2 is mostly resolved, but in reviewing Visit 4913 (Methow), I don't understand why this visit has 0s for TopoAux Tier 1 visits. Requesting data check by Matt and Kelly.

MattReimer commented 6 years ago

Here's the XML from visit 4913 as well as the JSON object the python uses to calculate things:

https://gist.github.com/MattReimer/6faf35500e91d7e5f22d0305f22cee1a

Near as I can tell, the SmallSideChannel/FishCover stuff has values because the Sidechannel has area. We might need to discuss this further and investigate.

KellyMWhitehead commented 6 years ago

Nothing really stands out from the data side: Unit 5 is a small side channel with a two-part polygon.

Interesting, though, there is not any ocular measurements for this unit. I though we were collecting this in small side channels this year?

MattReimer commented 6 years ago

I'm happy to dig further on this but I'll need someone looking over my shoulder looking for problems. Where are we at?

MattReimer commented 6 years ago

Here are diffs for the two visits that we talked about with the new fix:

One interesting side-effect is that it nullified the <Ucut> values that were 0.

@volkcj and @KellyMWhitehead can you let me know these look ok?