wri / gfw_forest_loss_geotrellis

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

Only compute commodity threat to year 2019 #119

Closed echeipesh closed 3 years ago

echeipesh commented 3 years ago

Pull request type

Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? Commodity threat columns are updated to 2020 ## What is the new behavior? They are limited to 2019 ## Does this introduce a breaking change? - [ ] Yes - [x] No ```python from list_utils import * idn_32 = FCD.read_output("s3://gfwpro-geotrellis-qa/qa/results/.../forest_change_diagnostic_211013_162342") idn_32['commodity_threat_peat'].reset_index()['year'].unique() ``` ``` array(['2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019'], dtype=object) ``` ![Screen Shot 2021-10-14 at 12 54 36 PM](https://user-images.githubusercontent.com/1158084/137362414-ed83c097-83c4-4eab-af50-5106380abc4a.png)
codecov[bot] commented 3 years ago

Codecov Report

Merging #119 (d2eb091) into develop (808bd1b) will decrease coverage by 0.00%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #119      +/-   ##
==========================================
- Coverage     3.48%   3.48%   -0.01%     
==========================================
  Files          256     256              
  Lines         5103    5104       +1     
==========================================
  Hits           178     178              
- Misses        4925    4926       +1     
Flag Coverage Δ
unittests 3.48% <0.00%> (-0.01%) :arrow_down:

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

Impacted Files Coverage Δ
...ge_diagnostic/ForestChangeDiagnosticAnalysis.scala 0.00% <0.00%> (ø)
...change_diagnostic/ForestChangeDiagnosticData.scala 34.86% <0.00%> (ø)
...gnostic/ForestChangeDiagnosticDataLossYearly.scala 12.82% <0.00%> (-0.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 808bd1b...d2eb091. Read the comment docs.

echeipesh commented 3 years ago

Tested manually, next refactor really needs to be to allow for unit tests on these things.