/postcodeRank

Provide IMD Rankings for areas in the UK by Postcode

Primary LanguageROtherNOASSERTION

postcodeRank

The goal of this project is provide information on the "quality" of an area to support decisions on where to live / buy property.

Installation

To install the package run

devtools::install_github("gowerc/postcodeRank")

Details

The goal is to find some sort of metric to enable comparisons of different areas to help decide where to live. In the end the main metric used is the Index of Multiple Deprivation (2015). This data is based on LSOA codes and so this website is used to convert postcodes into LSOA codes.

Usage2

Below is an example of how to use the package:

library(postcodeRank)
mdi <- get_mdi_data()
postcodeRank( c("OX16 5TR", "M1 4QD", "SW9 8BS"), mdi=mdi)
#> # A tibble: 10 x 4
#>    Index                                                                                              OX165TR M14QD SW98BS
#>    <chr>                                                                                                <dbl> <dbl>  <dbl>
#>  1 Index of Multiple Deprivation (IMD) Decile (where 1 is most deprived 10% of LSOAs)                       2     3      2
#>  2 Income Decile (where 1 is most deprived 10% of LSOAs)                                                    3     8      3
#>  3 Employment Decile (where 1 is most deprived 10% of LSOAs)                                                2     8      3
#>  4 Education, Skills and Training Decile (where 1 is most deprived 10% of LSOAs)                            2     7      7
#>  5 Health Deprivation and Disability Decile (where 1 is most deprived 10% of LSOAs)                         2     2      2
#>  6 Crime Decile (where 1 is most deprived 10% of LSOAs)                                                     1     1      1
#>  7 Barriers to Housing and Services Decile (where 1 is most deprived 10% of LSOAs)                          6     2      3
#>  8 Living Environment Decile (where 1 is most deprived 10% of LSOAs)                                        2     1      1
#>  9 Income Deprivation Affecting Children Index (IDACI) Decile (where 1 is most deprived 10% of LSOAs)       3     2      1
#> 10 Income Deprivation Affecting Older People (IDAOPI) Decile (where 1 is most deprived 10% of LSOAs)        3     2      1

Misc

Below are some addition things considered and some useful resources just for interest (they have not been used within this project)

  • There is a formal API to lookup LSOA codes from postcodes however at the time of creation I could not get it to work (and static lookup files are > 200 mb)
  • The police have an api for looking up crime data, also has options for just returning crime within a 1 mile radius)
  • ONS provide population estimates for output areas (OA, sub regions of LSOA standardised to have a mean of 1500 per OA) link
  • Formula for calculating distance between 2 lat,long coords link (also see the geosphere::distm() for R implementation)