knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
library(GrapeWeatheR)

Travis-CI Build Status codecov

GrapeWeatheR

The goal of GrapeWeatheR is to provide analysis of Environment Canada Climate Data for grape growers and agriculture purposes.

Examples

Download Data

We need to have weather data downloaded to analyze. We'll download data from Point Pelee for the last few years:

pelee_data<-weathercan::weather_dl(27533, interval = 'day', start = '2010-01-01')

Index Calculation

With the data at hand, we can calculate a few climatological indecies. Winkler, Huglin and Biologically Effective Degree Day (BEDD) indecies are various ways of determining the suitability of an area or expecting the type of grapes that may be more suitable for a location. In addition, more annual indices are calculated, see Ramos et. al (2008).

annual_pelee <- calculate_annual_indicies(pelee_data)
annual_pelee[,c("year", "GST_region", "WI_region", "HI_region", "BEDD_region")]

We can see that the past few years of BEDD indicies have shown the Pelee region to be r paste(annual_pelee$BEDD_region, collapse = ', ').

Plotting Temperature

We can plot some annualized results as well.

plot_index_history(pelee_data, index = 'GST')

Or, we can show the daily progression in degree growing days:

plot_index_progress(pelee_data, "Huglin")

Plotting Precipitation

Precipitation also matters for viticulture. GrapeWeatheR can evaluate and plot precipitation metrics as well. We'll use Ottawa data, as Point Pelee has limited precipitation data available. We can plot precipitatoin on a daily, weekly, monthly, or annual basis.

ottawa_data<-weathercan::weather_dl(49568, start = '2010-01-01', interval = 'day')

plot_precip_history(ottawa_data, interval = 'month', trim_years = 10)

As with the indecies, you can also plot 'progression' of precipitation accumilation for a region.

plot_precip_progress(ottawa_data)

Citations



pbulsink/GrapeWeatheR documentation built on Aug. 20, 2019, 7:36 p.m.