-
Notifications
You must be signed in to change notification settings - Fork 7
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
Explore alternatives to having a bunch of plots/images in notebooks #26
Comments
I would add that under "User experience" we want to enable batch-processing/automation of the workflow generating diagnostic output. We need a phased approach to tackling these, focusing first on ensuring we can look at what we need to see from the run. |
A feature that I'd like to have is the ability to examine 2 (arbitrary) figures simultaneously (e.g., side-by-side). This feature is not available in current approaches to providing data that I'm familiar with, but I think it would be tremendously helpful. |
Can you introduce a duplicate of each control that would control the display of another figure? Examples of how I would use this side-by-side figure functionality are
Don't take 'side-by-side' literally. I just want to be able to see 2 figures simultaneously. A bonus would be to expand this to >2 figures, with a control for how many figures to display. |
@andersy005 can you compose that panel like standard holoviz? For extra points we could link the sliders :D img1 = ImageView(file_path)
img2 = ImageView(file_path)
(img1 + img2).cols(2)
``` |
Anderson this looks awesome. Before you go too much further, it might be good to see holoviz/hvplot#505 and how it looks. It seems this would reduce the amount of work needed. But I could be wrong? |
Is there any interest in integrating this as one of the viewers inside of Intake's panel-based GUI, or another way of populating the viewer from catalogued data sources? Intake currently optionally uses xrviz to display xarray data, where you can pick various options, but only get one single display. xrviz is not being particularly maintained, unless I should happen to come across a batch of spare hours. |
Thanks for the comment @martindurant. I had not previously see xrviz and it looks really cool. One challenge we have is that some plots take a long time to generate, so we are caching image files and displaying these. Ultimately, it would be preferable to pre-compute or subset the data behind the plot to enable more interactive visualization—but that could still be a lot of data. |
Yes, I feel like there is some space inbetween here. It would be plausible (but requiring effort) to include thumbnails or paths to full precomputed images in a catalogue, for instance, or other more specific metadata. There have been suggestions for zarr v3 to have multi-resolution data that would allow more interactively. |
As an update, I took a stab at a prototype for a small package to facilitate the creation of an image viewer from static images. The package resides here: https://github.com/andersy005/panelify
import panelify
# instantiate dashboards for different types of plots
timeseries = panelify.create_dashboard(
keys=[
"casename",
"varname",
"depth_level",
"spatial_op",
"time_coarsen_len",
"log_10",
],
df=df.loc[df.plot_type == "global-timeseries"],
path_column="path",
)
timestep = panelify.create_dashboard(
keys=["casename", "varname", "depth_level", "time", "log_10"],
df=df.loc[df.plot_type == "timestep-global-map"],
path_column="path",
)
histogram = panelify.create_dashboard(
keys=["casename", "varname", "depth_level", "time_range", "log_10"],
df=df.loc[df.plot_type == "histogram"],
path_column="path",
) # Create a canvas that holds all dashboards in a `panel.Tabs` component:
canvas = panelify.Canvas(
{
"Timestep": timestep.view,
"Timeseries": timeseries.view,
"Histogram": histogram.view,
}
)
canvas.show() This results in a Panel dashboard with three tabs: I'm going to work on pushing it forward this week. I'm hoping to have a minimum viable product by the end of the week. Feel free to chime in at https://github.com/andersy005/panelify/issues |
As @dcherian pointed out in #21 (comment)
As per offline conversations with @matt-long, there are a few things to consider here
In the meantime, I've started working on a prototype for an image viewer serving static images from a local directory. This app will be based on panel, and I am hoping to have a working prototype by the end of the week.
The text was updated successfully, but these errors were encountered: