Introduction

This is a quick start for using this Dataset.

Deaths given are per 100,000

library(choroplethr)
library(choroplethrMaps)

# Read our input
d <- read.csv("../input/mort.csv", sep=",")
t <- d[d$Category == "Neoplasms",c("FIPS","Mortality.Rate..2014.")]
t <- t[t$FIPS > 1000,] # We want counties, value > 1000

# Change to c("region","value") for mapping
colnames(t)<- c("region","value")


county_choropleth(t,
                 title      = "Mortality Rate 2014 (Neoplasms)",
                 legend     = "Deaths per 100,000")

Pennsylvania, New Jersey and New York

# State Zoom
county_choropleth(t,
                 title      = "Mortality Rate 2014 (Neoplasms)",
                 legend     = "Deaths per 100,000",
                 num_colors = 1,
                 state_zoom = c("pennsylvania", "new jersey", "new york"))

Self-harm and interpersonal violence

See the article

title <- "Mortality Rate 2014
                 (Self-harm and interpersonal violence)"
legend     = "Deaths per 100,000"

# unique(d$Category)  # Easy way to list all
category = "Self-harm and interpersonal violence"
t <- d[d$Category == category,c("FIPS","Mortality.Rate..2014.")]
t <- t[t$FIPS > 1000,] # We want counties, value > 1000

# Change to c("region","value") for mapping
colnames(t)<- c("region","value")

county_choropleth(t,
                 title      = "Mortality Rate 2014\n (Self-harm)",
                 legend     = "Deaths per 100,000")