Description Usage Arguments Value Author(s) See Also Examples
The function uses weighted spatio-temporal interpolation to produce gridded
maps of transformed charcoal values. Spatial grids are used to interpolate
transformed charcoal values for a key period defined by Age
. For each
grid cell the function search charcoal sites located in a radius defined by
distance_buffer
from the grid centre and at an elevation within a
range defined by elevation_buffer
from the mean elevation of the
cell. Then the function search for charcoal samples within a temporal range
from the key date defined by time_buffer
. Finally a tricube distance
weighting function is applied to each sample by considering it spatial
distance to the grid centre and it temporal distance to the key date. This
approach that weight samples according to their spatio-temporal location
also down-weight charcoal sites that are poorly sampled.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
An object returned by |
cell_sizex |
Numeric, grid cell width (m). |
cell_sizey |
Numeric, grid cell height (m). |
age |
Numeric, key date (years BP). |
cell_size |
Numeric, grid cell size (bypass cell_sizex and cell_sizey and produce square cells). |
time_buffer |
Numeric, temporal distance (years) from the key date to search for charcoal samples. |
distance_buffer |
Numeric, spatial distance from the grid centres to search for charcoal samples (m). |
raster_extent |
Numeric, define custom extent for the analysis such as raster_extent = c(xmin, xmax, ymin, ymax) |
elevation_buffer |
Numeric, elevation range from the mean grid cell elevation to search for charcoal sites. |
proj4 |
String, proj.4 string representing the desired projection for plotted maps. Default is Robinson ("+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"). See http://www.spatialreference.org to look up the string for your favorite projections. |
sea_mask |
Logical, mask cells falling in the sea. |
other_mask |
A sp object (SpatialPolygonsDataFrame) used to mask data
i.e. for not interpollating pixels under the mask (classical usage: ice
extent mask). Note that the SpatialPolygonsDataFrame projection must be used
in the analysis and defined using |
verbose |
Logical, verbose or not... |
A "pfGridding" object (list) that could be plotted using
plot.pfGridding
.
O.Blarquez
plot.pfGridding
, pfTransform
,
pfDotMap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ## Not run:
ID=pfSiteSel(continent="North America", l12==1, long>-85)
TR=pfTransform(ID,method=c("MinMax","Box-Cox","Z-Score"),BasePeriod=c(200,4000))
p=pfGridding(TR,age=1000)
summary(p)
require(raster)
plot(p$raster)
## Example of other_mask usage: we will use here Dyke 2003 ice extent map for North
America
require(maptools)
ID=pfSiteSel(continent=="North America", long>-100,lat>40)
TR=pfTransform(ID,method=c("MinMax","Box-Cox","Z-Score"),BasePeriod=c(200,4000))
## Define projection (same as Dyke 2003)
proj4="+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49
+lon_0=-95 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"
## Download the shapefile
where=getwd()
download.file("http://blarquez.com/public/data/ice_9500_calBP_lcc.shp",
paste0(where,"/ice_9500_calBP_lcc.shp"))
download.file("http://blarquez.com/public/data/ice_9500_calBP_lcc.dbf",
paste0(where,"/ice_9500_calBP_lcc.dbf"))
download.file("http://blarquez.com/public/data/ice_9500_calBP_lcc.shx",
paste0(where,"/ice_9500_calBP_lcc.shx"))
ice_shp=readShapePoly(paste0(where,"/ice_9500_calBP_lcc.shp"),
proj4string=CRS(proj4))
plot(ice_shp)
p=pfGridding(TR,age=9500,cell_size=100000,distance_buffer=300000,
proj4=proj4,other_mask=ice_shp)
plot(p,add=ice_shp)
# Citation: Dyke, A.S., Moore, A. And Robertson, L. 2003 :
# Deglaciation of North America, Geological Survey of Canada Open File 1574.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.