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
Statistical Tools for Climate Change Analysis
Author: Sadikul Islam
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.
Install from source:
install.packages("climatestatsr_0.1.0.tar.gz",
repos = NULL, type = "source")
| 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 |
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("climatestatsr")
Islam, S. (2026). climatestatsr: Statistical Tools for Climate Change Analysis. R package version 0.1.0.
GPL-3. See LICENSE for details.
Sadikul Islam (ORCID: 0000-0003-2924-7122)
E-mail: [email protected]