LandSciTech / ccviR

Implement NatureServe climate change vulnerability index in R
https://landscitech.github.io/ccviR/
Other
2 stars 1 forks source link

Improve the exposure results tables in app #127

Closed adricaswell closed 2 months ago

adricaswell commented 5 months ago

Make the exposure results tables easier to read/interpret. Undecided exactly how tables should be formatted - see below for some ideas. Option 1:

image

Option 2:

image

Additional table with exp multiplier

image
see24 commented 5 months ago

Similar to option 1: image

adricaswell commented 3 months ago

Reformatted table to improve readability using gt(). In theory, it should work.

However, when creating a climate data set with three scenarios for testing, uncovered an issue where the brks_cmd and brks_mat from the climate_data_readme (used for the change and class column) are not identical if the processed data doesn't have the same highest and lowest value. As a result, will have to adjust how the get_exposure_table function combines the breaks for multiple scenarios. Currently using unique(), but since the character strings aren't identical, they won't merge.

image

Will want to display the highest high value and the lowest low value.

see24 commented 3 months ago

This is actually more of an issue with how the breaks are created I think. All scenarios ought to have the same breaks if they are being used to create comparable scenarios. It looks like they are using the same breaks for all but the min and max. So maybe the issue is just with recording the breaks in the climate readme csv. How did you process the climate data? with the app?

see24 commented 3 months ago

If for some reason a user intentionally used different breaks for different scenarios we would want that to be clear in the table.

If the function detects different breaks I think the table should have a long format where it has a subsection of the table for each scenario with different breaks.

I will look in to making sure that when the same breaks are used the labels are correctly made the same across scenarios with different min and max values