Book Image

Mastering D3.js

By : Pablo Navarro Castillo, Pablo Navarro Castillo
Book Image

Mastering D3.js

By: Pablo Navarro Castillo, Pablo Navarro Castillo

Overview of this book

Table of Contents (19 chapters)
Mastering D3.js
About the Author
About the Reviewers

Obtaining geographic data

To create a map, we will need files that describe the coordinates of the features that we intend to include in our map. One of the most reliable sources for medium-scale geographic data is Natural Earth (, a collaborative effort to curate and organize geographic datasets.

The geographic datasets available at Natural Earth are in the public domain and are available at 1:10,000, 1:50,000, and 1:110,0000 scales. There are vector and raster datasets, and the map files are classified in three categories:

  • Cultural: This contains countries, administrative divisions, states and provinces, populated places, roads, urban areas, and parks

  • Physical: This describes coastlines, land, islands, oceans, rivers, lakes, and glaciated areas among others

  • Raster: This contains images, depicting the relief as shades and with colors based on climate

The files are in the ESRI shapefile format, the de facto standard for geographic data. ESRIshape files represent...