AggGEE | R Documentation |
R6 Class for executing the OFPE data aggregation process that consolidates data from Google Earth Engine to on-farm data. This is used within the 'AggDat' R6 class.
aggInputs
An object of the 'AggInputs' class containaing the options for aggregating data. This includes the database connection.
farmidx
The ID of the farm in which the field falls within.
farmeridx
The ID of the farmer that owns the farm that the field falls within.
PY
The year prior to the selected year of interest (cy_resp). This differs from the previous crop year used prior.
PY2
The year two years prior to the selected year of interest (cy_resp).
labels
The labels of the GEE covariates that are collected and aggregated.
type
The type of data corresponding to each respective label.
SOURCE
The SOURCE of data corresponding to each respective label.
year
The year of data to gather, corresponding to each respective label.
loy
The length of year for which to gather data for each respective label.
new()
Initialize an object for executing the process of aggregating Google Earth Engine data to OFPE data. Adds necessary columns to the temporary aggregated table, sets up the necessary options for gathering and extracting GEE data.
AggGEE$new(aggInputs, farmidx, farmeridx)
aggInputs
An 'AggInputs' R6 class with the user's aggregation options.
farmidx
The ID of the farm in which the field falls within.
farmeridx
The ID of the farmer that owns the farm that the field falls within.
An initialized 'AggGEE' object.
aggregateGEE()
Method for executing the aggregation of GEE data to the on-farm data within the OFPE database. First, gather the environmental variables that do not change year to year. Gather from 2015 to make sure they are there. Gather Daymet V3 and GRIDMET data, when possible, for both the current and previous year. Get current and previous year precipitation and growing degree day data. Gather vegetation index data from the current, previous, and two years prior. Do this for NDVI, NDRE, and CIRE indices. Additionally, when applicable, gather Landsat 8 and Sentinel 2 data. Because Landsat does not have the band frequencies to calculate NDRE and CIRE these are only available when Sentinel 2 data is available. If available, gather SMAP data from the current and previous year. Get the surface soil moisture and subsurface soil moisture from SMAP.
AggGEE$aggregateGEE()
None
No arguments necessary because identified in class instantiation.
GEE data aggregated to the temporary aggregated table in the database.
.getGEEdata()
Method for aggregating the Google Earth Engine data to the on-farm aggregated data. Identifies the appropriate data from the 'all_farms. gee' schema and extracts the values of each raster to each point in the field. All labels, type, SOURCE etc. are identified in the GEE data original filenames exported from GEE. The dot indicates that this function would be private if not for documentations sake.
AggGEE$.getGEEdata( label, type, SOURCE, year, loy, db, farmidx, farmeridx, farmername )
label
The labels for the GEE data to aggregate.
type
The type of data to aggregate.
SOURCE
The SOURCE of the data. (i.e. Landsat vs. Sentinel etc.).
year
The year of the data to gather.
loy
The length of year to get data from (i.e. 'mar' vs. 'full').
db
Connection to an OFPE database.
farmidx
ID of the farm that the field falls within.
farmeridx
ID of the farmer that owns the farm that the field falls within.
farmername
Name of the farmer that owns the field for aggregation.
Data in temporary aggregated table.
clone()
The objects of this class are cloneable with this method.
AggGEE$clone(deep = FALSE)
deep
Whether to make a deep clone.
DBCon
for the database connection class,
AggDat
for the class responsible for aggregating on-farm data,
AggInputs
for the inputs required for the aggregation
process.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.