Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For dashboard, only show valid dropdown options #52

Open
mnlevy1981 opened this issue Jul 28, 2021 · 2 comments
Open

For dashboard, only show valid dropdown options #52

mnlevy1981 opened this issue Jul 28, 2021 · 2 comments

Comments

@mnlevy1981
Copy link
Contributor

There are some values in the dropdown menus / slider bars on the dashboard that only apply to certain variables or cases... for example, the webext web server only has 1 year of output for the g.e22.G1850ECO_JRA_HR.TL319_t13.003 summary maps, but g.e22.G1850ECO_JRA_HR.TL319_t13.004 has 34 years of plots. It would be great if the Date slider only went to 0001-12-16 for 003, but to 0034-12-16 for 004.

This will become a bigger issue when we add drop-down support for sel_dict -- currently, sel_dict is the only way to pick which level of a 3D variable to plot, but it is left blank for 2D variables. For now, we only have two levels for most 3D variables and the dashboard can only show one of them... but if I add a sel_dict drop down, then I'm constantly switching between sel_dict = {'z_t': 150} for 3D variables and sel_dict = {} for 2D variables, which is pretty annoying.

@mnlevy1981
Copy link
Contributor Author

@andersy005 does this belong here or is it a panelify issue?

mnlevy1981 added a commit to mnlevy1981/HiRes-CESM-analysis that referenced this issue Jul 28, 2021
1. Include trend_map panel
2. Remove commented out lines (from storage_option)
3. Add sel_dict dropdown menus to most of the dashboard pages

The last update causes some unwanted behavior -- see marbl-ecosys#52 for details, but
basically it requires changing two dropdown menus when switching between a 2D
and 3D variable (the variable dropdown, and then selecting appropriate z_t or
z_t_150m value); it also leads to an empty frame when it first runs since the
default values populating summary_map are Varname = CaCO3_FLUX_100m and
Sel_dict = '{z_t: 35109.35}' when that specific variable is only plotted with
sel_dict = {}
mnlevy1981 added a commit that referenced this issue Jul 29, 2021
* Single set of cells regardless of plot source

Whether plotting images from glade or webext, use the same bulk of the notebook
(just set paths differently based on an if statement)

* fix via precommit

* Get panel options from YAML file

top-level keys must match plot_type in the data frame, subkeys are just kwargs
for panelify.create_dashboard

* Clean up markdown cells

Some more cleanup of the dashboard notebook, mostly in the markdown cells but I
also combined some of the computational cells to streamline things a bit.

* rename canvas_dict -> canvas

* Update dashboard.yaml

1. Include trend_map panel
2. Remove commented out lines (from storage_option)
3. Add sel_dict dropdown menus to most of the dashboard pages

The last update causes some unwanted behavior -- see #52 for details, but
basically it requires changing two dropdown menus when switching between a 2D
and 3D variable (the variable dropdown, and then selecting appropriate z_t or
z_t_150m value); it also leads to an empty frame when it first runs since the
default values populating summary_map are Varname = CaCO3_FLUX_100m and
Sel_dict = '{z_t: 35109.35}' when that specific variable is only plotted with
sel_dict = {}
@mnlevy1981
Copy link
Contributor Author

We talked about this being a hierarchy of sorts. When changing Casename, all other drop down options should be reset to valid values. When changing Variable, there is no need to reset Casename but the rest should be. Then, when changing anything else, there is no need to reset Casename or Variable.

@andersy005 andersy005 added this to Xdev Dec 2, 2021
@andersy005 andersy005 moved this to 🌳 Todo in Xdev Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant