Skip to content

Commit

Permalink
IMD UK at LSOA level added
Browse files Browse the repository at this point in the history
  • Loading branch information
jennajt committed Jul 23, 2024
1 parent e7b16b6 commit e6c9b31
Show file tree
Hide file tree
Showing 3 changed files with 42,647 additions and 0 deletions.
27 changes: 27 additions & 0 deletions data-raw/imd_uk_lsoa.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
library(tidyverse)
library(IMD)

# ---- IMD UK ----
# Decile 1 = most deprived
# Each nation deciled separately

imd_eng <-
imd_england_lsoa |>
select(lsoa_code, IMD_decile)

imd_wales <- imd_wales_lsoa |>
select(lsoa_code, IMD_decile)

imd_scotland <- imd_scotland_dz |>
select(lsoa_code = dz_code, IMD_decile)

imd_ni <- imd_northern_ireland_soa |>
select(lsoa_code = soa_code, IMD_decile)

imd_uk_lsoa <- rbind(imd_eng, imd_wales, imd_scotland, imd_ni) |>
select(lsoa_code,
`IMD Deciles, 1: most deprived, 10: least deprived` = IMD_decile)

# Save output to data/ folder
usethis::use_data(imd_uk_lsoa, overwrite = TRUE)
readr::write_csv(imd_uk_lsoa, "data-raw/imd_uk_lsoa.csv")
Loading

0 comments on commit e6c9b31

Please sign in to comment.