# NOT RUN {
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")
# }
Run the code above in your browser using DataLab