✨ NEW TOOL FOR #MOBILITY DATA #DATAVIZ ✈️🚚🚗🏃

Do your visualisations of origin-destination matrices look like a mess of criss-crossing hairs? Maybe you could benefit from our #EdgeBundling tool by me, Oula Inkeröinen, @miladmzdh and Olle Järv!

🛠️ The tool: https://doi.org/10.5281/zenodo.14532547

This tool is an output from the #MobiTwin project funded by the #EuropeanUnion through the #HorizonEU programme.

Edge-bundling tool for regional mobility flow data

Edge-bundling tool for regional mobility flow data This repository hosts the scripts to perform edge-path bundling (Wallinger et al. 2022) for flow data. It's primary use case is to support visualization of complex mobility data, and has been used to bundle human mobility flows across NUTS regions in Europe. The tool's inputs are two CSV files, one for point feature data and associated coordinates, and another for flows (edges) to be bundled. After bundling, the tool outputs a GeoPackage file. The script expects the data to be in WGS84 coordinate reference system. The scripts in this repo are repurposed versions of the original scripts written by Peterka (2023). The updates to the original code aim to make the code more usable for analytical purposes. This tool is an additional output of the Mobi-Twin research project. Requirements The scripts within the repo require Python 3.10 or newer version with the following packages: pandas geopandas tqdm shapely On top of these Python requirements, the script expects the input CSV data (centroids and edges) to have a certain structure. Data structure for input files Centroid file | ID_COLUMN | X | Y | | ---- | :----- | :---------- | | Unique identifier for centroid (e.g., NUTS code) | X coordinate (WGS84) of the centroid | Y coordinate (WGS84) of the centroid | N.B.: The ID_COLUMN in the above is an example name, use the column name you have in your data. Edge file | ORIGIN | DESTINATION | OD_ID | COUNT | | ---- | :----- | :---------- | :---------- | | ID code of origin | ID code of destination | ID made of origin and destination codes joined by an underscore (_) | Integer/floating point number of flow strength | N.B.: The ID codes of origins and destinations have to match the IDs of your centroid file. Usage Clone this repository, and run the tool by typing in the following command: python bundle_edges.py -c /path/to/centroids.csv -id ID_COLUMN -ew /path/to/edges.csv -o /path/to/output.gpkg If you want to adjust some parameters of the bundling, such as weights or bundling threshold use the flags -ew for edge weights (default is 2), and -t for bundling threshold (default is 2). The edge weights dictate how powerful the "gravity" of long edges are. The bundling threshold sets the distance limit for how many times longer the bundled edges can be compared to straight line distances, flows that are longer than the threshold are not bundled but remain as straight line geometries in the output. Please note, the script expects the coordinates to be in WGS84 (EPSG:4326) Test files We have provided two test CSV files that demonstrate the data structure of the required CSV files. These files can be found under the example_data directory. References Wallinger, M., Archambault, D., Auber, D., Nöllenburg, M., & Peltonen, J. (2022). Edge-Path Bundling: A Less Ambiguous Edge Bundling Approach. IEEE Transactions on Visualization and Computer Graphics, 28(1), 313–323. https://doi.org/10.1109/TVCG.2021.3114795 Peterka, O. (2024). Xpeterk1/edge-path-bundling. https://github.com/xpeterk1/edge-path-bundling (Original work published 2023). Related links Mobi-Twin project official webpage Digital Geography Lab webpage

Zenodo

To support using this data, we have also developed an #EdgeBundling tool to aid in visualising complex origin-destination flow data:

https://doi.org/10.5281/zenodo.14532547

We also provide a ready-made edge-bundled network on NUTS 2 level lead by Oula Inkeröinen:

https://doi.org/10.5281/zenodo.14380382

Edge-bundling tool for regional mobility flow data

