From the course: Creating Maps with R

How to choose a map

- [Instructor] Visualizing geospatial data is a more complex process than visualizing what we might call normal or non geographic data. Before we can choose which kind of map we want to make, we need to ask ourselves three questions. Where is the data? How does the data vary? And where is the data geographically? The first and third questions might sound the same but they really get to the heart of the complexity of making maps. Your data might be provided in a form of street addresses. Those might be nicely formatted addresses like this one in London, or they might be less precise addresses. Street addresses are very messy human data sets because they vary wildly, dependent on your data source. and the region that an address belongs to. You'll need to use a geocoding service to convert these addresses into coordinates. There are lots of different services available. Google Maps is one of the eldest and most recognizable online mapping services. And it also provides a freemium geocoding service. There are also tools like LocationIQ that are specifically designed for geocoding purposes and provide limited, always free access. It's important to acknowledge, it's not always possible to geocode street addresses. This might be because a region isn't included in a geocoding service, or your address is in a format it doesn't recognize. Instead of precise street addresses, your data might be in a form of named regions. This might include countries or smaller regions within countries. If this is the case, you'll need to obtain data sets that include borders for these regions. Usually, you'll find these data sets as shapefiles. But a thing about shapefiles is, they come in varying levels of detail. These are two different maps that compare the accuracy of two different shapefiles obtained for Antarctica. Your data might be about the journeys between locations, for instance, flights or other logistical routes. To work with this kind of data, we need to compute something called a great circle. We also need to decide the coarseness of these journeys. These two maps compare international flights with differing levels of coarseness, which affects the smoothness of the lines in the data visualization. Once we've been able to turn our data into geospatial data, we then need to ask, how does the data vary? What can we use in our map to communicate variables to our audience? Let's look at categorical variables in maps first. When we're visualizing point data with maps, we have two different ways to encode categorical variables, using color, which is the most common and versatile choice. Or we could vary the shape of points. When it comes to visualizing regions, the only choice that we have is to encode categorical variables with a fill color. This is known as a choropleth map. Now let's take a look at continuous variable maps. When it comes to point data, we have some flexibility. Both size and fill color can be used for encoding continuous variables. But when it comes to regions, our only choice for encoding continuous variables is to vary the fill color of each region. But it is important to acknowledge, I'm very much talking about traditional mapping data visualizations in this video and in this course. There's some really interesting custom database that you can build which hybridized maps and normal charts. This is a wonderful example, visualizing seasonality in bee colony behavior in the US. But it's important to understand that building these non-traditional charts requires more effort from you as the chart designer. And it requires more effort from your readers. We've taken a look at these first two questions, where are data and how do they vary? Now let's talk about where data are geographically. If I presented you with just this map, would you know where on earth we are looking? Is there sufficient context in the map for you to know what you're looking at? For most data visualizations, we can add a good title and that's enough to tell our readers what they're looking at. But that's not always the case for maps. Montenegro is a beautiful country, but it doesn't appear on the international stage that often. It's quite likely that there are folks watching this video that won't know where Montenegro appears on earth. Often, all that's necessary to give your map context is to show bordering regions, particularly for those regions with a coastline. But gold standard for maps is to give continent wide context. A reader seeing this map will understand the database shows the largest cities in Montenegro, and that this is a country on a Mediterranean coastline, near to the very distinctive coastline of Italy. Alternatively, if you have the freedom to create interactive maps, you can give your readers the ability to explore and understand that chart. These are the pivotal questions you need to ask when starting to build a map or you are thinking about how to visualize geospatial data. Once you've answered these questions, the fun bit starts, choosing which kind of map you want to use to tell your stories.

Contents