-
Notifications
You must be signed in to change notification settings - Fork 0
/
scarring_exploratoryplots.Rmd
125 lines (85 loc) · 4.77 KB
/
scarring_exploratoryplots.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
title: "Exploratory unemployment graphics"
author: "Dan Olner"
date: "11/03/2022"
output:
html_document:
keep_md: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = F, warning = F, echo = F)
```
```{r echo = F, warning = F, message = F}
library(png)
library(grid)
library(tidyverse)
library(sf)
library(tmap)
ea <- readRDS("R_data/econactive_ttwa_5census.rds")
```
```{r fig.width=2, fig.height=1.5, echo=FALSE, eval=F}
img <- readPNG("images/t_value_onesample_equation.png")
grid.raster(img)
```
**These plots are just for thinking, not for publishing.**
Some pre-amble bullet points:
* The data is **percent unemployed in 1991 (tweaked) wards** across 5 Censuses from 1971 to 2011. Percent unemployed is a subset of the count of **economically active people**.
* So an issue we face here: there were many people pushed onto long-term disability benefits, especially in ex-mining communities, who I think will have been in the stats as 'economically inactive' (see e.g. this by a couple of UoS economists: [New Evidence on Disability Benefit Claims in
the UK: The Role of Health and Local Labour
Market, Roberts & Taylor 2019](https://www.sheffield.ac.uk/media/7133/download).) Wonder if it's possible to get data on that? (They use BHS here.)
# Starting with just looking at unemployment change within the Sheffield/Rotherham TTWA itself...
```{r}
#https://stackoverflow.com/questions/60420075/load-premade-gganimate-gif-into-rmarkdown-chunk-to-caption
knitr::include_graphics("R_outputs/Scarring/sheffield_unemploymentchange5census.gif")
```
# Sheffield in context: top ten TTWAs (by economically active population): change in unemployment over the 5 Censuses
Note Sheffield and London between 1981 and 1991: unemployment rising where most drop.
```{r fig.width=8,fig.height=3}
ea$totaleconpop = ea$econActive + ea$unemployed
#Yeah, that works - Sheffield/Roth is 9th on list. So, important.
ttwa_order <- ea %>%
st_set_geometry(NULL) %>%
group_by(ttwa) %>%
summarise(totaleconpop_perttwa = sum(totaleconpop)) %>%
arrange(-totaleconpop_perttwa)
topttwas <- ea %>% filter(ttwa %in% ttwa_order$ttwa[1:10]) %>%
st_set_geometry(NULL) %>%
group_by(ttwa,censusYear) %>%
summarise(tot_econactive = sum(econActive), tot_unemployed = sum(unemployed)) %>%
mutate(percentUnemployed = (tot_unemployed / tot_econactive)*100)
ggplot(topttwas, aes(x = censusYear, y = percentUnemployed, colour = fct_reorder(ttwa,-percentUnemployed))) +
geom_line() +
geom_point() +
scale_colour_brewer(palette = "Paired")
```
Sheffield and London were 2 of 50% of TTWAs that saw unemployment rise from 81-91. The pattern between Censuses is:
* 71-81: every single TTWA saw unemployment **rise**
* 81-91: 51% saw unemployment rise, the other half dropped (see maps below, there's a pattern that's relevant.)
* 91-01: every single TTWA saw unemployment **drop**
* 01-11: 77% saw unemployment rise.
# Geography of unemployment change 1981-1991
So, unemployment rose everywhere from 71-81. For that 50% split from 81 to 91, there's a geography to it. No legend here, but gives the impression:
* Redder = unemployment rising more
* Bluer = unemployment dropping more
```{r fig.height=8}
img <- readPNG("R_outputs/Scarring/GB_81-91unemploymentchange_ttwa.png")
grid.raster(img)
```
That cluster near Sheffield/Rotherham where unemployment went up:
```{r fig.height=8}
img <- readPNG("R_outputs/Scarring/Sheffieldzoom_GB_81-91unemploymentchange_ttwa.png")
grid.raster(img)
```
# Comparing change within each Census (animated GIF)
I wanted to see what Sheffield's unemployment looked like at each Census **compared to the rest of Great Britain at the same time point** (i.e. was it extreme / any outliers etc). To do this I've:
* Used a Z-score of unemployment per ward for each Census (values of zero are the GB mean - standardised scores below zero are relatively **lower** unemployment, above zero are relatively **higher** unemployment, compared to the rest of GB at that Census)
* Compared the top ten TTWAs again
* Animated each Census on the same scale
Things to note:
* Sheffield wards don't appear extreme generally... (compare to Liverpool and Glasgow, for example)
* But note: Sheffield unemployment extends right through the first three Censuses, where many others see a reduction. This supports what the maps are showing - the Sheffield region seemed to have a longer-term unemployment impact (along with other clusters) compared to much of GB.
* It's interesting how little the **relative shape of unemployment** changed across the decades for certain areas. Sheffield changed more than most.
```{r}
#https://stackoverflow.com/questions/60420075/load-premade-gganimate-gif-into-rmarkdown-chunk-to-caption
knitr::include_graphics("R_outputs/Scarring/census_unemployment_zscore_violinplots.gif")
```