wri / gfw-mapbuilder

Template for the GFW Map Builder that is available through ArcGIS Online, as a stand-alone web application, & a library to build custom Forest Atlas web applications
https://my.gfw-mapbuilder.org/v1.latest/
MIT License
33 stars 10 forks source link

Make Vega the default for analysis #286

Closed csphang closed 5 years ago

csphang commented 5 years ago

Analysis name & corresponding Vega widget (multiple languages)

Analysis name & corresponding Vega widget

richardbarad commented 5 years ago

Hi @csphang,

I have updated the analysis here module to include the new vega widgets: http://training.from-dc.com/map

I created and registered a new set of widgets which are connected to the mapbuilder datasets. I am attaching a new spreadsheet which provides an overview of the widgets IDs for these widgets. We may make some changes to the widgets, but hopefully this help you get started with this task.

Mapbuilder_Layers_API_20190102.xlsx

I believe we may need to address task #293 before moving forward with this. Note that we are encountering some issues with analysis calls failing when using them with vega widgets. Thomas, is going to be looking into this now that he has started his new position, but we can still move forward with this work.

Also, the one piece which I believe might be missing here is making sure that the vega widgets support multiple languages. I am going to make a new task for this and we can chat more about how to fit it into the development timeline.

Feel free to let me know if you have any questions!

Best,

Richard

richardbarad commented 5 years ago

Hi @csphang,

I updated the list above and also added the links to GIST. Let me know if you have any questions. I flagged two analysis we added. Note that I also would like to change the names a bit, but for now I just left the old names to avoid confusion.

As discussed, I can make new versions once we decide how to move forward with the language issue here: https://github.com/wri/gfw-mapbuilder/issues/299

csphang commented 5 years ago

@KaylaKremer You can use the production API for the widget ID's/configurations. For example, http://production-api.globalforestwatch.org/widget/a7f65bb7-c037-412f-86e1-ca75e3348892 (where a7f65bb7-c037-412f-86e1-ca75e3348892 is the widget id for tree cover loss/gain)

richardbarad commented 5 years ago

Hi @KaylaKremer , @csphang and @SwampGuzzler.

I update the list above to include the revised widgets with the language signal added in.

richardbarad commented 5 years ago

Also attaching a revised analysis configuration with the new widgets added. We will probably make a few small changes to the configuration before releasing the new analysis module.

Note that there are two versions of the GLAD analysis, one will be used for countries which have a longer time-series where we can calculate a historical average.

New Vegas Configuration_20190410.zip

kaylakremer commented 5 years ago

https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/merge-of-286-and-299-branches/external.html

richardbarad commented 5 years ago

@KaylaKremer and @SwampGuzzler,

I tested this out and it looks like the language signal works when the analysis in run in the panel but not in the report. Can we please check to make sure that the language signal also applies to the report?

Here is a report generated in French: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/merge-of-286-and-299-branches/1.3.4/report.html?title=Application%20de%20test%20Mapbuilder&subtitle=M%C3%A9tadonn%C3%A9es%20-%20L%C3%A9gende&logoUrl=&logoLinkUrl=&activeSlopeClass=undefined&webmap=de85e3fcc07948238aa6c1afd2a4ceb0&idvalue=4e24d45548d9d45233f25532cfaa8192&tcd=30&lang=fr&activeLayers=RDC_titre_forestier_non_converti_2009_shapefile_2586_0%2CAffectation_des_terres_fr_9041%2CAffectation_des_terres_fr_9917%2Cdonnees_ouvertes_en_1425%2CTileService_Metadata_Test_1314%2CUSER_FEATURES%2CAffectation_des_terres_fr_6243_105%2CAffectation_des_terres_fr_6243_26%2CAffectation_des_terres_fr_6243_22%2CAffectation_des_terres_fr_6243_113%2CAffectation_des_terres_fr_6243_100%2CAffectation_des_terres_fr_6243_117%2CAffectation_des_terres_fr_6243_102%2CAffectation_des_terres_fr_6243_107%2CAffectation_des_terres_fr_6243_28%2CAffectation_des_terres_fr_6243_108&tcLossFrom=0&tcLossTo=16&gladFrom=2015-01-01T05%3A00%3A00.000Z&gladTo=2019-05-03T13%3A17%3A34.274Z&terraIFrom=2004-01-01&terraITo=2016-07-12&viirsStartDate=2019-05-02%2009%3A17%3A34&viirsEndDate=2019-05-03%2009%3A17%3A34&modisStartDate=2019-05-02%2009%3A17%3A34&modisEndDate=2019-05-03%2009%3A17%3A34&customFeatureTitle=Custom%20Feature%20%232&sharinghost=https%3A%2F%2Fwww.arcgis.com&activeFilters=&activeVersions=&IFL=0&MODIS_ACTIVE_FIRES=9&VIIRS_ACTIVE_FIRES=8&IMAZON_SAD=2&Affectation_des_terres_fr_6243=114%2C8%2C101%2C108%2C110%2C111%2C28%2C107%2C102%2C103%2C117%2C100%2C113%2C22%2C26%2C105&cache=1.3.4&origin=https%3A%2F%2Falpha.blueraster.io.s3.amazonaws.com

Also, what will happen for apps which include custom vegas but are not translated and thus the vegas do not include a language signal? Let's test Ethiopia to make sure it still works with this update:

http://eth.restorationatlas.org/atlas

richardbarad commented 5 years ago

@csphang and @KaylaKremer and @csphang

Let's also test this update on the Georgia configuration. https://atlas.mepa.gov.ge/map?l=en

To summarize: We should test on:

  1. Revised Vega base configuration

  2. Georgia configuration - I update the custom analysis VEGAs to include a language signal (with only ka/en as options).

  3. Ethiopia - Test to make sure VEGAs which do not have a language signal still work with this update

