wri / gfw_forest_loss_geotrellis

Global Tree Cover Loss Analysis using Geotrellis and SPARK
MIT License
10 stars 8 forks source link

GTC-2734 Add JRC/SBTN, confidence levels, and total_ha to integrated alerts #230

Closed danscales closed 5 months ago

danscales commented 6 months ago

GTC-2734 Add JRC/SBTN, confidence levels, and total_ha to integrated alerts

For daily alerts, add new columns that divide the daily alerts into a 3x3 cross-product of (whole area, SBTN forest only, JRC forest only) x (lo, med, hi) alert confidence

Also, add a new 'total_ha' column which is the area of the location. This area will be used by the front-end to calculate measures such as "daily alerts per hectare".

Currently, I am calculating the entire location area in the usual per-pixel way with Geodesy.pixelArea. We were already calculating the area per pixel whenever isTreeCoverExtent30 was true (more than 30% tree cover). From a look at some input sets, it seems like this is usually a large part of the location areas. So, doing the area calculation for the entire geometry shouldn't be much more expensive.

However, I will make sure that the isTreeCoverExtent30 area is a large part of the whole area for most datasets, once this change is in. If it is not, then it may give better performance to calculate the total area of locations outside of the pixel function using an equal-area projection (for which I already have some working code).

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 97.18310% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 23.77%. Comparing base (33cd4bc) to head (413c210). Report is 6 commits behind head on master.

Files Patch % Lines
...ats/gfwpro_dashboard/GfwProDashboardAnalysis.scala 0.00% 1 Missing :warning:
...gfwpro_dashboard/GfwProDashboardRawDataGroup.scala 96.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #230 +/- ## ========================================== + Coverage 23.12% 23.77% +0.64% ========================================== Files 297 297 Lines 6663 6721 +58 ========================================== + Hits 1541 1598 +57 - Misses 5122 5123 +1 ``` | [Flag](https://app.codecov.io/gh/wri/gfw_forest_loss_geotrellis/pull/230/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/wri/gfw_forest_loss_geotrellis/pull/230/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri) | `23.77% <97.18%> (+0.64%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.