wri / gfw_forest_loss_geotrellis

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

Change AFi analysis to round all double results to 4 decimal places. #228

Closed danscales closed 6 months ago

danscales commented 6 months ago

Change AFi analysis to round all double results to 4 decimal places.

Because AFi analysis was written with most of the computations done in DataFrames, it never did the rounding to 4 decimal places that FCD and Dashboard do (which is built into their data types such as ForestChangeDiagnosticDataDouble and ForestChangeDiagnosticDataLossYearly).

The rounding is useful for making sure test results match even when running in slightly different environments. Also, it makes the CSV files simpler, since GFWPro doesn't need any values to more than 4 decimal places, but AFi was giving results with up to 13 decimal places.