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

Feature: add interactive Bokeh plots in ws_pow_filtering #92

Merged
merged 7 commits into from
Jul 4, 2023

Conversation

Bartdoekemeijer
Copy link
Collaborator

@Bartdoekemeijer Bartdoekemeijer commented Jun 27, 2023

This PR is ready to be merged.

Feature or improvement description
This adds interactive browser-based Bokeh plot functionality to the windspeed-power curve filtering class. These figures can easily be saved as .htmls while maintaining their interactive functionality. You can zoom in/out, hide/show data with the legend, resize the plots, etc. This facilitates easy data exploring and additional in-depth analysis post-processing.

Related issue, if one exists
N/A

Impacted areas of the software
ws_pow_filtering

Additional supporting information
N/A

Test results, if applicable
I will share an example soon.

@Bartdoekemeijer
Copy link
Collaborator Author

Bartdoekemeijer commented Jul 3, 2023

I have updated examples_artificial_data/filter_ws_pow_curves.ipynb script to have the option to produce interactive figures with Bokeh, see the Jupyter Notebook on the branch. I'm attaching two interactive figures in .html file format. GitHub won't allow me to upload the .html files directly, hence attaching them as .zip file: figures.zip. After unzipping, you can open them with your browser.

Couple nice features with this Bokeh functionality:

  1. Figure is actively resized to your browser window size.
  2. You can show/hide data points by clicking on them in the legend.
  3. You can hover over data points to get information from them, e.g., the time and dataframe index to which the darapoint corresponds.
  4. You can save these figures interactively, you for to investigate and modify them later. This is particularly helpful for inspecting data outside of the Jupyter notebook.

image

image

image

image

image

I'm not setting it as the default, but it's easy to enable for the interested user.

Last thing to do:

@Bartdoekemeijer
Copy link
Collaborator Author

OK pushed up docstring changes. Ready for review and then merge!

Copy link
Collaborator

@paulf81 paulf81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Bartdoekemeijer, thank you for this! I'm just doing my testing and wanted to just jot down two notes while on front of mind:

  1. Should we add ipympl to the requirements? I think it is an additional requirement
  2. Why the == specification for bokeh? Could we not use >=?

Other than that examples work great and I approve the improvement!

@Bartdoekemeijer
Copy link
Collaborator Author

Great, thank you @paulf81! I updated the ipympl and bokeh dependencies. Merging now.

@Bartdoekemeijer Bartdoekemeijer merged commit 5070595 into NREL:develop Jul 4, 2023
@Bartdoekemeijer Bartdoekemeijer deleted the feature/bokeh_plots branch July 4, 2023 05:33
@misi9170 misi9170 mentioned this pull request Oct 26, 2023
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

Successfully merging this pull request may close these issues.

2 participants