cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 2 forks source link

DataInterface updates: Adding select by time or warming level approach #441

Closed nicolejkeeney closed 1 month ago

nicolejkeeney commented 2 months ago

Description of PR

This PR is linked to PR #10 in climakitaegui.

I made some big design changes to the selections GUI to enable users to select by a time-based or a warming level approach. Can folks play around with the GUI, let me know what you think about the layout and make sure all the buttons update appropriately?

I'll merge this later, once I finish setting up the backend retrieval. This is just a front-end change... you still can't retrieve by warming level yet.

Also curious what people think the defaults should be: time-based or warming level? And, if warming level is selected, what should be the default warming level selection(s)? Right now I have it set to 2 deg C. We could do a different one, or more (i.e. 2, 3, and 4 deg C).

NOTE: You need to be in the branch wl2 in climakitaegui to test this branch! Make sure both branches are updated.

Summary of changes and related issue

I modified the DataInterface object to add selection options for warming level and retrieval option. I changed and added some dynamically-updating panel functions that enable the options to change depending on the user selections.

Relevant motivation and context

This is part of a larger push to integrate a warming-levels approach into climakitae.

Type of change

This is a breaking change, so it will not be merged yet. It will also require a documentation update (not in the code, but in the markdown of our notebooks) that I will need to work with the team on before it is merged.


Definition of Done Checklist

Practical

Conceptual

nicolejkeeney commented 1 month ago
  • We need to have a collective think on whether station data should be available with GWL approach. If we keep, order of operations should be: quantile mapping first to adjust to observations, then retrieve the sliced data.

Good point, hadn't thought about that. For the time being, I have removed station data for an option when using a warming levels approach.

nicolejkeeney commented 1 month ago
  • I think we should rename "Retrieval Method" to "Approach" to be explicitly clear with the WL and time-based sections what is referring to what. At least in the GUI panel itself for the label in the top bar, not necessarily in the backend code if that's a hassle.

After some thought, I agree and have changed it to Approach in the front end and back end in the subsequent branch ("wl3")

nicolejkeeney commented 1 month ago

Closing due to changes incorporated into subsequent branch wl3, which is being reviewed in a separate PR.