Giter VIP home page Giter VIP logo

foxnic / us-mass-shootings-analysis Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 5.0 60.64 MB

An analysis of US mass shootings data (1982 to 2019) provided by Mother Jones. Analysis done using R in RStudio, results published to HTML using RMarkdown, and styled using CSS.

Home Page: http://rpubs.com/foxnic/shootings_v1

CSS 0.01% HTML 99.99%
r rmarkdown ggplot2 stacked-bar barchart data-analysis waffle heatmap lollipop-plot map-chart

us-mass-shootings-analysis's Introduction

Project Description

An analysis of US mass shootings between 1982 and 2019.

Output

The output of this code is an html page which can be viewed on Rpubs.com

Motivation

The reason this analysis was conducted was because:

  • I wanted a project to help me to learn more about R
  • someone posted a link to this data set on one of the Data Visualisation Society's Slack channels
  • I was interested in what the data would tell me about mass shootings in the US

Data

This analysis is based on data on US mass shootings 1982 - 2019 provided by Mother Jones:

โ€œOur research focused on indiscriminate rampages in public places resulting in four or more victims killed by the attacker. We exclude shootings stemming from more conventionally motivated crimes such as armed robbery or gang violence.โ€

Data is available for download on motherjones.com

Tools Used

Analysis done using R in RStudio.

Results published to HTML using RMarkdown.

HTML styled using CSS.

HTML file is hosted on rpubs

R Packages Used

  • tidyverse
  • operators
  • magrittr
  • dplyr
  • knitr
  • sf
  • usmap
  • waffle
  • treemapify
  • gganimate
  • tweenr
  • gifski
  • png
  • viridis

Visualisation Types

ggplot, gganimate, usmap, treemapify and waffle were used to create the data visualisations, which include:

  • Map of US states
  • Treemap
  • A big ol' number
  • Line graph with trend line and data labels
  • Animated bar chart
  • Static bar chart with data labels
  • Lollipop chart with data labels inside the bubbles
  • Proportional stacked bar chart
  • Heatmap
  • Faceted line graphs
  • Waffle chart
  • Diverging bar chart
  • Scatter plot
  • Tables

Useful Links

us-mass-shootings-analysis's People

Contributors

foxnic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.