I was able to extract the water area using Otsu algorithm for a specified year. Now I want to prepare a split window app to compare year on year for which I need to transform the whole code to a "on-click" button.
Any idea on how to do the same in Earth Engine.
Please find below the link to my code. https://code.earthengine.google.com/c22b9554bc13cbde76407b109338886d