Data Products Using Leaflet

This assignment was completed for the July, 2017 session of the Coursera course, Developing Data Products. This R Markdown file has embedded within it several maps created using Leaflet in R.

The data used to create the maps was sourced from a Github repository in which the Washington Post is attempting to compile “…a database of every fatal shooting in the United States by a police officer in the line of duty since Jan. 1, 2015.” Here is a link to the repository:

https://github.com/washingtonpost/data-police-shootings.git

This data is published under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license

I downloaded the database on July 5, 2017 at 5:02 PM ET, at which point the “fatal-police-shootings-data.csv” file contained a list of 2,462 records, with the latest fatal shooting having occurred that same day in Des Moines, Iowa.

In order to use Leaflet to build the interactive map, I added latitude and longitude to the file, based on the City and State where each shooting occurred. I had access to that data for Florida cities and concentrated on mapping the shootings for Florida only.

For 2015, 2016 and through July 5 of 2017, there were 149 fatal shootings recorded, with the following information captured for each event (I added the last four columns - latitude, longitude, month and year (based on date):

id, name, date, manner_of_death, armed, age, gender, race, city, signs_of_mental_illness, threat_level, flee, body_camera, latitude, longitude, month, year

State of Florida - Locations of Fatal Police Shootings by Date

The first map shows the location of each fatal shooting on a map of Florida. Markers are color-coded to indicate the calendar year in which the shooting happened. Popups show the date of each killing. Where multiple shootings happened in the same city, shown as Clusters, the popup shows the date of the most recent shooting in that city.

State of Florida - Locations of Fatal Police Shootings by Name of Victim

The next map uses the same data, but the popups now display the victims’ names.

## [1] "2017-06-29"

State of Florida - Locations of Fatal Police Shootings in 2017 through 2017-06-29.

The last map shows just the 2017 shootings. The latest reported shooting victim was Jose Guillermo Flores Colon, whose death occurred in the city of Deltona, in the mid-coast area of Florida, on 2017-06-29.