If you don’t already have a Datawrapper account, create one.
Why Map?
We use maps to understand the data, to find a story, to tell a story. Some of my favorite examples:
-
Persuasive Maps
- The Age That Women Have Babies: How a Gap Divides America, New York Times 4 August 2018.
- The Expanding News Desert, UNC (2018)
- How we mapped Homan Square, Source + The Guardian (2018)
- Something in the water, King’s College School of Journalism (2017)
- Visualize Transit-Rich Housing, Sasha Aickin’s personal project (Spring 2018)
- Murder with Impunity, Washington Post (2018)
- Fatal Force, Washingon Post (2016)
- How fast is LAFD where you live?, LA Times (2012)
- Poisoned Place, NPR (2011) / map / about the data /
- At Risk in a Big Quake: 39 of San Francisco’s Top High Rises, New York Times (2018)
- San Francisco Public Press layered the map of un-retrofitted soft story buildings over the liquefaction map provided by the USGS to create a very rough list of unsafe buildings in San Francisco.
- Mapping the Shoreline Building Boom as Seas Rise, San Francisco Public Press (2017)
- ProPublica & The Lens: Losing Ground, ProPublica (2017)
- Borderlands, NPR (2014)
- CALmatters mapped all the housing initiatives on the June 2018 ballot¸CALmatters (2018)
- A quick caveat about normalization.
California Fires (2018)
- https://projects.sfchronicle.com/2018/fire-tracker/
North Bay Fires (2017)
- KQED Property and Structures Damage was the most visited during the fires.
- KQED looks at fire hazard zones, which are public record. Most of the devastating 2017 Napa and Sonomoa fires were in “moderate” fire hazard zones.
Projections, Shapes, Points, and Lines
Mapping Points
“Geocoding” refers to the process of identifying an individual latitude/longitude pair for an address or other location description. To actually plot a location on a map, you need the location’s latitude and longitude. 219 West 40th Street
means nothing without coordinates.
Geocoding is often challenging because there aren’t great free resources for doing batch jobs or processing many addresses at once. The Geocoding Tip Sheet is a round up of good options, but often public data sources already include coordinates.
Mapping Lines
We use lines pretty rarely in intro maps, but a line is a series of two or more points connected together.
Mapping Polygons
Zipcodes, council districts, police precincts – these are all polygons. Most of your maps will be in polygons. These polygons are defined in (usually) one of two specialized file formats – a “Shapefile” or a “KML” file. The syntax of the file types varies, but they contain basically the same information – the polygon called “Bronx CB 04” is defined by this series of lat/lon pairs.
Usually your data won’t include a shapefile. If you have high school graduation rates by school district, and you want to map those, you need to find a shapefile that describes the outline of each school district, and then you need to combine that shapefile with your data, by identifying a column that the two tables have in common.
The Shapefiles Tip Sheet has some excellent resources for finding shapefiles.
Making a Map
We’re going to make our first map in Datawrapper and if that’s easy we’ll power through to Fusion Tables and Mapbox.
More Resources
Other good software options
- We use QGIS and PostGIS in the data investigations class because it is much more powerful analytical tool. The learning curve is a bit steep, however, and QGIS doesn’t produce interactive maps. QGIS will generate SVG files that you can style in Illustrator or any other vector graphics editor for publication.
- R is powerful statistical software and not easy to learn. These Dutch election maps were made in ggplot2 (an R package) – working from a comprehensive tutorial tutorial. Like QGIS, R will generate SVG files that you can style in Adobe Illustrator or any other vector graphics editor.
- You can make maps in D3, but not without getting code on your hands. Mike Bostock has a solid tutorial
- For years, I taught students how to use Carto because it is easy to master and flexible. Unfortunately, they no longer offer a free tier to anyone but students, which means that if you’re just publishing your first one or two maps, you have to commit to a paid account. They don’t even publish the pricing for those accounts anymore. Sad trombone.
- Tableau generates good maps. Peter Aldhous has a nice Tableau walkthrough from 2016. Unfortunately, I’ve never met a graphics editor who didn’t have some kind of tableau horror story.
- Mapbox is powerful if you’re game to learn some javascript (or just to cut and paste). Lo Benichou has written some fantastic Mapbox tutorials. And if you don’t want or need interactivity, Mapbox Studio will let you design gorgeous map tiles, no javascript needed.
Other good tutorial options