Join Bill Shander for an in-depth discussion in this video The right paradigm: Maps, part of Learning Data Visualization.
In this movie, we're going to talk about maps. And you can't really talk about map based data visualization without talking about Google Maps. They pretty much singlehandedly brought maps back to the masses. Well, I guess, I mean that's not entirely fair because they were preceded by some others in the field. Right? But Google made Maps great and ubiquitous in a way that no one else has. And you can really visualize so many different things So here I am, searching for hockey rinks in Boston. And as you can see, what Google Maps shows you is so many different things, right? There's so much data in this view.
You know, I see the roads. If I zoom in, I can click on things and see markers. I can see the thing that I've searched for. And in fact, Google Maps is so great that the more I zoom and the more I zoom, I get more and more detail. Different colorings to represent different types of things like, this is the university campus. And if I zoom in far enough, I'll even see the shapes of the buildings, right? So, I can recognize This u-shaped building, as opposed to these other buildings I might be walking by. It's an incredibly rich visualization of an unbelievable amount of data.
So as a developer, you can do a lot of things with Google Maps. And, you know, you have the base layers, the base maps that you see as a regular user using Google Maps. And of course you have satellite view and street view, you have access to all of those different views of the maps. And you also have the ability to do other things with your data, so there's the ability to show places and do custom markers on those different places. You can use the routing information, how do I get from point A to point B and Google maps will figure that out and how to show it.
And finally you can do other interesting things with Google maps. Such as this which is actually a puzzle where you have different shaped objects on the map, and you have to click and drag them and put them into place. And if you get it right, it snaps into place, and changes color. There's so much you can do with Google Map's API. I encourage you to play around with it and experiment and try different things. When it comes down to it, there are really five, what I would call standard ways to show data on maps. And we're going to walk through them one by one and show some examples. So the first one is markers.
Markers are for pointing points out of interest on a map. Located at very specific latitude and longitude on the map. So this is an example I showed earlier where I searched on Google Maps for Hockey rings in the Boston area. And you can see the markers are dropped in place, at a specific location. To show every search result. These little red dots with the white squares, represent each hockey rink that showed up. Platforms like Google Maps, have built in functionality, like these little roll over call out windows. And you can actually custom design callouts in Google Maps and lay them on top of it as well.
Sometimes you want to put a marker in a specific spot, such as this marker that is for TD garden, where the Boston Bruins play. It's in a very specific spot, it's at a very specific latitude and longitude, exactly where that building is in Boston. But sometimes you want to marker to just sort of generally represent, like a region, like Boston. And if we were to do that it'd drop a marker right here in the heart of Boston, which isn't meant to really be at a specific latitude and longitude, it's more to show a general area and label it. If you don't know exactly what the latitude and longitude is for a location, whether it's a very specific address, or more generally a region, like Boston.
You can use this great website, iTouchMap.com and you type in either the address or just a more general location like this, and it'll actually show you the lat, long, that coordinates for that particular region. And then down below here, it'll give you the very specific latitude and longitude for where to drop that pen. And so I can even more generally find, let's say, an entire state. So I can type in, Massachusetts. And once again, it's going to give me a latitude and longitude, and place it specifically in a spot. But what it's doing is finding the geographic center of the entire state, and giving me the latitude and longitude for exactly where that is.
Another basic approach to showing data is layers on top of a map to indicate the data associated with the region. It's great for showing the data itself and not just the content that's associated with the region like markers do. So markers show you, there's a hockey rink in this place and here's information about it, maybe in a call out. In the case that I'm describing using layers, you actually have the data built into the map itself. One way to show data on top of the map is in these layers that are, in this case, dots, point clusters. So the circle size indicates the amount of data, in this case there's also a label showing me the number.
Interactivity can do a lot to add functionality so for instance as I zoom in on this map and I zoom in on this dot here, it'll actually break up. So that 210 which was aggregating a bunch of data points breaks out. And I can see as I'm zooming in closer to see more detail 40 of them are over here, 31 over here, ten over here, etc. And once again, the more I zoom in, the more granular I get. Until I get to the point where I can see just where all the individual dots are, that make up those aggregated numbers that I was looking at before. Another very common approach in mapping data is called a choropleth.
So you see these all the time during elections, right? So you see a map with red and blue states, and that tells you who voted which way in that state. A lot of times they're binary on and off, or categories like red versus blue, but other times, they're used to represent variations amongst the data. So in this case, we have a chloropleth map that's showing GDP growth data for countries across the world And the intensity of the color shows the intensity of the data relative to the other data points throughout the map.
I generally prefer this approach as opposed to dots, because if I'm trying to make the point that the United States has a certain level of data, whatever I'm displaying, then to me, seeing the entire country in that color versus a dot of a certain size, it's a little bit more intuitive to the user. There are times when it makes sense to use dots especially where you want to layer dots that represent one data set on top of a choropleth that represents other data it makes a lot of sense. Or in the case before where you're showing aggregated data amounts and then when you zoom in you see more detail.
In this example we have a combination of a chloropleth map With markers so I have the data here we have 2.78% GDP growth in the United States as opposed to 1.71% in Canada, but the United States has this marker in this case not really to indicate a, a specific location so much as to show related data. So I can click on these markers and get more information about it. And like in the example I showed earlier, I got the latitude longitude for the United States of America.
And, it's located to, roughly, where Saint Louis is, because that's the geographic center of the country. Another way to show data on a map is called a Heat map. And, so, this is similar to a choropleth in that you're showing data associated with regions. But this is really great to show the concentration of data on fairly micro-level even on a macro view and so I want to show you an example to explain what I mean by that. So what we are looking at here, is the use of the hashtag mtvhottest and when tweets are being sent out around the world, and so the size of the dots represents the volume of tweets and you can see the clock running down here so you can see the timing of these tweets happening.
And so in this dynamic animated view, I'm seeing them happen not exactly in real time, but I can see them happening over time. If I switch over to the static view, what I see is an overall heat map, so I can see that overall, over the entire time period being tracked, how many tweets happened in one region compared to another region. Once again if I zoom in on the map, that aggregated view of the heat map starts breaking into its component parts. And I can zoom in. And I continue to zoom in, and zoom in, and zoom in and get more and more detail.
And so I can see the relative strength of certain regions. The relative, you know, number of times, the tweets were shared and see in sort of overall intensity view rather than a specific geographic share of the view like I would in a choropleth. Finally, maps are very often used to show flows between regions. And the way this is often done is simply putting your arrows on things, right? So here I'm looking at the exports or imports of some goods between various countries.
So in this case, the thickness of the line indicates the volume of the flow, and in this particular example, China is highlighted because that's the focus of this particular data display. If the object is to show movement of something between regions then flows like this are a basic default to use. Maps are by definition data visualization. They're showing you location data in a visual form. So laying more stuff on top of a map It's a very effective way to share information that's geographic in nature.
These five forms that we've gone through are a great start. And like with the bar chart I challenge you to always think about when it might not be a good idea to use them. When you might want to try something else. And like going beyond the bar chart you need a compelling reason to do so.
- Channeling your audience
- Understanding your data
- Determining the information hierarchy
- Sketching and wireframing your ideas
- Defining your narrative
- Using typography, color, contrast, and shape to convey meaning
- Making your visualization interactive