Chapter 8. Geospatial information visualization

 

This chapter covers

  • Creating points and polygons from GeoJSON and TopoJSON data
  • Using Mercator, Mollweide, orthographic, and satellite projections
  • Understanding advanced TopoJSON neighbor and merging functionality

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 sending a tweet, or satellite imagery of the surface of the earth.

D3 provides enough core functionality to make any kind of map you’ve seen on the web (examples of maps created in this chapter using D3 can be seen in figure 8.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 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. Another reason is if you want to do the cool 3D mapping you can accomplish with WebGL-based mapping libraries like MapboxGL. But if you’re not looking for those features, 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.

8.1. Basic mapmaking

8.2. Better mapping

8.3. Advanced mapping

8.4. TopoJSON data and functionality

8.5. Further reading for web mapping

8.6. Summary

D3 in the real world

sitemap