We should also make sure the translation using the language signal work both in the report and when you run the analysis directly in the layer panel.

Richard

csphang commented 5 years ago

Will generate a Georgia build and Ethiopia build. And add the language in the report.

@richardbarad can you expand on what you mean by the revised base configuration? Is it a different Vega configuration than what this URL uses? https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/merge-of-286-and-299-branches/external.html

richardbarad commented 5 years ago

@csphang. Yes, it is the revised Vega configuration at the link you shared.

kaylakremer commented 5 years ago

@richardbarad @SwampGuzzler @csphang

For the Ethiopia build, everything for the VEGAS works fine without specifying a language signal.

For the Georgia build, all of the reports displayed fine in the selected language expect for Land Cover Composition. It is missing signals in its widget config.

richardbarad commented 5 years ago

@KaylaKremer. Thanks! Looks good. For Georgia, I did not update the build to include the VEGA for land cover with the signal but will do once we release 1.4.0!

kaylakremer commented 5 years ago

@richardbarad The Georgia Build should now be fixed and display the reports in their appropriate language with the exception of the Land Cover Composition as we discussed in yesterday's meeting!

richardbarad commented 5 years ago

@KaylaKremer . Tested and confirmed that it work as expected.

Can also please test on this configuration to make sure the fix works for the gloabl analysis widgets?

https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/merge-of-286-and-299-branches/external.html

richardbarad commented 5 years ago

@KaylaKremer & @csphang . Are you sure that custom analysis in Ethiopia build is working correctly? I just tested it out and it looks like it works fine in the report but when you try to load the analysis in the layer panel the app hangs and does not show the results in the panel even though a response is returned by the API. Please see attached screenshot.

Vega_bug

richardbarad commented 5 years ago

@SwampGuzzler & @csphang.

Noticing that this is marked as ready for WRI testing. Please check to make sure Ethiopia works following the updates.

I would like to test on several different configurations. The configuration we have been using was from when I first started working on VEGA so does not include all the latest updates (such as the API layers).

I am thinking we should test on the following:

I'll work revising these configurations to use the Vega analysis. Could we put up a .js file that we can test on which includes all the latest updates? Maybe we can test both this and the VEGA downloads https://github.com/wri/gfw-mapbuilder/issues/287 at the same time provided that they have been merged into one branch?

Best,

Richard

richardbarad commented 5 years ago

Attached is a revised configuration for the my GFW template on ArcGIS Online which uses the new VEGA Analysis module.

Could you please check the configuration to make sure all looks good and once that is done put up a build using this configuration and the latest version of the development code for testing?

index.zip

I also would like to test the other configurations noted above, but let's start with this configuration and the Ethiopia atlas configuration.

Thanks!

kaylakremer commented 5 years ago

@richardbarad Here is the build with your revised config: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/new-gfw-template-build-test/external.html

kaylakremer commented 5 years ago

@richardbarad New Ethiopia build: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/new-ethiopia-build/external.html

richardbarad commented 5 years ago

@KaylaKremer. Thanks! ET looks good.

I tested the base configuration using the url above against a few apps and noticed a few issues:

1) https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/new-gfw-template-build-test/external.html?appid=0bdf18459d5544e881a06577805f2b8f.

When you try to run an analysis in this map an error is returned in the console as shown below. It looks like the call is returning a response but the VEGA is not rendering. The default language here is Spanish, so I am not sure if this cause an issue. The VEGAs load correctly when you run a report.

image

2) This app is not loading and also returns an error in the console related to setting the transparency of a layer: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/new-gfw-template-build-test/external.html?appid=9e00ce21ec00476aaf42bdbeae316fd6

It is created using a public ArcGIS Online account, and includes a graphic layer. It works correctly here when using v1.3.4: http://my.gfw-mapbuilder.org/v1.3.4/?appid=9e00ce21ec00476aaf42bdbeae316fd6

Richard

richardbarad commented 5 years ago

@KaylaKremer and @csphang

I have attached the following:

1) Zipped folder with an updated base configuration for use with ArcGIS Online APPs (1.4.0.zip)

2) Updated JSON Configurations for the Cameroon Forest Atlas, Georgia Forest Atlas, and Tierra Indigenous. These are included in a single zipped folder (Test Configurations.zip).

Can we put up build to test these configurations with the new VEGA analysis module?

Also, do you think we can remove the Restoration Analysis Module from the configuration? It seems like these options might be deprecated at this point and are also not customizable via ArcGIS Online. I left it in for now since I was not sure if removing would cause issues!

Richard

1.4.0.zip

Test Configurations.zip

kaylakremer commented 5 years ago

@richardbarad I am working on making all of the builds now. Here is the build with your new 1.4.0 config: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/test-build-with-new-config/external.html

I will go ahead and remove all references of Restoration Analysis Module and create a separate build of that to see if it breaks anything.

kaylakremer commented 5 years ago

@richardbarad Here is the test build of your new config with all the references of Restoration Analysis removed. It doesn't appear to have broken anything as far as I can tell:

https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/test-build-with-new-config-no-restoration/external.html

kaylakremer commented 5 years ago

@richardbarad Tierra Indigenous Test Build: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/test-build-with-new-config-tierra-indigenous/external.html

kaylakremer commented 5 years ago

@richardbarad Georgia Test Build: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/test-build-with-new-config-georgia/external.html

kaylakremer commented 5 years ago

@richardbarad And finally, the Cameroon Build: https://alpha.blueraster.io.s3.amazonaws.com/gfw-mapbuilder/test-build-with-new-config-cameroon/external.html

richardbarad commented 5 years ago

@KaylaKremer. Reviewed the builds above and this is approved for release!