In the previous sections, we learned about the fundamentals of the graph and many of the operations that we can perform on a graph using sample data that we defined. In this section, we will discuss how to import real-world data such as a road network and translate it into a graph and perform analyses on that. For this purpose, we will be importing sample Open Street Maps (OSM) road data that we have provided with this chapter.
Building a graph based on a road network
Open Street Maps data
OSM provides a rich set of open source and crowdsourced geographic data of many parts of the world. In particular, we are interested in the road data they provide. For the US, they are baselined on census TIGER road shapefiles and benefit...