Google Cartography: Street Art in Your Neighborhood

cartography n. The art or technique of making maps or charts.

Google Cartography (found here: uses Google via the Google Search API [Chapter 9] to build a visual representation of the interconnectivity of streets in an area.

This application takes a starting street and finds streets that intersect with it. Traversing the streets in a breadth-first manner, the application discovers more and more intersections, eventually producing a graph that shows the interconnectivity of streets flowing from the starting street.

Figures Figure 3-5 and Figure 3-6 show maps generated for two of the world’s great cities, New York and Melbourne, respectively.

New York, U.S., as determined by Google cartography

Figure 3-5. New York, U.S., as determined by Google cartography

Melbourne, Australia, mapped by a little Google cartography

Figure 3-6. Melbourne, Australia, mapped by a little Google cartography


If you know the streets in the areas shown, you will be able to find inconsistencies introduced by the text parsing process, explained in more detail in the following section.

The Gory Details

Google Cartography uses the Google API to find web pages that refers to street names. Initial street and region criteria are combined to form a search query, which is then executed by the ...

Get Google Hacks, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.