dea-notebooks
dea-notebooks copied to clipboard
Geomedian notebook
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 clickEdit
and then one of theApply X Formatter
options (YAPF
orBlack
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
andDEA 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
Check out this pull request on
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
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.
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