Learn R Programming

cartograflow (version 1.0.0)

flowcontig: Computes an ordinal distance matrices based on geographical background

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

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.

Value

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

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

Examples

Run this code
# NOT RUN {
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)
# }
# NOT RUN {
flowmap(graph_ckij_1,format="L",bkg,"EPT_NUM",
        filter = TRUE, taille = 0.5)
# }

Run the code above in your browser using DataLab