feat: Add 'Show raw data' checkbox to Explore widgets #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Closes #168
Description of changes
This commit adds a 'Show raw data' checkbox to the
Explore...
widgets in the seismometer package.When the checkbox is enabled, the underlying pandas.DataFrame used to produce the current visualization is displayed. The raw data output updates reactively when any widget controls (e.g., dropdowns, sliders, filters) change.
To achieve this, the following changes were made:
UpdatePlotWidget
insrc/seismometer/controls/explore.py
was updated to include the 'Show raw data' checkbox.ExplorationWidget
in the same file was modified to handle the display of the raw data.src/seismometer/api/plots.py
andsrc/seismometer/api/explore.py
were updated to return a tuple of (HTML, pd.DataFrame).disk_cached_html_and_df_segment
was created to handle caching both the HTML and the DataFrame.tests/controls/test_explore.py
were updated to reflect these changes.Author Checklist
changelog/ISSUE.TYPE.rst
files; see changelog/README.md.