-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

IPython Interactive Computing and Visualization Cookbook
By :

In this recipe, we build upon several techniques described in the previous recipes in order to create a simple GPS-like route planner in Python. We will retrieve California's road network data from the United States Census Bureau in order to find shortest paths in the road network graph. This allows us to display road itineraries between any two locations in California.
You need NetworkX and Smopy for this recipe. In order for NetworkX to read Shapefile datasets, you also need GDAL/OGR. You can find more information in the previous recipe.
You also need to download the Road dataset from the book's GitHub repository at https://github.com/ipython-books/cookbook-data, and extract it in the current directory.
At the time of this writing, NetworkX's support of Shapefile doesn't seem to be compatible with Python 3.x. For this reason, this recipe has only been successfully tested with Python 2.x.
Let's import the packages:
In...
Change the font size
Change margin width
Change background colour