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

Examples: plotly express & holoviews #1182

Open
ax3l opened this issue Jan 24, 2022 · 5 comments
Open

Examples: plotly express & holoviews #1182

ax3l opened this issue Jan 24, 2022 · 5 comments

Comments

@ax3l
Copy link
Member

ax3l commented Jan 24, 2022

With our new Pandas (& Dask) data frame APIs, we could add super rapid examples that use
plotly express: https://plotly.com/python/plotly-express/
or
holoviews: http://holoviews.org/user_guide/Tabular_Datasets.html

@rhay-repo
Copy link

Hi, I'm Reagan and I've been asked to contribute to an open-source project for my Software Development course. I'm interested in your team's project and interested in this issue in particular.

Could you tell me more about these examples you are hoping to produce with plotly express or holoviews that are mentioned in this issue? If I could help, I would like to be assigned this issue.
Thank you.

@ax3l
Copy link
Member Author

ax3l commented Jan 28, 2022

Hi @rhay-repo, nice to meet you!

That's fantastic, welcome to openPMD! ✨

Organization

I am thinking about creating a new repo with cool jupyter notebook showcases (including https://mybinder.org startup). These notebooks could use openPMD-api and combine it with external projects like the two above.

Later on, we could use such notebooks as sections of tutorials.

What to Visualize

We have a couple of example data sets under https://github.com/openPMD/openPMD-example-datasets/ with which we can start.

Generally, we have particle data, which are effectively data frames (tables), and we have regular meshes (usually 2D-3D). A few default visualization that we need are show in this DASK use case I did recently: #958 dask/dask#7307 (comment) #963 (comment)

For particles, interactive 3d scatter plots, histograms/heatmaps over positions or position-momentum combinations and radar/polar charts of momentum components are generally very cool and useful for us as particle accelerator & laser-plasma physics people. I see those in https://plotly.com/python/plotly-express/#gallery

For holoviews, I would be curious about the same representations and how well interaction with large data works: http://holoviews.org/user_guide/Large_Data.html
Maybe we can also build a testcase using our ADIOS SST support and their streaming data: http://holoviews.org/user_guide/Streaming_Data.html

What are your thoughts and ideas? We can store a lot of things in openPMD data sets :)

QA

For maintainability & QA, we could run the notebooks in CI to make sure we don't miss when we do breaking changes in openPMD-api or if breaking changes appear in third party projects that we interface with. This might not work with all plots, but we can try. A few technolgy routes like converting to Python scripts via nbconvert or running through nbterm exist.

@rhay-repo
Copy link

rhay-repo commented Jan 28, 2022

Thank you for including me in this discussion! This seems very cool! I worked with Plotly a couple years ago but I'd be new to HoloViews. Although the interactive HoloViews charts seem awesome and I'd be happy to try and utilize HoloViews.

For this project, I would be willing to experiment with both Plotly and Holoviews to see what each is capable of producing, report that back to you, and then pick the better of the two. Or if you decide to rule one of them out, that's great too.

I have cloned the raw datasets that you linked and will begin working with Plotly to start and try to replicate/mimic some of the default visualization you have done so far.

Question:
Are you hoping to develop this visualization only for use as a one-time example/demonstration (with the example data sets)? or are you hoping to use this functionality repeatedly with new data input and visualize it for analytical purposes, etc.? I am trying to get a better grasp of your goal so that I can be as helpful as possible

@bussmann
Copy link
Member

I think with some applications from laser and beam driven plasma accelerators one could aim for reusable, quasi-standard plots, e.g. electron density, phase space, energy histograms, field strengths, etc.

@ax3l
Copy link
Member Author

ax3l commented Feb 2, 2022

Are you hoping to develop this visualization only for use as a one-time example/demonstration (with the example data sets)? or are you hoping to use this functionality repeatedly with new data input and visualize it for analytical purposes, etc.? I am trying to get a better grasp of your goal so that I can be as helpful as possible.

At the moment, I would like to show more use-cases how we can connect our data to modern visualization frameworks like these two. This would help domain-specific applications to pick them up and build dashboards.

For instance, we have a couple of general and laser-plasma driven default visualizations over here:

this uses mainly matplotlib for the final plot at the moment.

Similarly, we have a community project for visualizing accelerators and beams over here:

that also uses matplotlib as visualization framework.

If I remember correctly, plotly express and holoviews came up with @phyzicist, according to our discussions last week at a workshop. I would like to present some examples for him and other experimental physicists that like these two vis. frameworks and want to adopt our data APIs from openPMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants