From 47e9b74c7a398a7508c73a434a93c1dded0b8097 Mon Sep 17 00:00:00 2001 From: Jeremy Kidwell Date: Tue, 16 Oct 2018 11:13:11 +0100 Subject: [PATCH] updating choropleths --- mapping_draft.Rmd | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/mapping_draft.Rmd b/mapping_draft.Rmd index 2bdecd6..7204dae 100644 --- a/mapping_draft.Rmd +++ b/mapping_draft.Rmd @@ -112,10 +112,10 @@ In the case of Eco-Congregation Scotland, congregations are invited to begin by ```{r import_admin_data} # read in polygon for Scottish admin boundaries # TODO: upload bundle of admin data to new zenodo repository and alter below to use new URLs -download.file("http://census.edina.ac.uk/ukborders/easy_download/prebuilt/shape/Scotland_laulevel1_2011.zip", - destfile = "data/Scotland_laulevel1_2011.zip") -unzip("data/Scotland_laulevel1_2011.zip", exdir = "data") -admin_lev1 <- readOGR("./data", "scotland_laulevel1_2011") +download.file("https://borders.ukdataservice.ac.uk/ukborders/easy_download/prebuilt/shape/Scotland_ca_2010.zip", + destfile = "data/Scotland_ca_2010.zip") +unzip("data/Scotland_ca_2010.zip", exdir = "data") +admin_lev1 <- readOGR("./data", "scotland_ca_2010") # read in polygon for intermediate admin boundary layers download.file("http://census.edina.ac.uk/ukborders/easy_download/prebuilt/shape/Scotland_parlcon_2011.zip", @@ -124,7 +124,6 @@ unzip("data/Scotland_parlcon_2011.zip", exdir = "data") admin_lev2 <- readOGR("./data", "scotland_parlcon_2011") # TODO note - need to optimise here, pre-filter sqldf? shapefile on "geo_code"" or "label" begins with "S" - download.file("http://census.edina.ac.uk/ukborders/easy_download/prebuilt/shape/infuse_ward_lyr_2011.zip", destfile = "data/infuse_ward_lyr_2011.zip") unzip("data/infuse_ward_lyr_2011.zip", exdir = "data") @@ -231,11 +230,14 @@ download.file("http://census.edina.ac.uk/ukborders/easy_download/prebuilt/shape/ unzip("parishes/parishes-1991.zip", exdir = "parishes") parishes <- rgdal::readOGR(dsn = "parishes", "england_cp_1991") -admin_pop <- read.csv("./data/scotland_admin_2011pop.csv", stringsAsFactors=FALSE) +# Load population statistics for normalising data by population on admin_lev1 +# TODO - consider adapting to use ONS mid-year statistics: https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland +admin_lev1_pop <- read.csv("./data/scotland_admin_2011pop.csv", stringsAsFactors=FALSE) # commenting out original # admin_joined <- merge(x=admin, y=admin_pop, by="CODE") # TODO, need to tidy up merging process here as well -admin_lev1 <- merge(x=admin, y=admin_pop, by="CODE") +# TODO, merge is broken - need some help on this! +admin_lev1 <- merge(x=admin_lev1$code, y=admin_lev1_pop, by.x = as.character(admin_lev1$code), by.y = as.character9admin_lev1_pop$CODE) # convert numbers to proper characters and ditch commas admin_lev1$X2011_pop <- as.numeric(gsub("[,-]","",admin_lev1$X2011_pop)) # admin_joined$X2011_pop <- as.numeric(gsub("[,-]","",admin_joined$X2011_pop)) @@ -407,6 +409,11 @@ A wide variety of historians and sociologists of religion have noted the regiona So why provide this kind of data (i.e. at the level of individual churches) when more granular data (i.e. at the level of individuals persons) is available in the form of the census and related parallel publications such as the 2008 Scottish Environmental Attitudes survey? We believe that mapping places of worship provides a useful intermediate level of analysis and may complement our more atomised understanding of EA which has been assessed at the level of individual persons to date. Because representation within some administrative areas of Scotland, can lead to a small number of data points, we have kept analysis to a National level and have not provided more specific administrative-area level calculations. +```{r create_ecs_denomination_table} +# TODO: Need to find a prettier way to do this: +table(ecs@data[["denomination"]]) +``` + ![][Figure5] As one might expect, there is a strong representation of the Church of Scotland, almost 74% of eco-congregations, with this number remaining the same when we only count awarded sites. We can confirm, on the basis of this analysis that ECS has a disproportional representation by Church of Scotland churches. At the 2002 church census count, it only represented 40.20% of Scottish churches (1666 of 4144 total churches). Similarly, on the 2011 Scottish census, only 32.44% of persons claimed to be members of the Church of Scotland. We can adjust this representation to 60%, if one excludes the 2,445,204 persons (46% of the total on the census) who reported either "no religion" or adherence to a religious tradition not currently represented among the eco-congregation sites. There is a slight over-representation by the United Reformed church, though this seems considerably more dramatic when one takes into account the fact that this is a trebling or more of their overall share of Scottish churches. The URC makes up only sightly more than 1% of church buildings in Scotland and a tiny 0.04% of respondents to the 2011 census. The Scottish Episcopal church hovers right around a proportional representation within ECS. More concerning are the significant underrepresentation by Roman Catholic churches, Baptists, the Free Church of Scotland, and other independent churches.