library(plyr)
library(dplyr)
library(ggmap)
Create a visualization that would show an accurate representations where gun violence in the United State occurs from 2014 until the most reported case through 2020 using the data provided by the Gun Violence Archive(GVA).
The Gun Violence Archive is an online archive of gun violence incidents collected from over 7,500 law enforcement, media, government and commercial sources daily in an effort to provide near-real time data about the results of gun violence. GVA is an independent data collection and research group with no affiliation with any advocacy organization.
Mission Statement Gun Violence Archive (GVA) is a not for profit corporation formed in 2013 to provide free online public access to accurate information about gun-related violence in the United States. GVA will collect and check for accuracy, comprehensive information about gun-related violence in the U.S. and then post and disseminate it online, primarily if not exclusively on this website and summary ledgers at www.facebook.com/gunviolencearchive and on Twitter @gundeaths. It is hoped that this information will inform and assist those engaged in discussions and activities concerning gun violence, including analysis of proposed regulations or legislation relating to gun safety usage. All we ask is to please provide proper credit for use of Gun Violence Archive data and advise us of its use.
GVA is not, by design an advocacy group. The mission of GVA is to document incidents of gun violence and gun crime nationally to provide independent, verified data to those who need to use it in their research, advocacy or writing.
The Gun Violenece Archive produces Standard Reports, in a form of .CSV, that change from ‘Cildren Killed’ to ‘Mass Shootings - All Year’.
This project will be using the ‘Mass Shootings - All Year’ Standard Report.
There are about roughly 1100 observations in this dataset.
gv_df <- read.csv(paste0("https://raw.githubusercontent.com/josephsimone/Data_608/master/final_project/gv-data.csv"))
ggmap#register_google(key = google)
gv_df$FullAddress <- paste0(gv_df$Address, ", ", gv_df$City.Or.County, ", ", gv_df$State)
add_lola <- geocode(gv_df$FullAddress, override_limit=TRUE)
gv_df <- cbind(gv_df, add_lola)
gv_df <- select(gv_df, Incident.Date, FullAddress, lat, lon, X..Killed, X..Injured)
names(gv_df) <- c("Date", "Address", "lat", "lon", "Killed", "Injured")
gv_df$Date <- as.Date(gv_df$Date, format="%B %d, %Y")
gv_df <- gv_df[order(gv_df$Date), ]
gv_df$Content <- paste0("<b>Date: </b>", gv_df$Date, "<br/>",
"<b>Killed: </b>", gv_df$Killed, "<br/>",
"<b>Injured: </b>", gv_df$Injured, "<br/>",
"<b>Location: </b>", gv_df$Address)
# Complete Cases
complete <- complete.cases(gv_df)
completedf <- gv_df[complete,]
This project will be a R shiny application to display various interactive United States maps and an “About Me” Page for the Gun Violence Archive.
Using the leaflet package for the first time to use as a base for a Time Series Map of the United States. In previous course I have used the fiftystater package to create static maps of the United States.
For the animation of the leaflet map, I hope to use the xts package to span the time duration of this dataset.
Using the plotly package, for each year starting with 2014, create interactive map of the United States with the amount of gun violent related incidents for each state.
About Me Page for the Gun Violence Archive.
I would like to explore the use of saving my comleted data set as a Amazon Relational Database Service for the deployment of this visualization.