Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Shiny in Action: Visualizing Fatal Police Shootings

This section demonstrates building a Shiny application to visualize a data set of people who were fatally shot by the police in the United States in the first half of 2018 (January through June). The data set was compiled by the Washington Post, who made the data available on GitHub.

In order to visualize the geographic distribution of the data, latitude and longitude were added to each observation in the data using this code (you don't need to run that script, but it has been included to show how this was done). Note, executing that script requires an Google Maps API Key.

As is our suggested structure for building a Shiny application, this application is written in a single app.R file. To see the application running, open the file in R Studio and click the Run App button. A screenshot of the interactive application is shown below.

Interactive map of fatal police shootings