R/create_statistics_template.R
create_statistics_template.Rd
To support the preparation of the subnational statistics,
create_raw_statistics_template()
can create three types of data templates:
ha for harvest area statistics
fs for farming system share
ci for cropping intensity.
create_statistics_template(type, param)
Character vector that refers to the type of template that needs to be created. See details for allowed input.
Object of type spam_par
that bundles all SPAM parameters,
including core model folders, alpha-3 country code, year, spatial
resolution, most detailed level at which subnational statistics are
available, administrative unit level at which the model is solved and type of
model.
The function requires information on how the different administrative unit
levels are nested. This file needs to be created first by running
create_adm_list()
.
The dimensions of the ha template are determined by adm level set by
spam_par()
, while the dimensions of the fs and cs templates (which are
identical) are determined by the solve level parameter.
create_statistics_template(type = "ha", param)
#> Error in eval(expr, envir, enclos): object 'param' not found