ioos / notebooks_demos

Notebook demonstrations and examples
https://ioos.github.io/notebooks_demos/
MIT License
19 stars 19 forks source link

Extend time in gts notebook #372

Closed MathewBiddle closed 3 years ago

MathewBiddle commented 3 years ago

I've made the time constraint more dynamic. Since the now functionality doesn't work with erddapy, I've done it using timedelta.

review-notebook-app[bot] commented 3 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

mwengren commented 3 years ago

Looks like a good workaround for the 'now-timeduration' limitation in erddapy @MathewBiddle. Hopefully we can support more of ERDDAP server-side functions in future erddapy versions.

MathewBiddle commented 3 years ago

@kbailey-noaa mentioned that making it more interactive might be useful. I've attempted to add in widgets for picking start and end dates. I'm wondering if we could add voila to this and give the user the time duration selector, then all the graphs and statistics could appear at the bottom of the page? Might be more useful that way instead of a 'data demo' notebook.

MathewBiddle commented 3 years ago

FYI, it looks like this notebook (a previous iteration of it) got pushed to the notebook site: https://ioos.github.io/notebooks_demos/notebooks/2020-10-10-GTS/

Not sure if we wanted to merge any of this additional work in? BTW the map isn't displayed at the bottom.

ocefpaf commented 3 years ago

FYI, it looks like this notebook (a previous iteration of it) got pushed to the notebook site: https://ioos.github.io/notebooks_demos/notebooks/2020-10-10-GTS/

I fixed the auto publication, so now all the merged PRs will be on the site. I can rebase this one later today and we can publish a newer version.

Not sure if we wanted to merge any of this additional work in? BTW the map isn't displayed at the bottom.

I'm in touch with ipyleaflet folks to fix that but I'm inclined to switch back to folium b/c of that :-/

MathewBiddle commented 3 years ago

I fixed the auto publication, so now all the merged PRs will be on the site. I can rebase this one later today and we can publish a newer version.

Awesome! No need to rebase if we aren't ready to push this PR out. I don't recall where we left this at.

I'm in touch with ipyleaflet folks to fix that but I'm inclined to switch back to folium b/c of that :-/

bummer

MathewBiddle commented 3 years ago

@ocefpaf, the most recent PR of this notebook uses widgets to get the start date and end date to query the ERDDAP server. I assume this will not be functional in the Data Demo Center. I think we should leave the notebook that is currently published alone.

We should work up something else, maybe more interactive for Kathy. I've tested the most recent PR on google colab and that might a good solution for @kbailey-noaa. You just need to add a cell at the beginning to install some required packages, but after that you can dig into the data however you want to.

!pip install ipywidgets
!pip install erddapy
!pip install pandas
!pip install ipyleaflet
ocefpaf commented 3 years ago

@ocefpaf, the most recent PR of this notebook uses widgets to get the start date and end date to query the ERDDAP server. I assume this will not be functional in the Data Demo Center. I think we should leave the notebook that is currently published alone.

Without a live kernel de widgets cannot get updated values from a server but if all the results are in the current state we can save the widget state and publish. Do you want to try that?

We should work up something else, maybe more interactive for Kathy. I've tested the most recent PR on google colab and that might a good solution for @kbailey-noaa. You just need to add a cell at the beginning to install some required packages, but after that you can dig into the data however you want to.

!pip install ipywidgets
!pip install erddapy
!pip install pandas
!pip install ipyleaflet

Yeah, colab has a fixed set of packages. Nice for testing but not really great for development.

ocefpaf commented 3 years ago

@MathewBiddle I'm sorry but I caused from conflicts here. Fixing conflicts in Jupyter notebooks is quite annoying. Do you mind saving the file you have on disk and resubmit this PR?

MathewBiddle commented 3 years ago

I've got the GTS notebook saved locally. Not sure how to

re-submitting this PR

ocefpaf commented 3 years ago

I've got the GTS notebook saved locally. Not sure how to

re-submitting this PR

Sorry. Autocomplete and cellphone did not help. I mean a new PR with the saved notebook.

MathewBiddle commented 3 years ago

See #398