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

Put figures in hover message #85

Open
2 of 3 tasks
hanhou opened this issue Aug 27, 2024 · 2 comments
Open
2 of 3 tasks

Put figures in hover message #85

hanhou opened this issue Aug 27, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@hanhou
Copy link
Collaborator

hanhou commented Aug 27, 2024

In the Streamlit app, I'm trying to embed figures in hover tooltips so that the user doesn't have to click on the scatter plot to see the corresponding pre-generated figures, which will greatly enhance the interactivity. I've just figured out how to do this using Bokeh. Here is a toy example (code):

session_plotly

Steps:

  • Make the two S3 prefixes public
    s3://aind-behavior-data/foraging_nwb_bonsai_processed/
    s3://aind-behavior-data/foraging_nwb_bpod_processed/
  • Generate public URL for all pre-generated figures in sessions shown in a plot
  • Turn streamlit to bokeh plot and pass the URLs
@hanhou hanhou added the enhancement New feature or request label Aug 27, 2024
@hanhou hanhou assigned dyf and hanhou Aug 27, 2024
@hanhou
Copy link
Collaborator Author

hanhou commented Aug 27, 2024

@dyf could you help with the first step?

@hanhou
Copy link
Collaborator Author

hanhou commented Aug 28, 2024

@dyf could you help with the first step?

@jtyoung84 @yosefmaru helped me test it in the `dev' environment by setting the subfolder publicly accessible. It works as I wanted!

session_plotly

Here is how I get URLs of the figures:

URLs = [f"https://{bucket_name}.s3.amazonaws.com{file.replace(bucket_name, '')}" for file in png_files]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants