climatrends
Provides methods to compute precipitation and temperature indices for climate models in ecology.
https://github.com/AgrDataSci/climatrends
Category: Consumption
Sub Category: Agriculture and Nutrition
Keywords
climate-data climatology timeseries-analysis
Keywords from Contributors
agricultural ecosystem-models
Last synced: about 6 hours ago
JSON representation
Repository metadata
Climate Variability Indices for Ecological Modelling
- Host: GitHub
- URL: https://github.com/AgrDataSci/climatrends
- Owner: AgrDataSci
- License: other
- Created: 2020-02-08T09:50:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-11-21T11:09:32.000Z (about 1 month ago)
- Last Synced: 2025-12-21T16:39:02.620Z (3 days ago)
- Topics: climate-data, climatology, timeseries-analysis
- Language: R
- Homepage:
- Size: 18.4 MB
- Stars: 4
- Watchers: 6
- Forks: 6
- Open Issues: 2
- Releases: 3
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codemeta: codemeta.json
README.md
climatrends
climatrends: Climate Variability Indices for Ecological Modelling
Overview
Understanding how climate variability influences ecological and agricultural systems is essential for climate adaptation, biodiversity conservation, and environmental modeling. climatrends provides a unified framework to compute temperature, precipitation, and crop-related climate indices. These indices serve as inputs for crop models, ecological analyses, phenology studies, and assessments of climate trends.
The methods implemented in climatrends have been applied in several research domains, including crop growing cycle analysis, regional climate trend detection, citizen science in agriculture, and studies comparing climate trends with farmers’ perceptions.
Statement of need
Reproducibility (being able to repeat an analysis) and replicability (being able to repeat an experiment) are essential principles in science, yet they remain challenging in many agricultural and ecological studies. Analyses often rely on custom scripts, inconsistent definitions of climate indices, or non-standard workflows, making results difficult to reuse across locations and seasons.
climatrends was developed to address this gap. The package evolved from a collection of scripts used in previous studies and now provides standardized, transparent, and reproducible methods to compute well-established climate indices. The functions are designed to handle heterogeneous testing environments—a common characteristic of decentralized agricultural trials—where locations differ in climate, timing, and growing seasons. The package also supports fixed-period time-series analysis and integrates smoothly with API-based climate data sources (e.g., nasapower).
The temperature, precipitation, and crop-sensitive indices implemented in climatrends draw from validated methods in climatology and crop science. The package is listed in the CRAN Task View for Agricultural Science.
Package website
https://agrdatasci.github.io/climatrends/
Installation
The package may be installed from CRAN via
install.packages("climatrends")
The development version can be installed via
library("remotes")
install_github("agrdatasci/climatrends", build_vignettes = TRUE)
Example
The default method for the function temperature() has as the basic input one numeric vector with the maximum temperature and one numeric vector with the minimum temperature:
library("climatrends")
data("innlandet", package = "climatrends")
temperature(innlandet$tmax, innlandet$tmin)
maxDT minDT maxNT minNT DTR SU TR CFD WSDI CSDI T10p T90p
<dbl> <dbl> <dbl> <dbl> <int> <int> <int> <int> <int> <int> <dbl> <dbl>
1: 15.13 -14.86 6.77 -19.25 6 0 0 115 4 5 -15.81 9.09
The indices can be splitted in intervals for series analysis. Here we get the temperature indices with intervals of 30 days.
temperature(innlandet$tmax, innlandet$tmin,
dates = innlandet$day,
timeseries = TRUE,
intervals = 30)
id date index value
<int> <date> <chr> <dbl>
1: 1 2019-01-01 maxDT -0.15
2: 1 2019-01-01 minDT -14.86
3: 1 2019-01-01 maxNT -3.41
4: 1 2019-01-01 minNT -18.67
5: 1 2019-01-01 DTR 4.35
---
68: 1 2019-05-31 CFD 3.00
69: 1 2019-05-31 WSDI 2.00
70: 1 2019-05-31 CSDI 3.00
71: 1 2019-05-31 T10p 0.20
72: 1 2019-05-31 T90p 11.14
Going further
The full functionality of climatrends is illustrated in the package vignette. The vignette can be found on the package website or from within R once the package has been installed, e.g. via
vignette("Overview", package = "climatrends")
Meta
-
Package website
-
Please report any issues or bugs.
-
License: MIT
-
Get citation information for climatrends in R by typing
citation(package = "climatrends"). -
You are welcome to contribute to the climatrends project. Please read our contribution guide lines.
-
Please note that the climatrends project is released with a Contributor Code of Conduct. By participating in the climatrends project you agree to abide by its terms.
Owner metadata
- Name: AgrDataSci
- Login: AgrDataSci
- Email: k.desousa@cgiar.org
- Kind: organization
- Description: We develop methods and tools to support sustainable food systems, rural development and digital inclusion
- Website:
- Location: France
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/50193892?v=4
- Repositories: 8
- Last ynced at: 2023-03-05T19:46:36.376Z
- Profile URL: https://github.com/AgrDataSci
GitHub Events
Total
- Watch event: 1
- Push event: 2
Last Year
- Push event: 2
Committers metadata
Last synced: about 15 hours ago
Total Commits: 114
Total Committers: 3
Avg Commits per committer: 38.0
Development Distribution Score (DDS): 0.018
Commits in past year: 6
Committers in past year: 1
Avg Commits per committer in past year: 6.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| kauedesousa | k****a@i****o | 112 |
| istfer | f****m@g****m | 1 |
| David LeBauer | d****r@a****u | 1 |
Committer domains:
- arizona.edu: 1
- inn.no: 1
Issue and Pull Request metadata
Last synced: 4 months ago
Total issues: 15
Total pull requests: 3
Average time to close issues: 6 months
Average time to close pull requests: 2 months
Total issue authors: 3
Total pull request authors: 2
Average comments per issue: 1.07
Average comments per pull request: 0.33
Merged pull request: 2
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- istfer (6)
- kauedesousa (5)
- dlebauer (4)
Top Pull Request Authors
- dlebauer (2)
- istfer (1)
Top Issue Labels
- enhancement (3)
Top Pull Request Labels
Package metadata
- Total packages: 3
-
Total downloads:
- cran: 608 last-month
- Total docker downloads: 21,613
- Total dependent packages: 3 (may contain duplicates)
- Total dependent repositories: 6 (may contain duplicates)
- Total versions: 10
- Total maintainers: 1
proxy.golang.org: github.com/AgrDataSci/climatrends
- Homepage:
- Documentation: https://pkg.go.dev/github.com/AgrDataSci/climatrends#section-documentation
- Licenses: mit
- Latest release: v0.1.7 (published over 5 years ago)
- Last Synced: 2025-12-22T14:06:01.354Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
proxy.golang.org: github.com/agrdatasci/climatrends
- Homepage:
- Documentation: https://pkg.go.dev/github.com/agrdatasci/climatrends#section-documentation
- Licenses: mit
- Latest release: v0.1.7 (published over 5 years ago)
- Last Synced: 2025-12-22T14:06:01.566Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
cran.r-project.org: climatrends
Climate Variability Indices for Ecological Modelling
- Homepage: https://agrdatasci.github.io/climatrends/
- Documentation: http://cran.r-project.org/web/packages/climatrends/climatrends.pdf
- Licenses: MIT + file LICENSE
- Latest release: 0.1.13 (published almost 4 years ago)
- Last Synced: 2025-12-22T14:06:00.281Z (2 days ago)
- Versions: 8
- Dependent Packages: 3
- Dependent Repositories: 6
- Downloads: 608 Last month
- Docker Downloads: 21,613
-
Rankings:
- Forks count: 9.733%
- Dependent packages count: 10.637%
- Dependent repos count: 12.096%
- Average: 17.288%
- Downloads: 26.02%
- Stargazers count: 27.955%
- Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- methods * depends
- stats * imports
- chirps * suggests
- knitr * suggests
- nasapower * suggests
- rmarkdown * suggests
- sf * suggests
- testthat * suggests
Score: 12.899659729318506