Chapter 7. Geospatial information visualization

 

This chapter covers

  • Creating points and polygons from GeoJSON and TopoJSON data
  • Using Mercator, Mollweide, orthographic, and satellite projections
  • Advanced TopoJSON neighbor and merging functionality
  • Tiled mapping using d3.geo.tile

One of the most common categories of data you’ll encounter is geospatial data. This can come in the form of administrative regions like states or counties, points that represent cities or the location of a person when making a tweet, or satellite imagery of the surface of the earth.

In the past, if you wanted to make a web map you needed a specialized library like Google Maps, Leaflet, or OpenLayers. But D3 provides enough core functionality to make any kind of map you’ve seen on the web (some examples of maps created in this chapter using D3 can be seen in figure 7.1). Because you’re already working with D3, you can make that map far more sophisticated and distinctive than the out-of-the-box maps you typically see. The major reason to continue to use a dedicated library like Google Maps API is because of the added functionality that comes from being in that ecosystem, such as Street View of Google tiles or integrated support for Fusion Tables. But if you’re not going to use the ecosystem, then it may be a smarter move to build the map with D3. You won’t have to invest in learning a different syntax and abstraction layer, and you’ll have the greater flexibility D3 mapping affords.

7.1. Basic mapmaking

7.2. Better mapping

7.3. Advanced mapping

7.4. TopoJSON data and functionality

7.5. Tile mapping with d3.geo.tile

7.6. Further reading for web mapping

7.7. Summary

sitemap