Shumway RH, Stoffer DS. 2011. Time Series Analysis and Its Applications. With R Examples. New York, USA: Springer; 3rd Edition.
Data and analyses from this textbook are available in R under the astsa package.
Isaaks EH, Srivastava RM. 1989. An Introduction to Applied Geostatistics. New York: Oxford University Press.
Some data and analyses from this textbook are available in R under the gstat package.
For time-series analysis: https://cran.r-project.org/web/views/TimeSeries.html
For spatial analysis:Â https://cran.r-project.org/web/views/Spatial.html
NOTE: I will be using version 4.5.0 of the main R installation for Windows. While the latest version for any operating system (available from https://cran.r-project.org/) should be fine too, I only tested the R code in this environment.
For temporal autocorrelation analysis: Truckee and Carson River normalized discharge
For spatial autocorrelation analysis: Groundwater depth data file 1 and data file 2
For temporal autocorrelation analysis: Example script #1
For spatial autocorrelation analysis: Example script #2