Description
Statistical Tools for Climate Change Analysis.
Description
A comprehensive collection of statistical functions for climate change research. Provides tools for temporal trend detection based on the Mann-Kendall (MK) test (Mann 1945 <doi:10.2307/1907187>; Kendall 1975, ISBN:0852641990) and Sen's slope (Sen 1968 <doi:10.2307/2285891>), spatial autocorrelation using Moran's I (Moran 1950 <doi:10.2307/2332142>), extreme value analysis using the Generalised Extreme Value (GEV) distribution and Peaks-Over-Threshold (POT) method (Coles 2001 <doi:10.1007/978-1-4471-3675-0>), standardised drought indices including the Standardised Precipitation Index (SPI; McKee et al. 1993) and the Standardised Precipitation Evapotranspiration Index (SPEI; Vicente-Serrano et al. 2010 <doi:10.1175/2009JCLI2909.1>), and formal detection-attribution methods via optimal fingerprint regression and Empirical Orthogonal Function (EOF) analysis (Allen and Tett 1999 <doi:10.1007/s003820050291>), and apparent temperature via the heat index (Steadman 1979 <doi:10.1175/1520-0450(1979)018%3C0861:TAOSPI%3E2.0.CO;2>). Suitable for both station-level time series and gridded climate fields.
README.md
climatestatsr
Statistical Tools for Climate Change Analysis
Author: Sadikul Islam
Overview
climatestatsr is a comprehensive R package providing statistical functions for climate change research. It covers temporal trend analysis, spatial analysis, extreme event assessment, standardised climate indices, and formal detection-attribution methods.
Installation
Install from source:
install.packages("climatestatsr_0.1.0.tar.gz",
repos = NULL, type = "source")
Function Families
| Family | Key Functions |
|---|---|
| Temporal | mk_test, sens_slope, change_point_detection, seasonal_decompose_climate, rolling_trend, temporal_homogeneity, trend_significance, autocorrelation_climate |
| Spatial | morans_i, hot_cold_spots, spatial_interpolate, spatial_trend_field, cluster_climate_zones, spatial_anomaly, elevation_lapse_rate |
| Extreme Events | fit_gev, return_period, peaks_over_threshold, heat_wave_detection, cold_spell_detection, drought_spell, extreme_value_index |
| Climate Indices | spi, spei, pdsi_simple, heat_index, wind_chill, frost_days, growing_degree_days, diurnal_temp_range |
| Attribution | detection_attribution, fingerprint_analysis, optimal_fingerprint |
| Utilities | fill_gaps_climate, homogenize_series, aggregate_climate, anomaly_baseline, standardize_climate, climate_summary |
Quick Example
library(climatestatsr)
# Mann-Kendall trend test
set.seed(42)
temp <- 14 + 0.025 * seq_len(50) + stats::rnorm(50, 0, 0.4)
result <- mk_test(temp)
print(result)
# Sen's warming rate per decade
ss <- sens_slope(y = temp)
cat("Warming:", round(ss$slope_decade, 3), "deg C per decade\n")
# SPI drought index
precip <- stats::rgamma(360, shape = 2, scale = 30)
spi3 <- spi(precip, scale = 3)
# GEV extreme value analysis
ann_max <- rgev_sim(50, mu = 35, sigma = 4, xi = 0.1)
gev <- fit_gev(ann_max)
rp <- return_period(gev, c(10, 50, 100))
print(rp)
Citation
citation("climatestatsr")
Islam, S. (2026). climatestatsr: Statistical Tools for Climate Change Analysis. R package version 0.1.0.
License
GPL-3. See LICENSE for details.
Contact
Sadikul Islam (ORCID: 0000-0003-2924-7122)
E-mail: [email protected].