The chirps package provides access to climate datasets produced by the Climate Hazards Center (CHC), University of California Santa Barbara. The package supports both high-level extraction of climate time series for points and polygons, as well as direct access to the original raster products through the terra package.
Supported datasets include:
| Dataset | Variables | Period |
|---|---|---|
| CHIRPS v2 | Precipitation | 1981–present |
| CHIRPS v3 | Precipitation | 1981–present |
| CHIRTS-daily | Tmax, Tmin, RHum, HeatIndex | 1983–2016 |
| CHIRTS-ERA5 | Tmax, Tmin | 1980–present |
The recommended workflow is to retrieve climate products as native
SpatRaster objects and use functions from
terra for subsequent extraction and spatial
analysis.
dates = c("2017-11-15", "2017-11-20")
v3 = get_chirps_raw(dates = dates, version = "3.0", type = "sat")
v3Available daily CHIRPS v3 products include:
"sat": daily totals derived using NASA IMERG"rnl": daily totals derived using ERA5 reanalysisOnce data are loaded as rasters, values can be extracted for locations of interest.
lonlat = data.frame(lon = c(-55.0281, -54.9857, -55.0714),
lat = c(-2.8094, -2.8756, -3.5279))
pts = vect(lonlat,
geom = c("lon", "lat"),
crs = "EPSG:4326")
rain = extract(v3, pts)
head(rain)The resulting object contains one row per location and one column per raster layer.
For users interested primarily in time series extraction, the package provides high-level functions that handle raster retrieval and extraction internally.
Because the package returns native SpatRaster objects,
users can directly leverage the terra ecosystem.
When using data obtained through this package, please cite the original datasets.
Funk, C., Peterson, P., Harrison, L. et al. (2026). The Climate Hazards Center Infrared Precipitation with Stations, Version 3. Scientific Data, 13, 718. https://doi.org/10.1038/s41597-026-07096-4
CHIRTS-ERA5 Data Repository https://doi.org/10.15780/G2F08J (2025). Data was accessed on [DATE].
Funk C., Peterson P., Landsfeld M., … Michaelsen J. (2015). The climate hazards infrared precipitation with stations—a new environmental record for monitoring extremes. Scientific Data, 2, 150066. https://doi.org/10.1038/sdata.2015.66
Verdin, A., Funk, C., Peterson, P., Landsfeld, M., Tuholske, C., and Grace, K. (2020). Development and validation of the CHIRTS-daily quasi-global high-resolution daily temperature data set. Scientific Data, 7, 303. https://doi.org/10.1038/s41597-020-00643-7