Description Usage Arguments Details Value Examples
From a layer of areal spatial features, compute and threshold a continuous distance matrix. The result is either a matrice of distances between ODs, or a flow matrix based on the distance travelled between ODs ; both can be used for filtering flow before flow mapping (flowmap)
1  | flowdist(tab, dist.method, result)
 | 
tab | 
 the input flow dataset  | 
dist.method | 
 distance calculation algorithm, default is euclidian calculation  | 
result | 
 Choose Building a "flowdist" or a simple "dist" matrice. See Details  | 
– result = "dist" is the simple resulting distance matrice.
– result = "flowdist" is the resulting distance matrice with additional calculated parameters.
– It is also possible to filter flow by a level of distance travelled.
(1) A flowdata set with continuous distances calculations. See dist.method parameter
(2) A flowdata set with movement from euclidian distances calculations
1 2 3 4 5 6 7 8 9 10 11 12 13  | library(cartograflow)
library(sf)
data(flowdata)
map <- st_read(system.file("shape/MGP_TER.shp", package = "cartograflow"))
tabflow <- flowjointure(
  geom = "area", bkg = map, DF.flow = flows, origin = "i",
  destination = "j", id = "EPT_NUM", x = "X", y = "Y"
)
# Format long with only origin, destination and distance parameters:
tab.distance <- flowdist(tabflow, dist.method = "euclidian", result = "dist")
# Format long with with all parameters: coordinates, distance, mouvement
tab.distance <- flowdist(tabflow, dist.method = "euclidian", result = "flowdist")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.