wri / gfw

Global Forest Watch: An online, global, near-real time forest monitoring tool
https://www.globalforestwatch.org
MIT License
273 stars 93 forks source link

feat(datamart): use GFW Data API datamart #4848

Open gtempus opened 2 months ago

gtempus commented 2 months ago

Overview

I'll add more information next week!

Use the GFW Data API data mart. It's currently at: http://gfw-data-api-elb-shared-dev-lb-10091095.us-east-1.elb.amazonaws.com:30616/#tag/Forest-Change-Analysis

Update the server-side dataMartRequest URL configuration to try it out!

Notes

I split the code by adding two helper functions depending on isDownload. I wanted to be able to show the extreme difference between the two approaches. The GFW Data API data mart makes for a much more straightforward interface.

jterry64 commented 2 months ago

@gtempus just to make sure I understand, you're trying to highlight the difference between get_net_tree_cover_change_results and get_net_tree_cover_change_download_url, where the former uses the data mart, and the latter uses the existing method?

gtempus commented 2 months ago

Yes, @jterry64. I was commenting that since we don't have the download endpoint implemented, it's easy to see how the data mart simplifies the integration between Data API and Flagship.