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

Turbidity_Animated_Timeseries_notebook #1073

Merged
merged 8 commits into from
Jun 16, 2023
Merged

Turbidity_Animated_Timeseries_notebook #1073

merged 8 commits into from
Jun 16, 2023

Conversation

Joram95
Copy link
Collaborator

@Joram95 Joram95 commented Jun 13, 2023

Proposed real world example notebook "Turbidity_animated_timeseries" created by Joram Downes

Proposed changes

This notebook allows the user to create a time series animation depicting a turbidity plume at the Murray Mouth and the surrounding coastline. The animations contrast Sentinel-2 imagery taken from early-2022 to mid-2023; this coincides with the flood of a generation, peaking in mid-January 2023, leading to a stark decline in water quality within the vicinity. This example demonstrates how to:

  • Load Sentinel-2 data
  • Compute a turbidity and water indices (NDTI, NDWI)
  • Mask pixels which contain land and cloud
  • Create time series animations
  • Visualise changes in turbidity throughout a floodwater discharge event

Closes issues (optional)

  • Closes Issue #000
  • Closes Issue #000

Checklist (replace [ ] with [x] to check off)

  • Notebook created using the DEA-notebooks template
  • Remove any unused Python packages from Load packages
  • Remove any unused/empty code cells
  • Remove any guidance cells (e.g. General advice)
  • Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended).
  • Include relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
  • Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated
  • Test notebook on both the NCI and DEA Sandbox (flag if not working as part of PR and ask for help to solve if needed)
  • If applicable, update the Notebook currently compatible with the NCI|DEA Sandbox environment only line below the notebook title to reflect the environments the notebook is compatible with

Proposed real world example notebook "Turbidity_animated_timeseries" created by Joram Downes
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@erialC-P
Copy link
Collaborator

Hey Joram!
Thank you so much for the addition of this AWESOME notebook to the collection. I'm looking at your PR this week and will make a couple of updates to the dea_tools module so that your notebook here can really pop! In the meantime, I just wanted to let you know that I'm looking at this PR and will approve and merge it asap!

@Joram95
Copy link
Collaborator Author

Joram95 commented Jun 15, 2023

Thanks Claire,
Good luck and happy coding!
FYI I’m leaving the country tomorrow and won’t have my laptop so I might not be able to assist until the 3rd of July. I will be able to answer emails 😊
Cheers

erialC-P added 5 commits June 16, 2023 04:14
I have suggested a couple of changes and implemented them in this commit. They include:
- land masking each image against itself rather than against a single image in the time series. I thought that this would make the outputs more dynamic and will handle tide and flooded inland waterways.
- simplified your cloud masking function but its outputs should be unchanged
- I have made a separate PR to the dea_tools module to include an NDTI index. (As there was already a tillage index, our version is called NDTI2). I have updated the notebook to use this calculation.
- The dea_tools PR also includes an update to the rgb plotting function to enable the addition of titles to subplots. In this case, the titles now note the image timesteps that users can use to identify timesteps for the animations.
- I have consolidated the animation timestep selection into a single new variable.
- I also added a direct comparison of the animations datasets to confirm that their datestamps are the same.
- Finally, I made a couple minor grammatical changes.
I temporarily added the updated script while reviewing the notebook. I'm deleting it now to avoid conflicts with the dea_tools PR that will add these changes to the repo.
I temporarily added the updated script while reviewing the notebook. I'm deleting it now to avoid conflicts with the dea_tools PR that will add these changes to the repo.
Copy link
Collaborator

@erialC-P erialC-P left a comment

Choose a reason for hiding this comment

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

Hey Joram,
Thanks for your hard work in adding this excellent notebook to the DEA-notebooks repo!
I made a small series of changes that are incorporated into my commit of the notebook to your branch.
I made some minor changes to simplify your two masking steps. The cloud masking outputs are unchanged. I updated the land masking to make it dynamically mask each time step against itself which will hopefully account for changes in tide and inland flooding as relevant at other locations across Australia.
This PR also motivated an update to the dea_tools repo meaning your notebook now includes a direct calculation of NDTI and your subplots can now be labelled with their timesteps to support users to select the images for their animations.
I hope you're supportive of these changes. Feel free to recommend reverting to the original code, especially in the case of the masking. Otherwise, this notebook is a great addition to the resources in the repo and is ready to be added once the related dea_tools PR is approved. (I'll jump in and finalise the approval of this PR once the other is approved, unless I hear from you first!)
Thanks again!

@Joram95
Copy link
Collaborator Author

Joram95 commented Jun 16, 2023

That all sounds great! I think every change you have made has enhanced the code. I look forward to seeing it up on the sandbox.
Many Thanks 👍

@robbibt
Copy link
Member

robbibt commented Jun 16, 2023

Yep, had a quick look too and this looks awesome - fantastic work @Joram95 and great changes @erialC-P!

I have a few tiny suggestions (mainly around consistency with other notebooks, and a change to reduce the file size of the notebook) so I'll do a super quick review too once Claire's stuff is all integrated 😃

@erialC-P erialC-P merged commit 7cc2e6b into develop Jun 16, 2023
@erialC-P erialC-P deleted the Joram95-patch-1 branch June 16, 2023 10:47
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.

3 participants