coedata is a data package that serves up various datasets made available by the Church of England’s Data Services team. Data sources include:
- Parish-level 2021 census data
- A database of Churches, Parishes, Dioceses and other geographies (Updated November 2024)
-
Parish-level data from the 2019 Index of Multiple Deprivation(pending)
2021 Census topics made available by coedata include:
- Number of usual residents in households and communal establishments
- Country of birth
- Age by 5 year age bands
- Ethnic group
- Religion
- General health
- Social Classification (NS-SeC)
- Economic activity status
- Highest level of qualification
- Households by deprivation dimensions
- Household language
- Accommodation type
- Car or van availability
- Tenure
- Household composition
You can install the development version of coedata from GitHub with:
# install.packages("pak")
pak::pak("Church-Army/coedata")
Full documentation website on: https://Church-Army.github.io/coedata
This is an example of how you could use coedata to get 2021 census data on general health for a selection of parishes. We’ll use the neighbouring parishes of Stifford: St Mary and Grays: St Peter and St Paul.
To get this data, we’ll need:
- The parish codes of those parishes
- The ONS ID of the general health dataset
We can find the ONS ID of the general health dataset by using
coe_datasets()
, which lists the ID of every census dataset that’s a
available through this package:
coe_census_datasets() |>
knitr::kable()
ons_id | description |
---|---|
TS001 | TS001 - Number of usual residents in households and communal establishments |
TS004 | TS004 - Country of birth |
TS007A | TS007A - Age by 5 year age bands |
TS021 | TS021 - Ethnic group |
TS030 | TS030 - Religion |
TS037 | TS037 - General health |
TS062 | TS062 - Social Classification (NS-SeC) |
TS066 | TS066 - Economic activity status |
TS067 | TS067 - Highest level of qualification |
TS011 | TS011 - Households by deprivation dimensions |
TS025 | TS025 - Household language |
TS044 | TS044 - Accommodation type |
TS045 | TS045 - Car or van availability |
TS054 | TS054 - Tenure |
TS003 | TS003 - Household composition |
We can see that general health data can be found in the dataset with ID TS037.
Luckily, we already know the parish codes for the parishes we’re interested in. If you’re not sure where to find the parish codes you need, please refer to Finding parish codes.
Now that we have the ONS ID and the parish codes, we can get our census data:
coe_census_parish(ons_id = "TS037", parish_codes = c(580342, 580334))
#> ✔ Reading from "coedata_parish-data".
#> ✔ Range ''TS037''.
#> Church of England Census Data
#> TS037 - General health
#> Units: persons
#> # A tibble: 2 × 7
#> parish_code population general_health_very_good general_health_good
#> <chr> <dbl> <dbl> <dbl>
#> 1 580334 49315 26735. 16254.
#> 2 580342 6332 2956. 2160.
#> # ℹ 3 more variables: general_health_fair <dbl>, general_health_bad <dbl>,
#> # general_health_very_bad <dbl>
#> Parish-level data compiled by the Church of England
Those parishes are both in central London - they are very densely populated!
Note that we can also get relative statistics for the same data by
setting relative = TRUE
:
coe_census_parish(ons_id = "TS037", parish_codes = c(580342, 580334), relative = TRUE)
#> Church of England Census Data
#> TS037 - General health
#> Units: Proportion of all persons
#> # A tibble: 2 × 7
#> parish_code population general_health_very_good general_health_good
#> <chr> <dbl> <dbl> <dbl>
#> 1 580334 49315 0.542 0.330
#> 2 580342 6332 0.467 0.341
#> # ℹ 3 more variables: general_health_fair <dbl>, general_health_bad <dbl>,
#> # general_health_very_bad <dbl>
#> Parish-level data compiled by the Church of England
Sometimes people want to see how their parish compares to its diocese
and to the nation as a whole. coedata
contains a function that returns
this data for any parish and any number of ONS datasets:
coe_parish_snapshot(580342, ons_ids = "TS037")
#> $TS037
#> Church of England Census Data
#> TS037 - General health
#> Units: Proportion of all persons
#> # A tibble: 3 × 9
#> level level_code level_name population general_health_very_good
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 parish 580342 Stifford: St Mary 6332 0.467
#> 2 diocese 8 Chelmsford 3281380 0.497
#> 3 nation <NA> england 56490046 0.485
#> # ℹ 4 more variables: general_health_good <dbl>, general_health_fair <dbl>,
#> # general_health_bad <dbl>, general_health_very_bad <dbl>
When you’re looking at individual parishes with coedata
, you’ll need
to identify them with their unique parish codes. If you’re not sure what
the parish code is for a parish or church, you can either:
- Find the parish in the intercative map provided by the Church of England’s Data Services team
- Find the church’s church code by clicking ‘more information’ on its A
Church Near You page, and then use
coe_parish_from_church()
to find it’s parish code.
Most of the statistics used in this package are labelled very
intuitively, using labels like general_health_very_good
or
country_of_birth_middle_east_asia
. This is not true of the
socio0economic classification data (TS062), which uses labels like
ns_sec_L1_3
. To understand these labels, please consult the table
returned by ns_sec_descriptions()
.
- All census data was originally provided by the Office for National Statistics. ONS also maintain the nomis service, which was used to source some of this package’s internal data.
- Parish-level census data profiles were compiled by Ken Eames, who is a
senior statistical researcher at the Church of England’s Data
Services. Original parish-level datasets are available on the Church
of England
website
- Ken also maintains the parish map from which Church data are read by this package. Thanks again, Ken!
- Thanks to ropensci for their development and maintenance of the nomisr package, which was used to interface with nomis.
- Thanks to Jenny Bryan at Posit for the development and maintenance of googlesheets4, which provided a simple, secure way of minimising package size by storing data remotely.
- Add IMD data