flowplaces {cartograflow}R Documentation

Computes flow indicators per places

Description

Compute indicators per places (origin and/or destination ) from the margins of the matrix. Ex/ in and out degrees, gross and net flows, asymmetry .... from an initial matrix

Usage

flowplaces(tab, origin = NULL, destination = NULL, fij = NULL, format, 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]

x

enter the flowplaces indicator type : "allflowplaces", "ini", "outi", "degi","intra", "Oi", "Dj", voli","bali","asyi". See Details.

Details

This function compute for all pairs or origin-destination places (i,j) a data table that describes the flows from the point of view of Origin / destination places - x = "ini" for the number of incoming links (as in-degree)
- x = "outi" for the number of outcoming links (as out-degree)
- x = "degi" for the total number of links (as in and out degrees)
- x = "intra" for total intra zonal interaction (if main diagonal is not empty
- x = "Dj" for the total flows received by (j) place
- x = "voli" for the total volume of flow per place
- x = "bali" for the net balance of flow per place
- x = "asyi" for the asymetry of flow per place
- x = "allflowplaces" for computing all the above indicators

Examples

library(cartograflow)
data(flowdata)
bkg <- system.file("shape/MGP_TER.shp",
  package = "cartograflow",
  lib.loc = NULL, mustWork = TRUE)

###1:Computes the total flow volume of places : Long format
voli <- flowplaces(flows, origin ="i",destination="j",fij="Fij",format = "L", x = "voli")
###2:Computes the total flows received by destination place : Long format
tab_bali <- flowplaces(flows, origin ="i",destination="j",fij="Fij",format = "L", x = "bali")

[Package cartograflow version 1.0.5 Index]