NCC-CNC / wheretowork

Interactive application for systematic conservation planning
https://NCC-CNC.github.io/wheretowork
Other
8 stars 1 forks source link

Enable certain features/weights/includes to be hidden #168

Closed jeffreyhanson closed 3 years ago

jeffreyhanson commented 3 years ago

This functionality would allow certain map layers to be hidden from the map (i.e. they would never appear visible on the map). Note that such layers would still be used to generate and evaluate prioritizations. Although we would ideally not need to hide certain map layers (such that users could explore all possible input datasets), this functionality is useful in cases where the total number of map layers exceeds recommended limits for the application. In other words, the application is not designed to permit visualization of 100s of a layers at a time. To prevent poor/unresponsive behavior in such cases, the layers can be "hidden" from the map. Although @ricschuster and I briefly explored other options (i.e. implementing tiles and replacing leaflet with mapdeck), it would appear that neither of these options are simple fixes (i..e. they require burdening users with hours of data pre-processing, or months of work upgrading the application). @ricschuster, let me know if I'm missing anything?

@JCLaurence: just to keep you in the loop, this will mean another update to the YAML project file. I'll email with you with an updated version of the example datasets when they're ready. Sorry for about this.

JCLaurence commented 3 years ago

No worries, Jeff! You get to adjust the Yaml file schema as required for the where to work tool. I can adjust my code accordingly in a few minutes 🙂

JC


From: Jeff Hanson @.> Sent: Monday, September 20, 2021 10:26 PM To: NCC-CNC/wheretowork @.> Cc: JC Laurence @.>; Mention @.> Subject: [NCC-CNC/wheretowork] Enable certain features/weights/includes to be hidden (#168)

ATTENTION:External Email|Courriel Externe


This functionality would allow certain map layers to be hidden from the map (i.e. they would never appear visible on the map). Note that such layers would still be used to generate and evaluate prioritizations. Although we would ideally not need to hide certain map layers (such that users could explore all possible input datasets), this functionality is useful in cases where the total number of map layers exceeds recommended limits for the application. In other words, the application is not designed to permit visualization of 100s of a layers at a time. To prevent poor/unresponsive behavior in such cases, the layers can be "hidden" from the map. Although @ricschusterhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fricschuster&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981504286%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hWVP8yfs2hWm032O3O7eUnla2cD8pwr53RA7vTHYjDY%3D&reserved=0 and I briefly explored other options (i.e. implementing tiles and replacing leaflet with mapdeck), it would appear that neither of these options are simple fixes (i..e. they require burdening users with hours of data pre-processing, or months of work upgrading the application). @ricschusterhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fricschuster&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981514239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5DNB1Pfo5nWu0GE1iOlB7TXRuEjz3Hz3Mt4SDPCWTpA%3D&reserved=0, let me know if I'm missing anything?

@JCLaurencehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJCLaurence&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981514239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=VJA%2FJ97SL5alIsXkHISk1wckN5A4mgtmb07JTZigEJM%3D&reserved=0: just to keep you in the loop, this will mean another update to the YAML project file. I'll email with you with an updated version of the example datasets when they're ready. Sorry for about this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNCC-CNC%2Fwheretowork%2Fissues%2F168&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981514239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xnsmJR0Fh1qGs74uKQ6j13Ii%2BsnhSyKGViy6WQoRCBQ%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPS6W7JNO3X6373A3YOPJ43UC7UNZANCNFSM5ENI6SIQ&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981524205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a75Nh1%2FIIYXXFZQfYiaPy0rZ7DwehkJOYgJJkNG6A18%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981524205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lUtqNrTGXckNNglZUXGr3Qg2tiaMMdZ93rIf11K5%2FDM%3D&reserved=0 or Androidhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cjc.laurence%40natureconservancy.ca%7C29d24d7a19a946eb1a5608d97ca73c68%7C28c6c543842241cf8beaa257eddcd88c%7C0%7C0%7C637677879981534157%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=32tpTFmzkfqf764pBAHAdgxUzDsTx112fgcNIfHDV2Y%3D&reserved=0.

ricschuster commented 3 years ago

Thanks @jeffreyhanson! You covered everything we've discussed I think.

jeffreyhanson commented 3 years ago

@ricschuster, could you please try updating the BC example to have the themes with lots of features set to hidden? I've implemented this functionality so that features/includes/weights marked as hidden don't have any spatial data sent to leaflet at all - so I'm hoping this will fix the unresponsive UI issues.

EDIT: I've also updated the version of the app running on the server so that it is now running the latest version (and thus supports the hidden funcuntoinality) and contains the example built-in project with some hidden layers.

ricschuster commented 3 years ago

Thanks @jeffreyhanson !

Its working well and the mapping is nice and responsive again.

One issue though: given that the mapping is disabled for the hidden layers, the app does not allow to collapse the grouping. I'm getting a long list of names, but can't collapse them into say 'SAR' as in the example below.

image

jeffreyhanson commented 3 years ago

Yeah that's a good idea - I'll try and implement it sometime this weekend.

jeffreyhanson commented 3 years ago

I'll update it so that you can maximize/minimized the Theme name (i.e. SAR in the screenshot above). This will be useful so that (1) you can seee which features are present within the theme, and (2) minimize the theme so that it doesn't get in the way. Although we could just force it to be minimized, this could be confusing because then the user will not (easily) know which features are within the theme.

jeffreyhanson commented 3 years ago

I'll also update the code so that data provenance tooltips (e.g. regional/national) remain active for hidden layers.