Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 8, 2024

Conversation

danscales
Copy link
Collaborator

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).

…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).
@danscales danscales requested a review from jterry64 May 1, 2024 21:00
Changes based on Justin's comments.

Also, I duplicated the glad_alerts_coverage column to
integrated_alerts_coverage, based on Kinshuk's suggestion. He is hoping
that we can just remove all the glad_alerts_* columns asynchronously
once the UI has switched to using only the integrated_alerts_* columns.
(The weekly and month alerts won't be needed anymore).
@codecov-commenter
Copy link

codecov-commenter commented May 2, 2024

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 ⚠️
...gfwpro_dashboard/GfwProDashboardRawDataGroup.scala 96.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            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 Coverage Δ
unittests 23.77% <97.18%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jterry64
jterry64 previously approved these changes May 7, 2024
This is in accordance with terminology for Flagship (though "nominal" is
sometimes specified as "Detected by a single alert system").

Changed both the enum and the associated column names.
@danscales danscales merged commit 92869c6 into master May 8, 2024
4 of 5 checks passed
@danscales danscales deleted the gtc-2734 branch May 8, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants