Skip to content

Commit

Permalink
Create and use new data using the Moray Lookup
Browse files Browse the repository at this point in the history
This will likely need doing for other data too...
  • Loading branch information
Moohan committed May 6, 2024
1 parent 983134f commit 4be1e49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions General Health/2. General Health SLF Data.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ ltc_data <- left_join(ltc_agg, slf_pops)

#### SAVE DATA ####

saveRDS(ltc_data, file = paste0(
lp_path, "General Health/DATA ",
ext_year, "/LTC_from_SLF.RDS"
))
arrow::write_parquet(
ltc_data,
paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF_Moray_custom.parquet"),
version = "latest",
compression = "zstd"
)
4 changes: 3 additions & 1 deletion General Health/3. General Health Outputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ check_missing_data_scotpho(adp_presc)


# Long-term conditions
ltc <- readRDS(paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF.RDS"))
ltc <- arrow::read_parquet(
paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF_Moray_custom.parquet")
)

ltc <- dplyr::rename(ltc,
"Arthritis" = "arth", "Asthma" = "asthma", "Atrial fibrillation" = "atrialfib", "Cancer" = "cancer",
Expand Down

0 comments on commit 4be1e49

Please sign in to comment.