I want to calculate the longterm mean NDVI anomaly at a specific geometry point buffered to 1000m. I have calculated the longterm mean NDVI for the 20 year period. Because I want to calculate NDVI anomalies per year, I have calculated the monthly mean NDVI for the year 2020 as my first observation period.
The 20 year longterm mean NDVI and the monthly mean NDVI scripts are working as can be seen from the timeseries plots generated.
I am getting an error at line 224 of the script calculating the NDVI anomalies where I am trying to write a function that returns the anomalies using the formula below;
Ndvi_anomalies = monthly mean NDVI - longterm mean NDVI
Looking forward to your help and suggestions.
Here is the link to the code; https://code.earthengine.google.com/19e96a3fcda5b52fa84f1ed96ccf1dc8