# Maps Are Cool

Following up from the previous post, I spent some time reading about maps.

I read about projections, the USGS, and Tissot’s indicatrix, among others. There’s a considerable amount of math involved, and making a large-scale map is a nontrivial task. It remains a nontrivial task on computers. I think it’d be cool to develop a mapping product like Google Maps.

First, a quick primer on maps:

The making of maps is a field that was all the rage about a hundred years ago. The Earth is an ellipsoid - a slightly deformed sphere. Kinda like an orange.

This is a 3-dimensional structure. Maps, whether on paper or on an application like Google Maps, are 2-dimensional. This necessitates a projection from the 3D plane onto the 2D plane.

There are a wide range of projections that are possible - some are conformal (preserve angles), others are equal-area (area ratios are preserved), still others fall into the equidistant and compromise categories. The most popular of them all is the Mercator projection.

A good way to see the distortions caused by using a projection on a 2D surface is with Tissot’s indicatrix (no relation to Tissot SA, the Swiss watchmaker; this is a mathematical tool). Here’s what Mercator’s projection looks like with Tissot’s indicatrix:

We’re using Mercator’s projection in this D3 Map, but this is by no means our only option - lots of people have made maps with different projections.

Above is the map, countries that I know the capital of are colored green, the others are in red. This is a great visual reminder of the progress to be made, and the progress that I have made.

I update it with a Python script - the script I wrote periodically checks the Learning Capitals post, and sees if I have entered a certain capital city.

If it matches the name of the actual capital of the country, a subsidiary csv file is updated to indicate that the country in question can now be colored differently (this is essentially a binary classification scheme).

When D3 renders the map, it looks at this subsidiary csv file to know which colors to use for different countries (TopoJSON entities for D3).

Overkill, I know. But it was fun to make.