### Domain:Income ###
# One parent households
one_parent_households_fields <- c(
'T5_1OPFC_H', # One parent family (father) with children households (No. of households)
'T5_1OPMC_H', # One parent family (mother) and children households (No. of households)
'T5_1OPFCO_H',# One parent family (father) with children and others households (No. of households)
'T5_1OPMCO_H' # One parent family (mother) with children and others households (No. of households)
)
one_parent_households_data <- census_data[, one_parent_households_fields, drop = FALSE]
one_parent_households <- rowSums(one_parent_households_data, na.rm=TRUE)
one_parent_households_pct <- (one_parent_households / households_total) * 100.0
names(one_parent_households_pct)[1] <- 'one_parent_households_pct'
# Three or more children per household
#TODO
## For census purposes, a family is defined as a couple with or without children, or a one parent family with one or more children.
## Family members must be usual residents of the relevant household.
## Note: Families can include children aged 18 years (now adults) and over living with their parents
## Dividing by total households, not total families
## Total households = family households + one-person households + non-family households
## Would these be better, children ?:
## T4_2_3CU15 Familes with 3 children - All children aged under 15
## T4_2_4CU15 Families with 4 children - All children aged under 15
## T4_2_GE5CU15 Families with 5 or more children - All children aged under 15
three_or_more_children_households_fields <- c(
'T4_2_3CT', # Families with 3 children - Total
'T4_2_4CT', # Families with 4 children - Total
'T4_2_GE5CT' # Families with 5+ children - Total
)
three_or_more_children_households_data <- census_data[, three_or_more_children_households_fields, drop = FALSE]
three_or_more_children_households <- rowSums(three_or_more_children_households_data, na.rm=TRUE)
three_or_more_children_households_pct <- (three_or_more_children_households / households_total) * 100.0
names(three_or_more_children_households_pct)[1] <- 'three_or_more_children_households_pct'
# Low skilled employment
low_skilled_employment_fields <- c('T9_2_PE', #E Manual skilled (No. of persons)
'T9_2_PF', #F Semi-skilled (No. of persons)
'T9_2_PG' #G Unskilled (No. of persons)
)
low_skilled_employment_data <- census_data[, low_skilled_employment_fields, drop = FALSE]
low_skilled_employment <- rowSums(low_skilled_employment_data, na.rm=TRUE)
low_skilled_employment_pct <- (low_skilled_employment / population_total) * 100.0
names(low_skilled_employment_pct)[1] <- 'low_skilled_employment_pct'
# Farmers
farmers_fields <- c(
'T9_2_PI' # Farmers (No. of persons)
#'T9_2_PJ' # Agricultural workers (No. of persons) Forestry and fishing also included
)
farmers_data <- census_data[, farmers_fields, drop = FALSE]
farmers <- rowSums(farmers_data, na.rm=TRUE)
farmers_pct <- (farmers / population_total) * 100.0
names(farmers_pct)[1] <- 'farmers_pct'
# Unemployment
unemployment_fields <- c(
'T8_1_LFFJT', # Looking for first regular job - Total
'T8_1_STUT', # Short term unemployed - Total
'T8_1_LTUT', # Long term unemployed - Total
'T8_1_LAHFT', # Looking after home/family - Total (NOT SURE ABOUT THIS ONE)
'T8_1_UTWSDT' # Unable to work due to permanent sickness or disability - Total (MAY CORRELATE WITH HEALTH TOO MUCH)
)
unemployment_data <- census_data[, unemployment_fields, drop = FALSE]
unemployment <- rowSums(unemployment_data, na.rm=TRUE)
unemployment_pct <- (unemployment / population_total) * 100.0
names(unemployment_pct)[1] <- 'unemployment_pct'
# Combine all these indicators into an array for this domain
income_domain_pct <- cbind(one_parent_households_pct,
three_or_more_children_households_pct,
low_skilled_employment_pct,
farmers_pct,
unemployment_pct)
# Print the first six rows of the data to visually check it looks OK
head(income_domain_pct)
Social Vulnerability Ireland - Census Data#
Environment#
R Libraries#
Any required R libraries are imported into the kernal:
Output directory#
Load Data#
Import the csv data#
Ireland census data from: https://www.cso.ie/en/census/census2022/census2022smallareapopulationstatistics
Prepare data#
We only require a subset of the census data for our purposes. We therefore need to extract the relevant data, then combine these to create our vulnerability indicators.
In addition, the raw data is not suitable for use within the vulnerabiltiy assessment. It needs to be normalised based on the number of people/households within each small area. Therefore, the data is converted to percentages based on the total persons/households within each small area.
Supporting data#
Code that uniquely identifies the census area#
Population total#
Households / families total#
Domain data#
Age domain#
Health domain#
Income domain#
Information Access/Use domain#
Local knowledge domain#
Mobility domain#
Physical access domain#
Tenure domain#
Social Network domain data#
Housing Characteristics domain#
Combine all data into one table#
Calculate Z-Score#
The raw data is not suitable for use within the vulnerabiltiy assessment. It needs to be standardised. Therefore, the data is converted to z-scores. Z-scores are:
Calculate the Z-score#
Output the Z-score data#
END