flowtype {cartograflow} | R Documentation |
Compute bilateral several flow types
Description
Compute bilateral flow type: volumn (gross), balance (net), asymetry, min/max ... from an initial asymetric matrix
Usage
flowtype(
tab,
origin = NULL,
destination = NULL,
fij = NULL,
format,
lowup,
net,
x
)
Arguments
tab |
is the input flow dataset |
origin |
the place of origin code |
destination |
the place of destination code |
fij |
the flow value between origin and destination places |
format |
specify the flow dataset format, "M " for square matrix [n*n] or L for long [i,j,data] |
lowup |
for extracting the lower or upper triangular sub-portion of the bilateral volum matrix. See Details. |
net |
for extracting the "positive" or the "negative" flow values of the bilateral balance) matrix |
x |
enter the flow indicator type : "alltypes", "flux", "transpose", "bivolum", "bibal","biasym","bimin", "bimax","birange" and "bidisym" |
Details
The matrice must be squared (if not, see flowcarre).
This function compute for all pairs or origin-destination places (i,j)
involved in an asymetric flow matrix (Fij<> Fji) several matrix :
Param x:
- x = "flux" for the initial flow: (Fij)
- x = "transpose" for the reverse flow value: (Fji) =t(Fij)
- x = "bivolum" for the bilateral volum or gross flow: FSij=(Fij+Fji)
- x = "bibal" for the bilateral balance or net flow: FBij=(Fij-Fji)
- x = "biasym" for asymetry of bilateral flow: FAij=(FBij/FSij)
- x = "bimin" for the minimum of bilateral flow: minFij=(Fij, Fji)
- x = "bimax" for the maximum of bilateral flow: Fij(Fij, Fji)
- x = "birange" for the amplitude of bilateral flows: rangeFij=(maxFij - minFij)
- x = "bidisym" for the bilateral disymetry: FDij=(rangeFij/FSij)
- x = "alltypes" for computing all the available types of flows
Param lowup is for reducing the matrix:
- lowup ="up" for triangular part above the main diagonal
- lowup = "low" for triangular part below the main diagonal
Param net is for extracting positive or negative flow values of the bilateral balance (bibal matrix):
- net ="negative" values
- net ="positive" values
References
Bahoken Francoise, 2016, L'approche cartographique de la décomposition des matrices de flux, Mappemonde, Revue sur l'image géographique et les formes du territoire, number 116, URL : https://mappemonde-archive.mgm.fr/num44/articles/art14404.html
Examples
library(cartograflow)
data(flowdata)
bkg <- system.file("shape/MGP_TER.shp",package = "cartograflow",
lib.loc = NULL, mustWork = TRUE
)
## 1a:Computes flowtypes: Matrix 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 = "bibal")
## 1b:Computes flowtypes: Long format
types_all <- flowtype(flows,origin ="i",destination="j",fij="Fij", format = "L",
x = "alltypes")
bivol<- flowtype(flows,origin ="i",destination="j",fij="Fij",format = "L",
x = "bivolum",lowup="up")
bibal_net<- flowtype(flows,origin ="i",destination="j",fij="Fij",format = "L",
x = "bibal", net="negative")