Skip to content

Commit

Permalink
Updated notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
holukas committed Mar 1, 2024
1 parent f1976fa commit 390aa21
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 979 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

![DIIVE](images/logo_diive1_256px.png)

## v0.70.0 | 28 Feb 2024
## v0.70.1 | 1 Mar 2024

- Updated (and cleaned) notebook `StepwiseMeteoScreeningFromDatabase.ipynb`

`diive.core.io.filereader.example_ep_fluxnet`
## v0.70.0 | 28 Feb 2024

### New features

Expand Down
32 changes: 22 additions & 10 deletions diive/core/plotting/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
output_notebook()


# TODO
# TODO
# TODO
# TODO
# TODO

class TimeSeries:
def __init__(self,
series: Series,
Expand Down Expand Up @@ -55,10 +49,13 @@ def plot_interactive(self, height: int = 600, width: int = 1200):
width=width,
title=f"{self.series.name} ({self.series.index.name})",
tools=[
HoverTool(tooltips=[('Date', '@date{%F %T}'),
('Value', '@value')],
formatters={'@date': 'datetime'},
mode='mouse'),
HoverTool(
tooltips=[('Date', '@date{%F %T}'),
('Value', '@value')],
formatters={'@date': 'datetime'},
# mode='vline'
mode='mouse'
),
BoxZoomTool(),
ResetTool(),
PanTool(),
Expand All @@ -77,6 +74,21 @@ def plot_interactive(self, height: int = 600, width: int = 1200):

p.yaxis.axis_label = self.series.name

# # https://stackoverflow.com/questions/61340741/get-bokehs-selection-in-notebook
# from bokeh.models import CustomJS
# # make a custom javascript callback that exports the indices of the selected points to the Jupyter notebook
# callback = CustomJS(args=dict(s=source),
# code="""
# console.log('Running CustomJS callback now.');
# var indices = s.selected.indices;
# var kernel = IPython.notebook.kernel;
# kernel.execute("selected_indices = " + indices)
# """)
#
# # set the callback to run when a selection geometry event occurs in the figure
# p.js_on_event('selectiongeometry', callback)
# selected_indices

# # Add hover tooltip
# hover = HoverTool(
# tooltips=[
Expand Down
Loading

0 comments on commit 390aa21

Please sign in to comment.