Skip to content

Kent-PHO/kphotools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kphotools R package

This package contains useful functions for the Kent Public Health Observatory team in Kent County Council.

Installation

With devtools

devtools::install_github("Kent-PHO/kphotools")

Current functions

kpho_map()

Standardised KPHO style map using ggplot2, sf and patchwork code.

kpho_colours() WIP

Standardised KPHO colour palettes (for district, utla, hcp and nhs trust) printed in the console or within ggplot2 code.

icd10_name()

Converts ICD10 codes to the corresponding name of causes of death. Can provide high-level categories of causes of death or more detailed categories.

age_banding()

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.

add_esp()

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.

lt()

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).

About

An R package for the Kent Public Health Observatory Team.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages