EcoMAPS_R: Main EcoMAPS wrapper function to produce GB maps from point...

Description Usage Arguments Details Value Author(s) Examples

View source: R/EcoMAPS_R.R

Description

Uses spatial statistical model to upscale point data to GB coverage mapped data sets using detailed covariate information

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
EcoMAPS_R(
PredVars=c("elevation1km","LCM2007_1kmDomTar","airTemperature","precipitation"),
time_slices=NULL,
csv_file = "CS_LOI_Point_PlusCovs.csv",
map_image_file = "map_plot.png",
fit_image_file = "fit_plot.png",
temp_netcdf_file = "temp",
output_netcdf_file = "output.nc",
mult_year <- NULL, 
rand_grp <- "SERIES_NUM",
data_type <- "Cont",
model_variable="loi",
saveplots=TRUE,
write_2_netcdf=TRUE
)

Arguments

PredVars

Names of covariates to be used in the model

time_slices

Defines which time slice to use for each input data set. eg precip runs 1970-2012 time_slice 1 = 1970

csv_file

Name of the point based csv file from the spatial concatenation in python

output_netcdf_file

Name of the final netcdf file that is written out

temp_netcdf_file

Name of the temporary file to write intermittent files to

mult_year

Variable in the source data set that defines the temporal aspect of the data

rand_grp

Variable in the source data set that defines any grouping structure present in the data that needs to be accounted for

data_type

Type of variable that is to be modelled - continuous, binary or count

model_variable

Name of variable (as it appears in csv file) that is to be modelled

saveplots

Logical, specifying whether plots should be saved to file

map_image_file

Name to give the png of the map image produced

fit_image_file

Name to give the png of the model summary plots produced

write_2_netcdf

Logical. should a netcdf file of the predicted map be written out to file specified by output_netcdf_file

Details

Currently uses a GAMM to do the modelling with the spatial corellation accounted for by the inclusion of a tensor product msmooth interaction between the spatial axes. Variation os taken straight from the model currently, but this will hopefuilly be replaced by bootstrapping in the near future.

Value

Returns a figure containing the mean and varaicne maps, a figure with goodness of fit plots and a NetCDF file containing the estimated gridded coverage over GB.

Author(s)

Peter Henrys

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
##wont work

#EcoMAPS_R(
#PredVars=c("elevation1km","LCM2007_1kmDomTar","airTemperature","precipitation"),
#time_slices=NULL,
#progress_rep_file = "progress.txt",
#user_name = "Test Harness" ,
#csv_file = "OutVars_EbergN_X.csv",
#output_netcdf_file = "EbergN.nc",
#mult_year <- NULL , 
#rand_grp <- "EASTING_km" ,
#data_type <- "Cont" ,
#model_variable="EbergN",
#saveplots=TRUE,
#map_image_file = "map_ebergN.png",
#fit_image_file = "fit_ebergN.png"
#)

NERC-CEH/Spatial-Upscaling-model documentation built on March 13, 2020, 12:03 a.m.