dea-notebooks icon indicating copy to clipboard operation
dea-notebooks copied to clipboard

Geomedian notebook

Open margaretharrison opened this issue 1 year ago • 13 comments

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)

  • [X] Notebook created using the DEA-notebooks template
  • [X] Remove any unused Python packages from Load packages
  • [X] Remove any unused/empty code cells
  • [X] Remove any guidance cells (e.g. General advice)
  • [X] 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).
  • [X] Include relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
  • [X] 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

margaretharrison avatar Nov 07 '23 03:11 margaretharrison

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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

robbibt avatar Nov 14 '23 05:11 robbibt

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.

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.

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!

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!

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?


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.


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

geoscience-aman avatar Nov 15 '23 06:11 geoscience-aman

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

margaretharrison avatar Mar 04 '24 19:03 margaretharrison

Thanks for picking that up - changed.


View entire conversation on ReviewNB

margaretharrison avatar Mar 04 '24 19:03 margaretharrison

Thank you!


View entire conversation on ReviewNB

margaretharrison avatar Mar 04 '24 19:03 margaretharrison

Thank you again!


View entire conversation on ReviewNB

margaretharrison avatar Mar 04 '24 19:03 margaretharrison