“Higher Rates Of Hate Crimes Are Tied To Income Inequality” https://fivethirtyeight.com/features/higher-rates-of-hate-crimes-are-tied-to-income-inequality/

Overview

This article describes hate crimes rate in states before and after election. It is being discussed that states with higher income inequality reports more hate crimes compare to other states with less socioeconomic differences. The data, which the article describes had some limitations, however, the idea of both data set used points similar outcomes what suggests that the finds are strong.

library(RCurl)
df <- read.csv("https://raw.githubusercontent.com/hrensimin05/Cuny_DataScience/master/hate_crimes.csv")
summary(df)
##     state           median_household_income share_unemployed_seasonal
##  Length:51          Min.   :35521           Min.   :0.02800          
##  Class :character   1st Qu.:48657           1st Qu.:0.04200          
##  Mode  :character   Median :54916           Median :0.05100          
##                     Mean   :55224           Mean   :0.04957          
##                     3rd Qu.:60719           3rd Qu.:0.05750          
##                     Max.   :76165           Max.   :0.07300          
##                                                                      
##  share_population_in_metro_areas share_population_with_high_school_degree
##  Min.   :0.3100                  Min.   :0.7990                          
##  1st Qu.:0.6300                  1st Qu.:0.8405                          
##  Median :0.7900                  Median :0.8740                          
##  Mean   :0.7502                  Mean   :0.8691                          
##  3rd Qu.:0.8950                  3rd Qu.:0.8980                          
##  Max.   :1.0000                  Max.   :0.9180                          
##                                                                          
##  share_non_citizen share_white_poverty   gini_index     share_non_white 
##  Min.   :0.01000   Min.   :0.04000     Min.   :0.4190   Min.   :0.0600  
##  1st Qu.:0.03000   1st Qu.:0.07500     1st Qu.:0.4400   1st Qu.:0.1950  
##  Median :0.04500   Median :0.09000     Median :0.4540   Median :0.2800  
##  Mean   :0.05458   Mean   :0.09176     Mean   :0.4538   Mean   :0.3157  
##  3rd Qu.:0.08000   3rd Qu.:0.10000     3rd Qu.:0.4665   3rd Qu.:0.4200  
##  Max.   :0.13000   Max.   :0.17000     Max.   :0.5320   Max.   :0.8100  
##  NA's   :3                                                              
##  share_voters_voted_trump hate_crimes_per_100k_splc avg_hatecrimes_per_100k_fbi
##  Min.   :0.040            Min.   :0.06745           Min.   : 0.2669            
##  1st Qu.:0.415            1st Qu.:0.14271           1st Qu.: 1.2931            
##  Median :0.490            Median :0.22620           Median : 1.9871            
##  Mean   :0.490            Mean   :0.30409           Mean   : 2.3676            
##  3rd Qu.:0.575            3rd Qu.:0.35694           3rd Qu.: 3.1843            
##  Max.   :0.700            Max.   :1.52230           Max.   :10.9535            
##                           NA's   :4                 NA's   :1
# The main dataset includes varieties of statistics and analytics related to every states like poverty  and 
# medium income of the state
# I will create a subset focused on highchool diploma rate vs  median household income and hate crime - simplifying the data set

otherfactors <- subset(df, "share_population_with_high_school_degree" >0.798)

newlist <- c("state","median_household_income","avg_hatecrimes_per_100k_fbi")

newdata <- otherfactors[newlist]

head(newdata)
##        state median_household_income avg_hatecrimes_per_100k_fbi
## 1    Alabama                   42278                   1.8064105
## 2     Alaska                   67629                   1.6567001
## 3    Arizona                   49254                   3.4139280
## 4   Arkansas                   44922                   0.8692089
## 5 California                   60487                   2.3979859
## 6   Colorado                   60940                   2.8046888
attach(newdata)
ndata<- newdata[order(median_household_income),]
head(ndata)
##            state median_household_income avg_hatecrimes_per_100k_fbi
## 25   Mississippi                   35521                    0.622746
## 49 West Virginia                   39552                    2.037054
## 1        Alabama                   42278                    1.806410
## 19     Louisiana                   42406                    1.341170
## 18      Kentucky                   42786                    4.207890
## 43     Tennessee                   43716                    3.136051
tail(ndata)
##                   state median_household_income avg_hatecrimes_per_100k_fbi
## 2                Alaska                   67629                    1.656700
## 9  District of Columbia                   68277                   10.953480
## 7           Connecticut                   70161                    3.772701
## 12               Hawaii                   71223                          NA
## 30        New Hampshire                   73397                    2.105989
## 21             Maryland                   76165                    1.324840

Conclusion

In conclusion, as we could asses from the subset that provided data is strong and shows as correlation between households income and hate crime reported by fbi in our example, where lower median income shows higher average hate crime per 100k.