Skip to content

Commit

Permalink
Updates for using new lookup and only one age system
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranmcmonagle committed Jul 18, 2020
1 parent 07fa7e3 commit 8639d95
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions inst/scripts/nrs_demographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,29 @@ download_source_version(dataset = "nrs_demographics")
sourcefile <- c("data-raw/sape-2018-persons.xlsx",
"data-raw/sape-2018-females.xlsx",
"data-raw/sape-2018-males.xlsx")
genderbreakdown = list("persons"="persons",
"genders"=c("males","females"))
h5filename <- "demographics.h5"
datazone_sf <- file.path("data-raw", "datazone_shapefile",
"SG_DataZone_Bdry_2011.shp")
grp.names <- c("dz","ur", "iz","mmw","spc","la", "hb", "ttwa", "grid1km",
"grid10km")
full.names <- c("data zone","urban rural classification", "intermediate zone", "multi member ward",
full.names <- c("datazone","urban rural classification", "intermediate zone", "multi member ward",
"scottish parliamentary constituency",
"local authority",
"health board",
"travel to work area",
"grid area",
"grid area")
subgrp.names <- c("total", "1year", "5year", "10year",
"sg_deaths_scheme")
age.classes <- list("total", 0:90, seq(0, 90, 5), seq(0, 90, 10),
c(0, 1, 15, 45, 65, 75, 85))
subgrp.names <- c("1year")
age.classes <- list(0:90)
conversionh5filename = "scotgov_lookup.h5"
devtools::load_all(path="/Users/ciaranmcmonagle/r_projects/SCRCdataAPI")

process_nrs_demographics(sourcefile = sourcefile,
h5filename = h5filename,
datazone_sf = datazone_sf,
grp.names = grp.names,
full.names = full.names,
subgrp.names = subgrp.names,
age.classes = age.classes,
conversionh5filename = conversionh5filename)

conversionh5filename = conversionh5filename,
genderbreakdown = genderbreakdown)

0 comments on commit 8639d95

Please sign in to comment.