Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Visualizing Gun Violence in America

$
0
0

Visualizing gun violence in America

How The Trace mapped 150,000 shootings

By: Mikel Maron

The Trace is an independent, nonpartisan, nonprofit newsroom dedicated to shining a light on America’s gun violence crisis. Last month they published a map of more than 150,000 shootings that have occurred in America over the past five years. The map revealed geographic patterns, and a window into each of these ubiquitous, tragic events which often don’t make the headlines. We spoke with Daniel Nass at the Trace about building the “Atlas of American Gun Violence.”

Why is it important to gather and visualize this data? What do you hope the public learns from this map?

Public awareness of gun violence tends to center mostly on mass shootings, which attract huge media attention but account for a tiny fraction of all shootings. This map makes the case that gun violence is a ubiquitous, everyday phenomenon: no matter where you live, you’re not far from a shooting. I hope that the map helps people see the dynamics of gun violence in their own communities, and wrap their heads around the national scale of the epidemic. Gun violence research is drastically underfunded compared with other public health issues, and increasing public awareness is a step toward changing that.

What was the most surprising thing you found from the results?

I’m floored by how far-reaching gun violence is. There are six shootings in Utqiagvik, Alaska, the northernmost settlement in the U.S. There are shootings in tiny towns in the Nevada desert. There are shootings a few blocks from the White House in every direction. Basically, wherever there are people, there’s gun violence.

What was the process like of gathering the data, and building the map?

The data comes from Gun Violence Archive, a nonprofit that works tirelessly to track incidents of gun violence in the United States. The GVA team shared five years of cleaned, verified data with me, which added up to just over 150,000 individual shootings. The challenge for me was deciding how to visualize it. I knew I wanted to show every point on the map at once, without filtering or clustering. This approach sacrifices some of the insights that spatial aggregation could provide (for example, mapping county- or neighborhood-level rates of gun violence), but offers a different kind of insight — a more visceral understanding of the scale of America’s gun violence epidemic, where the details of each incident’s location and victims are available to the user.

With this goal in mind, I settled on deck.gl as the best approach for the visualization — it’s a high-performance WebGL framework that’s designed to work with large datasets and be overlaid on Mapbox maps. By paring the data down to just the essential fields, I was able to fit the 150,000 rows into a 1MB gzipped CSV file, small enough that the app could load and parse the entire dataset up-front without too much bandwidth or performance cost. deck.gl is very React-friendly, so I built the project with React and Redux. The data is served from Amazon S3.

How did using Mapbox tools help?

I used deck.gl’s custom Mapbox layer to add the point layer to the map itself, rather than overlaying it on a separate canvas, which is how deck.gl works by default. I found that this approach improved performance and also allowed me to place the points below the map’s label layers (which I used this tutorial to do). The project also uses the Mapbox Geocoding API for forward and reverse-geocoding — forward for the location search, and reverse to identify the user’s location from the coordinates returned by the browser’s geolocation API. I used the geocoding client from the Mapbox JavaScript SDK and designed an autocomplete component around it using downshift.

Do you have recommendations for actions people can take who are motivated by this map?

This post as a bunch of information about policies the evidence suggests could be effective at reducing gun violence, including:

  • Strengthening the background check system.
  • Requiring a permit to purchase a gun.
  • Banning high-capacity magazines.
  • Passing laws requiring safe storage of guns to keep them out of the hands of children.

Mikel Maron


Visualizing Gun Violence in America was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.


Viewing all articles
Browse latest Browse all 2230

Trending Articles