wri / gfw

Global Forest Watch: An online, global, near-real time forest monitoring tool

Home Page:https://www.globalforestwatch.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update UMD data download link from country pages

robinkraft opened this issue · comments

Per @beej23, we want to remove extent_ha and extent_perc from the export query because the calculations are methodologically suboptimal (if not flawed!) according to Matt H.

This updated query (for Brazil as an example) removes those fields and sorts the data.

SELECT iso         AS country_code, 
       id1         AS region_code, 
       country, 
       region, 
       year, 
       thresh      AS min_percent_canopy_density, 
       loss        AS loss_ha, 
       gain        AS gain_ha, 
       gain_perc   AS gain_percent 
FROM   umd_subnat 
WHERE  iso = 'BRA'
ORDER BY country_code, region_code, min_percent_canopy_density, year

p.s. I'm submitting this issue bc I can't find where the query lives in the code.

Another tweak:

SELECT iso         AS country_code, 
       id1         AS region_code, 
       country, 
       region, 
       year, 
       thresh      AS min_percent_canopy_density, 
       loss        AS loss_ha,
       loss_perc   AS loss_percent,        
       gain        AS gain_ha, 
       gain_perc   AS gain_percent 
       extent_2000,
       extent_2000_perc AS extent_2000_percent
FROM   umd_subnat 
WHERE  iso = 'BRA'
ORDER BY country_code, region_code, min_percent_canopy_density, year

The query above reflects the upcoming schema for the umd subnational table.