Python NetworkX / Mplleaflet: network for geojson
I have used networkx
and mplleaflet
to build my network of nx on the flyer card. Using my one of my smaller datasets this works great. However, it doesn't scale with big data. Is it possible to export my graphical form networkx
to geojson or extract the geojson generated with mplleaflet
into a new file? I know that graphics / nodes / edges in networkx
can be written to json, but my network contains important geographic information, and since mplleaflet
it cannot handle size, I would like to import it into QGIS.
Edit
A flyer map made with one of my smaller datasets can be located here: https://drive.google.com/open?id=0B1lvsCnLWydEQ2ZkSS1XZ09TOFk
Viewing the html file itself I see that the data is stored as geojson as expected. I tried a simple copy and paste of the data, but it doesn't work because it has a lot of functionality and is also not formatted correctly. I am not familiar with html
or javascript
and do not know how to extract information from a file - is it possible?
source to share
Trying to answer my own question over a year later, I have identified the closest solution to this, using SQL and PostGIS / CARTO, not Python and networkx
(unfortunately). Using ST_MakeLine
ordering the points / nodes (latitude / longitude) by ascending timestamp and then grouping by unique ID, a similar result can be obtained:
( https://carto.com/blog/jets-and-datelines/ )
( https://carto.com/blog/alteryx-and-carto-to-explore-london-bike-data/ )
Performing this type of analysis on the CARTO database provides scalability and can be easily embedded in a custom web map and further developed (with JavaScript) beyond simple graphing with mplleaflet.
source to share