Our group aims to examine religious adherence in multiple ways throughout the United States. The first portion of this project, which focused on reproducing the data of the original author can be found here: http://rpubs.com/aray/religious_adherence
While comparing the 6 states that are scattered across the US, some similarities and differences are observed. These states, with the exception of Texas, seem to have only a few regions where the religious adherence rate is high. Texas, on the other hand, has many more high adherence regions to portray their strong religious beliefs. Religious adherence rate appears to increase in the central part of the US. Observing from the US country religious adherence data, other states such as North and South Dakota, which are located in the central part of the US, also seem to have high religious adherence rate like Texas.
library(foreign)
counties <- read.spss("U.S. Religion Census Religious Congregations and Membership Study, 2010 (County File).SAV", to.data.frame = TRUE)
library(choroplethr)
library(ggplot2)
library(viridis)
counties <- counties[!is.na(counties$TOTRATE),]
counties$region <- counties$FIPS
counties$value <- counties$TOTRATE
counties[(counties$value > 1000),'value'] <- 1000.
choro = CountyChoropleth$new(counties)
choro$title = "Total Religious Adherents
by County"
choro$set_num_colors(1)
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
US_map = choro$render()
US_map
choro = CountyChoropleth$new(counties)
choro$title = "Adherence in California"
choro$set_num_colors(1)
choro$set_zoom("california")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
california_map = choro$render()
california_map
choro = CountyChoropleth$new(counties)
choro$title = "Adherence in Colorado"
choro$set_num_colors(1)
choro$set_zoom("colorado")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
colorado_map = choro$render()
colorado_map
choro = CountyChoropleth$new(counties)
choro$title = "Adherence in Texas"
choro$set_num_colors(1)
choro$set_zoom("texas")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0,1000))
texas_map = choro$render()
texas_map
choro = CountyChoropleth$new(counties)
choro$title = "Adherence in Florida"
choro$set_num_colors(1)
choro$set_zoom("florida")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0,1000))
florida_map = choro$render()
florida_map
choro = CountyChoropleth$new(counties)
choro$title = "Adherence in Maine"
choro$set_num_colors(1)
choro$set_zoom("maine")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0,1000))
maine_map = choro$render()
maine_map
library(gridExtra)
grid.arrange(US_map, colorado_map, california_map, texas_map, florida_map, maine_map, ncol = 2)
When the grid extra package was successfully applied to my data, different conclusions can definitely be drawn from the data. According to the total religious adherents map of Massachusetts, it appears as though Massachusetts is about middle-of-the-road (500 adherents per 1000 population) when it comes to adherence rates. However, when then viewing the Catholics in Massachusetts map, it appears as though an extremely high majority of the total religious adherents in Massachusetts happen to be Catholic as well. This conclusion was drawn from the fact that based on all of the other religious mappings, such as Muslims, Black Protestants, and “Others”, there are very little adherence rates for any other religion besides Catholic in Massachusetts. It would be interesting to dig further into a study such as this, to try to find out why there are mainly only Catholics in Massachusetts, to see if there is some underlying cause or intriguing reason as to why this is the case.
#Total Religious Adherents in Mass:
choro = CountyChoropleth$new(counties)
choro$title = "Total Religions"
choro$set_num_colors(1)
choro$set_zoom("massachusetts")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
masstotal_map = choro$render()
masstotal_map
#Muslims in Massachusetts:
counties$value <- counties$MSLMRATE
choro = CountyChoropleth$new(counties)
choro$title = "Muslims"
choro$set_num_colors(1)
choro$set_zoom("massachusetts")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
massmuslim_map = choro$render()
## Warning in self$bind(): The following regions were missing and are being
## set to NA: 25007, 25023, 25003, 25011, 25019
massmuslim_map
#Catholics in Massachusetts:
counties$value <- counties$CATHRATE
choro = CountyChoropleth$new(counties)
choro$title = "Catholics"
choro$set_num_colors(1)
choro$set_zoom("massachusetts")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
masscath_map = choro$render()
masscath_map
#Black Protestants in Massachusetts:
counties$value <- counties$BPRTRATE
choro = CountyChoropleth$new(counties)
choro$title = "Black Protestants"
choro$set_num_colors(1)
choro$set_zoom("massachusetts")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
massbp_map = choro$render()
## Warning in self$bind(): The following regions were missing and are being
## set to NA: 25007, 25021, 25001, 25011, 25019
massbp_map
#Other Religious Adherents in Massachusetts:
counties$value <- counties$OTHRATE
choro = CountyChoropleth$new(counties)
choro$title = "Other Religions"
choro$set_num_colors(1)
choro$set_zoom("massachusetts")
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
massother_map = choro$render()
massother_map
library(gridExtra)
grid.arrange(masstotal_map, massmuslim_map, masscath_map, massbp_map, massother_map, ncol = 2)
The aim of my analysis was to analyze the total religious adherence of Massachusetts and its neighbors to see if Massachusetts is unique in some way. The results of this analysis were that Massachusetts does seem to have a different level of religious adherence than its neighbors. Though Connecticut and Massachusetts do seem similar, there is a sharp difference between northern Massachusetts and southern Vermont and New Hampshire. It is interesting to observe how there is a distinct difference across state boundaries. In other states, like Michigan, even where the state of interest is not surrounded on all sides, there seem to be more gradual transitions across borders.
counties$value <- counties$TOTRATE
choro = CountyChoropleth$new(counties)
choro$title = "Religious Adherence in
Massachusetts
and Neighbors"
choro$set_num_colors(1)
choro$set_zoom(c("massachusetts", "new hampshire", "vermont", "maine", "connecticut", "rhode island"))
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
newengland_map = choro$render()
newengland_map
counties$value <- counties$TOTRATE
choro = CountyChoropleth$new(counties)
choro$title = "Religious Adherence in
Michigan
and Neighbors"
choro$set_num_colors(1)
choro$set_zoom(c("michigan", "minnesota", "wisconsin", "ohio", "indiana", "illinois"))
choro$ggplot_polygon = geom_polygon(aes(fill = value), color = NA)
choro$ggplot_scale = scale_fill_gradientn(name = "Adherence Rate", colours = viridis(32), limits = c(0, 1000))
up_map = choro$render()
up_map
library(gridExtra)
grid.arrange(newengland_map, up_map, ncol = 2)