Learn R Programming

cartograflow (version 1.0.0)

flowanalysis: Computation of a global concentration criterion of flows values or features

Description

Computation of a global selection criterion for thresholding flow information and/or features before mapping. To be use after flowgini and before flowmap.

Usage

flowanalysis(tab, critflow, critlink, result)

Arguments

tab

flow dataset from flowgini

critflow

level of flow significativity. See Details.

critlink

level of features density. See Details.

result

resulting filtering criterion value. See Details.

Details

-critflow = desired level of flow's information significativity (e.g. 80 of the total information ; -critlink = desired level of flow's features density (e.g. 20 features that represents "more significant information.

-result="density" returns the desired level of features density as a -result = "significativity" returns the level of flow significativity as a

References

Bahoken Fran<U+00E7>oise, 2016,<U+00AB> La cartographie d<U+2019>une s<U+00E9>lection globale de flux, entre <U+2018>significativit<U+00E9><U+2019> et <U+2018>densit<U+00E9><U+2019> <U+00BB>, Netcom Online, 30-3/4 | 2016, Online since 23 March 2017, connection on 05 May 2019. URL : http://journals.openedition.org/netcom/2565 ; DOI : 10.4000/netcom.2565

Examples

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

#1/4: Computes Gini's coefficent
tab_gini<-flowgini(flows,format="L",origin="i",dest="j",valflow="Fij",
          bkg,code="EPT_NUM",lorenz.plot = FALSE)
### [1] Gini's coefficent = 73.16 %
# }
# NOT RUN {
#2/4: Plot Lorenz curve
flowgini(tab_gini,format="L",origin="i",dest="j",valflow="ydata",
          bkg,code="EPT_NUM",lorenz.plot = TRUE)
# }
# NOT RUN {
#3/4: Compute critflow filtering parameter
#critflow = 0.8 #selected criterion
flowanalysis(tab_gini,critflow = 0.8,result = "signif")
### [1] "threshold =  11238  ---  flows =  80 % ---  links =  22.94 %"

#4/4: Plot the flowmap
# }
# NOT RUN {
flowmap(flows,format="L",bkg,code = "EPT_NUM",filter = TRUE,
         threshold = 11238,taille = 8,a.head = 1,a.length = 0.11,
         a.angle = 30,a.col="#3f4247")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab