Road networks are a perfect example of graphs. In such networks, the nodes are the road intersections, and edges are the roads themselves, as you can see in the following image:
This image shows the road network around Central Park in New York City, wherein streets are edges between junctions representing nodes
With road networks, many questions can be answered with graph analysis, such as the following:
- What is the shortest path between two points (nodes)?
- How long is this shortest path?
- Are there alternative routes?
- How can you visit all nodes within a list in a minimal amount of time?
This last question is especially important for parcel delivery, in order to minimize the number of driven miles to maximize the number of delivered parcels and satisfied customers.
We will go into more detail about this topic in Chapter 4, The Graph Data Science Library and Path Finding.