Learn R Programming

cropZoning

The goal of cropZoning is to make climate zoning of different crops (air temperature based) for any region of Brazil. For this, cropZoning uses minimum and maximum air temperature from Terraclimate dataset (http://www.climatologylab.org/terraclimate.html) calibrated with the automatic weather stations of National Meteorological Institute of Brazil (INMET).

Installation

To install the last version of cropZoning package follow this steps:

devtools::install_github("FilgueirasR/cropZoning")

Example

This is a basic example which shows you how to run the cropZoning package:

## basic example code

#devtools::install_github("FilgueirasR/cropZoning")
library(cropZoning)
library(raster)


see_brazil_states()

image_tmin<-loadROI(variable = "tmin", region = "brazil", sub_region = 19) # sub_region = Rio Grande do Norte
image_tmax<-loadROI(variable = "tmax", region = "brazil", sub_region = 19) # sub_region = Rio Grande do Norte

start_date<-c('2000-01-01')
end_date<-c('2017-12-01')

image_tmean<- tmean(tmax_stack = image_tmax , tmin_stack = image_tmin)

monthly_tmean <- cropZoning::tmean_monthly_stack(tmean_stack = image_tmean, start_date = start_date, end_date = end_date)
plot(monthly_tmean)

cz<-ccrop_zoning(monthly_tmean, temp1= 10, temp2= 20, temp3 = 30, temp4 = 40)
plot(cz)

plot_ccrop_zoning(cz)


Copy Link

Version

Install

install.packages('cropZoning')

Monthly Downloads

260

Version

1.0.3

License

CC BY 4.0

Maintainer

Roberto Filgueiras

Last Published

October 10th, 2023

Functions in cropZoning (1.0.3)

see_brazil_biomes

Function to see the Brazilian biomes available in cropZoning package and how we can use it in the loadROI function
tmean

Mean air temperature calculation
loadROI

Load the data for the region of interest (ROI)
download_terraclimate

Download of maximum and minimum air temperature from 'TerraClimate'
tmax_calibration

Calibration of maximum air temperature from TerraClimate
tmin_calibration

Calibration of minimum air temperature from TerraClimate
plot_ccrop_zoning

Function to plot the climate crop zoning stack generated in ccrop_zoning
tmean_monthly_stack

Monthly mean air temperature estimation to generate the climate crop zoning
see_brazil_states

Function to see the Brazilian states available in cropZoning package and how we can use it in the loadROI function
ccrop_zoning

Climate crop zoning based on monthly air temperature data