library(ggplot2)

library(ggthemes)

dat <- read.csv("/Users/jefflauer/Desktop/hate_crimes.csv")

ggplot(data = dat, aes(x = median_household_income, y = share_voters_voted_trump, color = share_white_poverty)) +
    geom_point(size = 2, alpha = .8) +
    geom_text(label = dat$state, size = 2, hjust = 0.5, vjust = -1, alpha = .5) +
    labs(title = "Comparing Income to Voting for Trump", x = "Median Household Income by State", y ="Share of Voters Who Voted for Trump", colour = "Share of White Poverty") +
    coord_cartesian(ylim = c(.25, 0.8)) +
    theme_gdocs() 

ggplot(data = dat, aes(x = median_household_income, y = share_voters_voted_trump, color = share_white_poverty)) +
    geom_point(size = 2, alpha = .8) +
    geom_text(label = dat$state, size = 2, hjust = 0.5, vjust = -1, alpha = .5) +
    labs(title = "Comparing Income to Voting for Trump", x = "Median Household Income by State", y ="Share of Voters Who Voted for Trump", colour = "Share of White Poverty") +
    coord_cartesian(ylim = c(.25, 0.8)) +
    theme_gdocs() + 
    geom_smooth(method = "lm")