# NOT RUN {
library(cartograflow)
data(flowdata)
# 1/4: Computes Gini's coefficent
tabgini <- flowgini(ODpts = flows, origin = "i", destination = "j",
valflow = "Fij", 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(tabgini, critflow = 0.8, result = "signif")
### [1] "threshold = 11238 --- flows = 80 % --- links = 22.94 %"
# 4/4: Plot the flowmap
# }
# NOT RUN {
flowmap(
tab = tabflow, fij = "Fij", origin.f = "i", destination.f = "j",
bkg = map, code = "EPT_NUM", nodes.X = "X", nodes.Y = "Y",
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