Description Usage Format Source Examples
The raw data behind the story "Higher Rates Of Hate Crimes Are Tied To Income Inequality" https://fivethirtyeight.com/features/higher-rates-of-hate-crimes-are-tied-to-income-inequality/.
1 |
A data frame with 51 rows representing US states and DC and 13 variables:
State name
State abbreviation
Median household income, 2016
Share of the population that is unemployed (seasonally adjusted), Sept. 2016
Share of the population that lives in metropolitan areas, 2015
Share of adults 25 and older with a high-school degree, 2009
Share of the population that are not U.S. citizens, 2015
Share of white residents who are living in poverty, 2015
Gini Index, 2015
Share of the population that is not white, 2015
Share of 2016 U.S. presidential voters who voted for Donald Trump
Hate crimes per 100,000 population, Southern Poverty Law Center, Nov. 9-18, 2016
Average annual hate crimes per 100,000 population, FBI, 2010-2015
See https://github.com/fivethirtyeight/data/tree/master/hate-crimes
1 2 3 4 5 6 7 | library(ggplot2)
ggplot(hate_crimes, aes(x = share_vote_trump, y = hate_crimes_per_100k_splc)) +
geom_text(aes(label = state_abbrev)) +
geom_smooth(se = FALSE, method = "lm") +
labs(x = "Proportion of votes for Donald Trump",
y = "Hate crimes per 100k during Nov 9-18, 2016 (SPLC)",
title = "Relationship between Trump support & hate crimes")
|
Some larger datasets need to be installed separately, like senators and
house_district_forecast. To install these, we recommend you install the
fivethirtyeightdata package by running:
install.packages('fivethirtyeightdata', repos =
'https://fivethirtyeightdata.github.io/drat/', type = 'source')
`geom_smooth()` using formula 'y ~ x'
Warning messages:
1: Removed 4 rows containing non-finite values (stat_smooth).
2: Removed 4 rows containing missing values (geom_text).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.