Understanding Map Projections
Get introduced to the most popularly used map projections to gather insight from data.
Types of projections
We’ll now see the different projections that maps can be displayed in and learn how we can change them.
We used an example of one projection type in our map, and now we’ll explore this topic in more detail. When we try to draw the Earth (or part of it) on a flat rectangle, the shape is inevitably distorted somehow. So, there are different ways, or projections, available that can be used. No projection is perfect, and there are trade-offs between accuracy in shape, area, relative position, and so on. The details of which projection is more appropriate depends on the application and is beyond the scope of this course. We will, however, explore how to change the projection being used and see how to get the available projections.
With Plotly Express, we have a projection
parameter in the map functions, which takes a string and can be used to set the desired projection type. Alternatively, we can also set it by assigning a value to fig.layout.geo.projection.type
as we did previously.
The Jupyter Notebook set up below shows a few of the available options together with their respective names in the titles:
As we can see, there are different ways of displaying the Earth.
- Orthographic: While orthographic might seem more realistic in its shape, its problem is that we can only see part of the Earth, so we lose perspective.
- Azimuthal equal area: The azimuthal equal area projection is actually quite realistic when you use it interactively and zoom into certain areas. Feel free to experiment with different projections and select what works.
We have experimented with polygon or choropleth maps so far, and now we’ll be exploring another type of map, with which we are already generally familiar—the scatter map.
Using scatter map plots
The main difference between the and axes and longitude and latitude is due to the shape of the Earth. As we approach the equator, the vertical meridians are as far away from each other as possible, and as we ...