#rstats dataviz showing indices of deprivation in 'lava lamps'
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
publication-ready-graphics
.DS_Store
.gitignore
LA_IMD_Violin.Rproj
LICENCE
README.md
WalesLavaLamp.png
Working_Script.R
engimdsortIMDfillpolitic.png
engimdsortIMDfillpolitic.svg
engimdsortIMDfillpolitic2.svg
engimdsortIMDpcon.png
engimdsortimd.pdf
engimdsortimd.png
engimdsortlatitude.png
gmlaimd.png
laimd.png
laimdsmall.png
london.png
ni_rough.png
nirelandimd.png
nirelandimd.svg
scothighres.ai
scothighres.png
scothighres.svg
scothighres_mod.png
scothighres_mod.svg
scotland_rough.png
scotlandimd.png
simd.sparql
walesimd.png
walesimd.svg

README.md

IMD Lava Lamp Plots

The repo contains the data and r script to make 'lava lamp plots' by administrative geography, using the Indices of Deprivation data published by the Ministry for Housing, Communities and Local Government.

Lava Lamp Plots

Getting Started

Feel free to clone this repo into a new project to open in RStudio.

The file Working_Script.R has the code needed to generate the plots. I've annotated this file as best I can, without overdoing it.

To make this, I:

  • Got English LSOA deprivation data from OpenDataCommunities
  • Got English LA deprivation data from OpenDataCommunities
  • Got an English lookup file from Office for National Statistics
  • Got Welsh LSOA deprivation data from StatsWales
  • Got a Welsh lookup file from StatsWales
  • Separately for England and Wales Matched the data so that I had a single dataframe with lsoa, lsoa deprivation rank, la, la name, la deprivation rank
  • Calculated the vingtiles of each lsoa (1 - 20)
  • Plotted this as a violin plot using ggplot2 in R

Supporting data is available in the data folder.

The source of the data is:

Still to do

  • Change ordering of the plots
  • Do Northern ireland
  • Add data for colouring (such as political control)
  • Do a version by parliamentary constituency
  • Make a low-res version of the image to embed in this readme
  • Sort the labels so they fit (wrap or truncate gracefully)

Built With

Author

Acknowledgments