I have several hundred raster files (NDVI) of the same area dating back to the 1980’s, as well as daily rainfall observations from a nearby weather-station over the same period. The raster files are in the same folder and named by date, YYYY-MM-DD (I can re-name these if it will simplify things). I want to look at the relationship between rainfall and change in vegetation index over time at various points in that landscape using R, but I don’t know how to process the data efficiently.
Ideally the raster files could all be called from a single object, like a rasterstack, in which was also recorded the year and Julian day number (ie 1 to 365/6) for each image. I could then extract information from rasters from specific time periods or from the whole series, and / or relate change in vegetation index to specific rainfall events (which data I already have in Julian day and year in a data frame).
I can bring the raster files into R, named as they are in the original folder and stored in a list object, from which I can then make a rasterstack, but this doesn’t attribute them a date. Can I append a RAT to each raster when it is processed into the list, and automatically add year and Julian day attributes?
Can anyone suggest appropriate structures / functions to perform these tasks?