Learn R Programming

cartograflow (version 1.0.0)

flowtype: Compute flowdata types

Description

Compute gross and net flows from initial asymetric flow values

Usage

flowtype(tab, format, x)

Arguments

tab

the input flow dataset

format

specify the flow dataset format : M = square matrix [n*n] or L=lng [i,j,data]

x

enter the computation type : "flux", "transpose", "bivolum" and "bisold".

Details

The matrice must be squared (if not, see flowcarre). This function compute for all (i,j) involved in an asymetric flow matrix (Fij) several matrix. - x = "flux" for initial flow (Fij) - x = "transpose" for reverse flow value (Fji) - x = "bivolum" for bilateral gross flow Vij=(Fij+Fji) - x = "bisold" for bilateral net flow Sij=(Fij-Fji)

References

Bahoken Francoise, 2016, L'approche cartographique de la d<U+00E9>composition des matrices de flux, Mappemonde, Revue sur l'image g<U+00E9>ographique et les formes du territoire, number 116, URL : https://mappemonde-archive.mgm.fr/num44/articles/art14404.html

Examples

Run this code
# NOT RUN {
library(cartograflow)
data(flowdata)
bkg<- system.file("shape/MGP_TER.shp", package="cartograflow",
                  lib.loc = NULL, mustWork = TRUE)

##1a:Computes flowtypes: Matrice format
matflow<-flowtabmat(flows,matlist = "M")
m<-flowtype(matflow,format ="M",x="flux")
m<-flowtype(matflow,format ="M",x="transpose")
m<-flowtype(matflow,format ="M",x="bivolum")
m<-flowtype(matflow,format ="M",x="bisold")

##1b:Computes flowtypes: Long format
list<-flowtabmat(matflow,matlist="L")
colnames(list)<-c("i","j","Fij")
l_all<-flowtype(list,format ="L",x="all")
l_sold<-flowtype(list,format ="L",x="bisold")

# }
# NOT RUN {
#2:flowmapping: example of bisold
flowmap(l_sold,format = "L",bkg,code = "EPT_NUM",
         filter= TRUE,threshold= 20, taille = 5)
# }

Run the code above in your browser using DataLab