G-Lomax / mapping_degradation

R and Google Earth Engine code to monitor land degradation in East Africa using time series analysis
1 stars 0 forks source link

Calculate decay rates for each season for TPW locations #3

Closed G-Lomax closed 1 year ago

G-Lomax commented 1 year ago

Fit exponential decay curves to the dry season declines in NDVI back to baseline levels for each year, starting with the TPW points.

G-Lomax commented 1 year ago

Completed R code that separates each NDVI time series by hydrological year (Oct-Sep), automatically defines the segment representing the dry season decline and then fits either a linear or exponential decay model to it. It does this for both the original data (including cloud gaps) and for a smoothed version of the data using the Savitzky-Golay smoother, although the latter introduces some problems with artefacts (e.g., false dips in the curve immediately before the following season increase).

This initial analysis suggested that the average R-squared for linear models was greater than for exponential decays, and that the smoothed data provided a slightly better fit than the original. I think that this is probably a consequence of the simplistic method used to define the curve length, which resulted in many curves defined as starting early in the season when the first peak is reached rather than when the exponential period of the decay starts.

For a future iteration, I could try one of the following:

  1. Identify all maxima in the NDVI curve and pick the final one, or the one with the greatest drop to the subsequent minimum.
  2. Use rainfall data to explicitly define a wet season and choose the final maximum within that wet season
  3. Do something clever like identify when the slope changes from convex to concave.
G-Lomax commented 1 year ago

Next steps:

G-Lomax commented 1 year ago

Phew! I've actually taken another route and fitted logistic curves to the data, automatically isolating the biggest growth and decay segments and then optimising for parameters to fit those curves. It's worked fairly well for growth, less so for decay.

Next steps:

G-Lomax commented 1 year ago

Following supervision meeting, I need to focus my work on fitting simple models and extracting a few key metrics:

  1. Fit logistic, linear and exponential models and test which is the best fit. Simple gradient/max gradient might be better than logistic curves.
  2. Tweak code to resolve issues around hydrological year windows
  3. Extract a few simple metrics (max peak height, area under curve) per year as complementary indices
G-Lomax commented 1 year ago

I've completed these three tasks and have concluded:

  1. Logistic curves appear to be the best fit, which is not entirely surprising as they have the most degrees of freedom to fit the data (growth rate, ceiling value and midpoint). However, I'm still not sure they have the most informative statistic, since the rate of increase/decrease of NDVI can be a product of the growth rate and the ceiling value, rather than just gradient or exponent.
  2. I've adjusted the code to define growth/decay legs by the location of the maximum rather than the first value in the leg, which means they will always be allocated to the correct year .
  3. I've got these metrics, and they appear to have some relation to the plot-level estimates of plant basal area/bare ground.

Now I just need to plot a few nice graphs to show the results ready to share with Peadar/Peter.

G-Lomax commented 1 year ago

Completed this analysis for TPW data points and sent a cleaned-up HTML Markdown document/notebook to Peter and Peadar.