Itβs been a tough week for me! β Between the incredible launch (π) of Matplotlib Journey and a trip to Berlin to meet my new collaborator (exciting news coming soon!), things have been busy.
So today I suggest we just highlight a simple but fundamental concept in data visualization. My 13-hour train ride is almost over, letβs be quick!
β
All map projections are flawed.
Yes, all of them.
A map projection is a mathematical transformation that flattens our planet. It turns a three-dimensional sphere onto a two-dimensional plane.
And since thatβs inherently impossible to do without distortion, every map youβve ever seen is wrong in some way. π
Most map libraries come with a set of common projections. In Python, Cartopy offers around 40, while in R, sf provides a wide range as well! β Here are a few projection examples:
In Matplotlib Journey we made a little widget to explore all the available projections and explain how to use them!
β
β
Mercator
The most well-known projection is Mercator. β Itβs everywhere: on Google Maps, in classrooms, on office walls. β But it comes with a major flaw: it dramatically enlarges landmasses as they move away from the equator. Thatβs why Greenland looks huge when, in reality, itβs much smaller than Africa.
One of my favorite tools to explore this distortion is The True Size Of. It lets you drag countries across the map and see how their size shifts.
There isnβt a perfect one. π β Every projection makes trade-offs: some preserve distances, others preserve area, but none can do everything at once. β If you have access to interactivity, the best approach is to display a real globe, like Google Earth does.
Otherwise, carefully consider the question you're trying to answer and explore the projections to find the one that best fits your use case.
More importantly, whenever you see a map on a wall, remember itβs a subjective interpretation of the world!
See you next week, β Yan β PS: can you tell me what you're interested in so I can make my content better? π β β β