-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
255 lines (189 loc) · 9.76 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
echo = TRUE,
warning = FALSE,
message = FALSE
)
```
<p id="start" align="center">
<a href="#start"><img height="300rem" src="man/figures/logo.png"></a>
</p>
<div align="center">
<a href="https://github.com/RobelTakele/AquaBEHER/issues/new?labels=bug&projects=&template=01_BUG-REPORT.yml&title=%5BBUG%5D+%3Ctitle%3E" style="font-size: 20px;">Report a Bug</a> |
<a href="https://github.com/RobelTakele/AquaBEHER/discussions/new?category=ideas" style="font-size: 20px;">Request a Feature</a> |
<a href="https://github.com/RobelTakele/AquaBEHER/discussions/new/choose" style="font-size: 20px;">Ask a Question</a>
<!-- badges: start -->
<a href="https://github.com/RobelTakele/AquaBEHER"><img src="https://img.shields.io/github/v/release/RobelTakele/AquaBEHER" alt="GitHub release" height="25">
</a>
<a href="https://github.com/RobelTakele/AquaBEHER/actions/workflows/R-CMD-check.yaml">
<img src="https://github.com/RobelTakele/AquaBEHER/actions/workflows/R-CMD-check.yaml/badge.svg" alt="R-CMD-check" height="25">
</a>
<a href="https://lifecycle.r-lib.org/articles/stages.html#stable">
<img src="https://img.shields.io/badge/lifecycle-stable-brightgreen.svg" alt="Lifecycle: stable" height="25">
</a>
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html">
<img src="https://img.shields.io/badge/license-GPL--3-blue.svg" alt="license" height="25">
</a>
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html">
<img src="https://cranlogs.r-pkg.org/badges/AquaBEHER" alt="metacran downloads" height="25">
</a>
<!-- badges: end -->
</div>
<p id="line" align="center">
<a href="#line"><img height="10rem" src="man/figures/aqua.png"></a>
</p>
**Estimates** and **predicts** the wet season calendar (WSC) and soil water balance for agricultural applications. It integrates daily potential evapotranspiration (PET) and soil water balance parameters to compute the WSC for crop and soil water management. Using these parameters, `AquaBEHER` can estimate and predict the onset, cessation, and duration of the wet season based on an agroclimatic approach.
### ⛓ Key Features
- **Daily potential evapotranspiration (PET)** estimation using various methods.
- **Daily soil water balance** estimation based on adjustable soil water holding capacity (soilWHC).
- **Wet season calendar** estimation and seasonal prediction including:
- Onset of the wet season
- Cessation of the wet season
- Duration of the wet season
`AquaBEHER` is designed to facilitate water-efficient agricultural practices in response to climate variability and change.
---
## :arrow_down: Installation
### Install from CRAN:
```r
install.packages("AquaBEHER")
```
### Install the development version from GitHub:
```r
# install.packages("devtools")
devtools::install_github("RobelTakele/AquaBEHER")
```
To view the vignettes in RStudio, run:
```r
vignette("AquaBEHER", "AquaBEHER")
```
Further details regarding `AquaBEHER` are available on the package website, visit [here](https://robeltakele.github.io/AquaBEHER/).
---
## :fast_forward: Quick Example
Here's a quick example to estimate daily soil water balance:
```{r example, message=FALSE}
library(AquaBEHER)
data(AgroClimateData)
# Estimate PET using Penman-Monteith method
PET <- calcEto(AgroClimateData, method = "PM", Zh = 10)
# Add PET to the dataset
AgroClimateData$Eto <- PET$ET.Daily
# Estimate daily soil water balance for a soil with 100mm water holding capacity
watBal.list <- calcWatBal(data = AgroClimateData, soilWHC = 100)
watBal <- watBal.list$data
head(watBal)
```
---
## :bar_chart: Visualization
Visualize the daily soil water balance, rainfall, and potential evapotranspiration (Eto) for the climatological year 2019–2020:
```{r watBalPlot, fig.height=6, fig.width=8, fig.dpi=400}
library(ggplot2)
# Filter the data for 2019 and 2020
watBal.19T20 <- watBal[watBal$Year %in% c(2019, 2020), ]
date.vec <- as.Date(paste(watBal.19T20$Year, watBal.19T20$Month, watBal.19T20$Day, sep = "-"), format = "%Y-%m-%d")
watBal.19T20$date <- date.vec
# Plot water balance with ggplot2
ggplot(watBal.19T20, aes(x = date)) +
geom_bar(aes(y = Rain), stat = "identity", fill = "#1f78b4", alpha = 0.6, width = 0.8) +
geom_line(aes(y = AVAIL), color = "#33a02c", size = 1.5) +
geom_line(aes(y = Eto), color = "#ff7f00", size = 1.2, linetype = "dashed") +
scale_x_date(date_labels = "%b %Y", date_breaks = "1 month", expand = c(0.01, 0)) +
scale_y_continuous(
name = "Available Soil Water (mm)",
sec.axis = sec_axis(~., name = "Rainfall (mm)")
) +
labs(
title = "Rainfall, Available Soil Water, and Potential Evapotranspiration",
subtitle = "2019-2020 Data",
x = NULL, y = NULL
) +
theme_minimal(base_size = 15) +
theme(
plot.title = element_text(face = "bold", size = 18, hjust = 0.5),
plot.subtitle = element_text(size = 14, hjust = 0.5, color = "grey40"),
axis.text.x = element_text(angle = 45, hjust = 1),
panel.grid.minor = element_blank(),
panel.grid.major = element_line(linetype = "dotted", color = "grey80")
)
```
## :memo: Citation
If you used `AquaBEHER` in your work, please cite it. You can view the most recent citation by running:
```r
citation(package = "AquaBEHER")
```
```
To cite `AquaBEHER` in publications, please use:
Robel Takele, Matteo Dell'Acqua (2023). `AquaBEHER`: Estimation and Prediction of Wet Season Calendar and Soil
Water Balance for Agriculture. R package version 1.0.0. Available at
https://cran.r-project.org/web/packages/AquaBEHER
A BibTeX entry for LaTeX users is:
@Manual{,
title = {`AquaBEHER`: Estimation and Prediction of Wet Season Calendar and Soil Water Balance for Agriculture},
author = {Robel Takele and Matteo Dell'Acqua},
year = {2023},
note = {R package version 1.0.0},
url = {https://robeltakele.github.io/AquaBEHER/},
}
```
## :earth_africa: Feedback and Contributions 🤝
We appreciate feedback and contributions to improve `AquaBEHER`. Feel free to report bugs, suggest features, or join discussions.
Your contributions make a difference!
> [!IMPORTANT]
> Submit issues [here](https://github.com/RobelTakele/AquaBEHER/issues/) or join discussions [here](https://github.com/RobelTakele/AquaBEHER/discussions).
✤ <i>We appreciate your support and look forward to making our package even better with your help!</i>
---
## :mailbox_with_mail: Contact Us
<img align="right" width="300" src="http://www.capitalisegenetics.santannapisa.it/sites/default/files/u65/Logo%20plant%20sciences.png">
The **Genetics Group** at the *Institute of Plant Sciences* is a culturally diverse, research-driven team focused on advancing agricultural innovation. We combine crop genetics, climate science, and participatory strategies to develop sustainable farming solutions.
We are based at **Scuola Superiore Sant'Anna**, Pisa, Italy.
For inquiries, please reach out to:
- [Matteo Dell'Acqua](mailto:[email protected])
- [Mario Enrico Pè](mailto:[email protected])
Learn more about our work on the [institute web page](https://www.santannapisa.it/en/institute/plant-sciences).
<div align="center">
<a href="https://twitter.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-000000?logo=x&logoColor=white" alt="Share on X">
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-0A66C2?logo=linkedin&logoColor=white" alt="Share on LinkedIn">
</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-1877F2?logo=facebook&logoColor=white" alt="Share on Facebook">
</a>
<a href="https://www.reddit.com/submit?title=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-FF4500?logo=reddit&logoColor=white" alt="Share on Reddit">
</a>
</div>
## :link: Resources
- [`AquaBEHER` Documentation](https://CRAN.R-project.org/package=AquaBEHER)
- [`AquaBEHER` GitHub Repository](https://github.com/RobelTakele/AquaBEHER)
- [Scuola Superiore Sant'Anna](https://www.santannapisa.it/en/institute/plant-sciences)
---
## 🌟 Show Your Support
If you find **`AquaBEHER`** helpful or interesting, please consider giving us a star on GitHub. Your support helps promote the project and lets others know it's worth checking out.
🙏 Thank you for your support! 👍
[![Star this project](https://img.shields.io/github/stars/RobelTakele/AquaBEHER?style=social)](https://github.com/RobelTakele/AquaBEHER/stargazers)
---
## 👥 Contributors
<div>
<p>
👨💻 <b>Robel Takele</b><br>
Email: <a href="mailto:[email protected]">[email protected]</a><br>
GitHub: <a href="https://github.com/RobelTakele">@RobelTakele</a>
</p>
<p>
👨💻 <b>Matteo Dell'Acqua</b><br>
Email: <a href="mailto:[email protected]">[email protected]</a><br>
GitHub: <a href="https://github.com/mdellh2o">@MatteoDellAcqua</a>
</p>
</div>
### 🄯 License
This project is licensed under the GNU General Public License, [GPL-3](https://cran.r-project.org/web/licenses/GPL-3).
<p align="right"> <a href="#start"><button style="padding:10px 30px; background-color:#0096FF; color:white; border:none; border-radius:5px; cursor:pointer;">Back to Top</button></a> </p>