This package contains useful functions for the Kent Public Health Observatory team in Kent County Council.
devtools::install_github("Kent-PHO/kphotools")Standardised KPHO style map using ggplot2, sf and patchwork code.
Standardised KPHO colour palettes (for district, utla, hcp and nhs trust) printed in the console or within ggplot2 code.
Converts ICD10 codes to the corresponding name of causes of death. Can provide high-level categories of causes of death or more detailed categories.
Creates a new column of age bands based on a column of single year ages. The age bands come out in the format needed to use the PHE indicators life expectancy function.
Creates a new column of european standard population (ESP) weights based on a column of age bands in your dataframe. The ESP weights come out in the format needed to use some of the PHEindicators functions.
Creates a lifetable when supplied a dataframe with only two columns (single year of age and corresponding deaths). Goes beyond existing lifetable functions by providing each parameter in the lifetable calculation needed for other forumla (e.g. decomposition of life expectnacy gaps).