flowcontig: Computes an ordinal distance matrices based on geographical...

Description Usage Arguments Details Value Examples

View source: R/flowcontig.R

Description

From a geographical background, compute an ordinal distance matrice based on a k-contiguity. The result is a neighbourhood graph that can be used for filtering flow values beor flow mapping (flowmap)

Usage

1
flowcontig(fdc, code, ordre)

Arguments

fdc

is the map background file (ie. a shapefile of polygons)

code

identifiant

ordre

number of borders to cross between origin and destination place. See details.

Details

Contiguity is in terms of the (k=1,2,4) number of spatial boundaries to be crossed between a place of origin and a place of destination -ordre=1 is when the flow have to cross only 1 boundary
-ordre=2 is when the origin-destinations places are distant from 2 borders
-ordre=4 is when the origin-destinations places are distant from 4 borders

Value

a (k) contiguity matrice with the (k) contiguity measures

Examples

1
2
3
4
5
6
7
8
library(cartograflow)
data(flowdata)
bkg<- system.file("shape/MGP_TER.shp", package="cartograflow",
                   lib.loc = NULL, mustWork = TRUE)
graph_ckij_1<-flowcontig(bkg,"EPT_NUM",ordre =1)

flowmap(graph_ckij_1,format="L",bkg,"EPT_NUM",
        filter = TRUE, taille = 0.5)

fbahoken/cartogRaflow documentation built on May 21, 2019, 1:43 p.m.