Edge-bundling tool for regional mobility flow data This repository hosts the scripts to perform edge-path bundling (Wallinger et al. 2022) for flow data. It's primary use case is to support visualization of complex mobility data, and has been used to bundle human mobility flows across NUTS regions in Europe. The tool's inputs are two CSV files, one for point feature data and associated coordinates, and another for flows (edges) to be bundled. After bundling, the tool outputs a GeoPackage file. The script expects the data to be in WGS84 coordinate reference system. The scripts in this repo are repurposed versions of the original scripts written by Peterka (2023). The updates to the original code aim to make the code more usable for analytical purposes. This tool is an additional output of the Mobi-Twin research project. Requirements The scripts within the repo require Python 3.10 or newer version with the following packages: pandas geopandas tqdm shapely On top of these Python requirements, the script expects the input CSV data (centroids and edges) to have a certain structure. Data structure for input files Centroid file | ID_COLUMN | X | Y | | ---- | :----- | :---------- | | Unique identifier for centroid (e.g., NUTS code) | X coordinate (WGS84) of the centroid | Y coordinate (WGS84) of the centroid | N.B.: The ID_COLUMN in the above is an example name, use the column name you have in your data. Edge file | ORIGIN | DESTINATION | OD_ID | COUNT | | ---- | :----- | :---------- | :---------- | | ID code of origin | ID code of destination | ID made of origin and destination codes joined by an underscore (_) | Integer/floating point number of flow strength | N.B.: The ID codes of origins and destinations have to match the IDs of your centroid file. Usage Clone this repository, and run the tool by typing in the following command: python bundle_edges.py -c /path/to/centroids.csv -id ID_COLUMN -ew /path/to/edges.csv -o /path/to/output.gpkg If you want to adjust some parameters of the bundling, such as weights or bundling threshold use the flags -ew for edge weights (default is 2), and -t for bundling threshold (default is 2). The edge weights dictate how powerful the "gravity" of long edges are. The bundling threshold sets the distance limit for how many times longer the bundled edges can be compared to straight line distances, flows that are longer than the threshold are not bundled but remain as straight line geometries in the output. Please note, the script expects the coordinates to be in WGS84 (EPSG:4326) Test files We have provided two test CSV files that demonstrate the data structure of the required CSV files. These files can be found under the example_data directory. References Wallinger, M., Archambault, D., Auber, D., Nöllenburg, M., & Peltonen, J. (2022). Edge-Path Bundling: A Less Ambiguous Edge Bundling Approach. IEEE Transactions on Visualization and Computer Graphics, 28(1), 313–323. https://doi.org/10.1109/TVCG.2021.3114795 Peterka, O. (2024). Xpeterk1/edge-path-bundling. https://github.com/xpeterk1/edge-path-bundling (Original work published 2023). Related links Mobi-Twin project official webpage Digital Geography Lab webpage

Zenodo

Great! My abstract got accepted into #LBS2025 conference!

I will be presenting my work on #StudentMobility and an #EdgeBundling tool.

This year Location-based Services is in Espoo, so I can just ride the metro there. Travel budget will be around €15. Good times.

Anybody else going to #LBS?

Alright, I will share my map for Day 2 of #30DayMapChallenge again. It depicts regional student #mobility across Europe a few years ago. As the data contains 200 000+ flows, straight line geometries make a fuzzy mess, but through aggregation and a technique called #EdgeBundling one can reduce visual clutter in the image.

The data and methods will be published openly in the near future. The work is a part of the #MobiTwin #EUHorizon project.

For those working in #Python and #mobility or #network data, and who want to get #EdgeBundling to work, check out this repository: https://github.com/xpeterk1/edge-path-bundling/

I tried with our project data and it works nicely. It calculates really fast and uses little resources.

Potentially interesting to @underdarkGIS and @martinfleis

GitHub - xpeterk1/edge-path-bundling: Edge-Path Bundling: A Less Ambiguous Edge Bundling Approach

Edge-Path Bundling: A Less Ambiguous Edge Bundling Approach - xpeterk1/edge-path-bundling

GitHub

Hey #spatial #R folks, is it possible to extract geometries from #ggplot as files? That is, the point, line, and polygon geometries in the graphs to #geopackage or #shapefile etc.

It is possible with #seaborn and #matplotlib, but that's Python not R. There's a nice and lightning fast #EdgeBundling technique in the newest ggplot, which is very promising for the #visualization of massive #mobility data.

There is also something in #HoloViews but I do not understand that library at all.