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

Geomedian notebook #1148

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Geomedian notebook #1148

wants to merge 1 commit into from

Conversation

margaretharrison
Copy link
Collaborator

@margaretharrison margaretharrison commented Nov 7, 2023

Proposed changes

Hi all, here is the geomedian product notebook, based on the Africa notebook.

All feedback is welcome!! Happy to change anything.

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

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@robbibt
Copy link
Collaborator

robbibt commented Nov 14, 2023

Hey @margaretharrison , haven't forgotten this one, aiming to get to it this week! It looks awesome at first glance

Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:29Z
----------------------------------------------------------------

Might be worth giving the full form here since the acronyms haven't been mentioned before? Below is stolen from CMI and may help.

Euclidean distance (EMAD) is more sensitive to changes in target brightness.
Cosine (spectral) distance (SMAD) is more sensitive to change in target spectral response.
Bray Curtis dissimilarity (BCMAD) is more sensitive to the distribution of the observation values through time.

Also, might be good to keep the instructions on how to load the GeoMAD in the Maps portal like DE Africa?


margaretharrison commented on 2024-03-04T19:29:24Z
----------------------------------------------------------------

Great idea, good catch! I've added that info to Background section at the top, and also put the maps instructions back in.

Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:30Z
----------------------------------------------------------------

I think the red line here isn't plotted at the threshold here because xmax for the 2nd axvspan is actually smaller than the threshold. Changes suggested below.


margaretharrison commented on 2024-03-04T19:40:07Z
----------------------------------------------------------------

Thanks for picking that up - changed.

Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:30Z
----------------------------------------------------------------

Line #10.    plt.xlim(0, 0.0128)

Change to plt.xlim(0, 0.02)


margaretharrison commented on 2024-03-04T19:40:27Z
----------------------------------------------------------------

Thank you!

Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:31Z
----------------------------------------------------------------

Line #12.    ax.axvspan(xmin=threshold, xmax=0.005, alpha=0.25, color="red", label="Irrigated")

Change to ax.axvspan(xmin=threshold, xmax=0.02, alpha=0.25, color="red", label="Irrigated")


margaretharrison commented on 2024-03-04T19:40:40Z
----------------------------------------------------------------

Thank you again!

Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:32Z
----------------------------------------------------------------

I think the widget also shows what the geometric median tries to do - minimise the distance between points, in this case the Euclidean distance in the brightness of the red, green and blue bands?


Copy link

review-notebook-app bot commented Nov 15, 2023

View / edit / reply to this conversation on ReviewNB

geoscience-aman commented on 2023-11-15T06:31:33Z
----------------------------------------------------------------

It may be worth adding that this case shows that the geomedian is not a true measurement, whereas the median is.


Copy link
Collaborator

@geoscience-aman geoscience-aman left a comment

Choose a reason for hiding this comment

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

Thanks @margaretharrison! Please let me know if any of my comments don't make sense.

The farming area scene you chose works really well to show the irrigated areas! 😄

Maybe also worth adding this new and exciting notebook to DEA_products/README.rst as part of this pull request.

@geoscience-aman
Copy link
Collaborator

P.S. Might be worth looking into why the tests are failing before merging.

Copy link
Collaborator Author

Great idea, good catch! I've added that info to Background section at the top, and also put the maps instructions back in.


View entire conversation on ReviewNB

Copy link
Collaborator Author

Thanks for picking that up - changed.


View entire conversation on ReviewNB

Copy link
Collaborator Author

Thank you!


View entire conversation on ReviewNB

Copy link
Collaborator Author

Thank you again!


View entire conversation on ReviewNB

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.

None yet

3 participants