-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.Rmd
887 lines (728 loc) · 54.4 KB
/
index.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
---
title: "Climate Emergency open data companion"
lang: "en-GB"
output:
html_document:
highlight: null
mathjax: null
theme: flatly
css: styles.css
self_contained: TRUE
toc: true
toc_depth: 2
toc_float: true
df_print: paged
includes:
in_header: index_head_includes.html
---
<main>
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, message=FALSE, warning=FALSE)
library(tidyverse) ; library(scales) ; library(ggsci) ; library(sf) ; library(ggrepel) ; library(lubridate) ; library(rvest) ; library(packcircles) ; library(treemapify) ; library(ggiraph) ; library(viridis) ; library(leaflet) ; library(leaflet.extras) ; library(htmlwidgets) ; library(htmltools) ; library(classInt)
# ggplot2 theme
theme_x <- function () {
theme_minimal(base_size = 14, base_family = "Open Sans") %+replace%
theme(
panel.grid.major.x = element_blank(),
panel.grid.minor = element_blank(),
plot.title = element_text(size = 16, face = "bold", hjust = 0),
plot.subtitle = element_text(hjust = 0, margin = margin(9, 0, 9, 0)),
plot.caption = element_text(size = 12, color = "grey50", hjust = 1, margin = margin(t = 15)),
axis.title = element_text(size = 10, hjust = 1),
axis.text.x = element_text(angle = 90, hjust = 1, margin = margin(t = 0)),
legend.position = "top",
legend.justification = "left"
)
}
la <- st_read("data/geospatial/trafford_local_authority.geojson")
lsoa <- st_read("data/geospatial/lsoa.geojson") %>%
filter(area_name == "Trafford") %>%
st_transform(4326)
```
Last updated: `r format(Sys.time(), '%d %B %Y')`
**As of February 2020, around 70% of the UK's councils have declared a <a href="https://en.wikipedia.org/wiki/Climate_emergency_declaration" target="_blank">'climate emergency'</a>. This datakit is designed to help councils address this emergency by making open data relating to climate change more discoverable.**
<br/>
```{r}
climate_emergency_councils <- st_read("data/councils/climate_emergency_councils.geojson", quiet = TRUE)
leaflet(height = 600, width = "100%", options = leafletOptions(zoomControl = FALSE)) %>%
setView(-3, 54.3, zoom = 6) %>%
addTiles(urlTemplate = "",
attribution = '<a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2020)</a> | Data: <a href="https://www.climateemergency.uk" target="_blank">climateemergency.uk</a>') %>%
addPolygons(data = climate_emergency_councils,
fillColor = ifelse(climate_emergency_councils$status == "Declared", "#FFE800","#13B3E5"),
fillOpacity = 0.8, weight = 0.1, opacity = 1, color = "#212121",
label = ~climate_emergency_councils$area_name,
labelOptions = labelOptions(textsize = "13px", direction = "auto"),
highlight = highlightOptions(color = "#212121", weight = 1, bringToFront = TRUE)) %>%
addFullscreenControl() %>%
addResetMapButton() %>%
addLegend(title = "UK councils declaring a climate emergency<p style = 'font-size:11px;'>6 February 2020<small>",
colors = c("#FFE800","#13B3E5"),
labels = c("Declared", "Undeclared"), opacity = 0.8,
position = "topright") %>%
onRender(
"function(el, t) {var myMap = this;myMap._container.style['background'] = '#ffffff';}",
paste0("function(el, x) {$('head').append(","\'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\'",");}"))
```
<br/>
**A variety of open datasets are presented with metadata and example visualisations. Structured data that has been pre-processed by the <a href="https://www.trafforddatalab.io/" target="_blank">Trafford Data Lab</a> are provided at local authority level where available. In some cases, the <a href="https://cran.r-project.org/" target="_blank">R</a> script used to pre-process the data is given rather than the data.**
**A companion <a href="https://trafforddatalab.shinyapps.io/climate_emergency" target="_blank">application</a> enables UK councils - and their residents - to build a slide pack of data visualisations relating to climate change for their local authority.**
***
## Carbon dioxide emissions
Carbon dioxide emissions broken down by housing, transport and industrial & commercial sectors. These estimates exclude large industrial sites, railways, motorways and land-use because local authorities have no influence on them. Carbon dioxide emissions are also available per capita (<em>kt</em>CO<sub>2</sub>/capita) in the source dataset.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Carbon dioxide emissions |2005-2021 |Local authority |<a href="https://www.gov.uk/government/collections/uk-local-authority-and-regional-carbon-dioxide-emissions-national-statistics" target="_blank">BEIS, DESNZ</a> | 2024-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/co2_emissions.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Carbon dioxide emissions by main sector in Trafford, 2021."}
co2_emissions <- read_csv("data/co2_emissions.csv") %>%
filter(area_name == "Trafford", period == "2021", sector != "LULUCF") %>%
mutate(percent = round(value/sum(value)*100,0))
layout <- circleProgressiveLayout(co2_emissions, sizecol = "percent")
vertices <- circleLayoutVertices(layout, npoints = 100)
ggplot(data = vertices) +
geom_polygon(aes(x, y, group = id, fill = factor(id)), color = "transparent", show.legend = FALSE) +
geom_text(data = layout, aes(x, y), label = paste0(str_wrap(co2_emissions$sector, width = 15), "\n", co2_emissions$percent, "%"),
check_overlap = TRUE, color = "#000000", size = 2) +
scale_fill_manual(values = c("#cc1333","#5F4690","#1D6996","#38A6A5","#a1cce6","#ecc30b","#1a68cc")) +
labs(title = "Carbon dioxide emissions by main sector",
subtitle = paste0("Trafford", ", 2021"),
caption = "Excluding LULUCF\nSource: BEIS, DESNZ") +
coord_equal() +
theme_void() +
theme(plot.title = element_text(size = 16, face = "bold", hjust = 0),
plot.subtitle = element_text(hjust = 0, margin = margin(9, 0, 9, 0)),
plot.caption = element_text(size = 12, color = "grey50", hjust = 1, margin = margin(t = 15)))
```
**Additional resources**
The <a href="http://naei.defra.gov.uk/" target="_blank">National Atmospheric Emissions Inventory</a> (NAEI) website has an <a href="https://naei.beis.gov.uk/laghgapp/" target="_blank">interactive map</a> that allows you to explore CO<sub>2</sub> emissions by local authority area and sector.
***
## Carbon dioxide emissions from large industrial installations
Carbon dioxide emissions from large industrial installations are available across the UK from the <a href="http://naei.defra.gov.uk/" target="_blank">National Atmospheric Emissions Inventory</a>. Other greenhouse gases such as methane and nitrous oxide are also available.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|CO<sub>2</sub> emissions from large industrial installations |2021 |Point locations |<a href="https://naei.beis.gov.uk/data/map-large-source" target="_blank">NAEI</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/large_point_sources.csv" target="_blank">view</a> |
</div>
```{r}
large_point_sources <- read_csv("data/large_point_sources.csv") %>%
mutate(value = round(value,0)) %>%
filter(area_name == "Trafford") %>%
mutate(popup = str_c("<strong>", site, "</strong><br/>",
"<em>Operator: </em>", operator, "<br/>",
"<em>Sector: </em>", sector, "<br/>",
"<em>CO<sub>2</sub> emissions (2021): </em>", comma(value), " tonnes") %>%
map(HTML))
leaflet(width = "100%") %>%
setView(lng = -2.330256, lat = 53.421829, zoom = 11) %>%
addTiles(urlTemplate = "https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://cartodb.com/attributions">CartoDB</a> | <a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2023)</a> | Data: <a href="https://naei.beis.gov.uk/data/map-large-source" target="_blank">NAEI</a>') %>%
addPolygons(data = la, fillOpacity = 0, color = "#212121", weight = 2, opacity = 1) %>%
addCircles(data = large_point_sources, lng = ~lon, lat = ~lat, radius = ~sqrt(value), stroke = TRUE, weight = 1, color = "#FFFFFF", fillColor = "#212121", fillOpacity = 0.7, label = ~popup, labelOptions = labelOptions(textsize = "12px", direction = "auto")) %>%
addControl(paste0("<strong> CO<sub>2</sub> emissions from large industrial installations</strong><br /><em>Trafford, 2021</em>"), position = 'topright') %>%
onRender(paste0("function(el, x) {$('head').append(","\'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\'",");}"))
```
***
## Industrial and commercial energy consumption
Estimates of total industrial & commercial energy consumption are available for 2005 to 2021.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Industrial and commercial energy consumption |2021 |Local authority |<a href="https://www.gov.uk/government/collections/total-final-energy-consumption-at-sub-national-level" target="_blank">DESNZ, BEIS</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/non_domestic_energy_consumption.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Industrial and commercial fuel use in Trafford, 2021."}
industrial_commercial_energy_consumption <- read_csv("data/industrial_commercial_energy_consumption.csv") %>%
filter(area_name == "Trafford") %>%
mutate(value = round(value,0)) %>%
arrange(value) %>%
mutate(group = factor(group, levels = group))
ggplot(industrial_commercial_energy_consumption, aes(x = value, y = group)) +
geom_segment(aes(x = 0, xend = value, y = group, yend = group),
linetype = "dotted", colour = "#212121", size = 0.5) +
geom_point(colour = "#dd1c77", size = 15) +
geom_text(aes(label = comma(value, accuracy = 1)), fontface = "bold", colour = "white") +
labs(x = "Thousands of tonnes of oil equivalent (ktoe)", y = NULL,
title = "Industrial and commercial fuel use",
subtitle = paste0(distinct(industrial_commercial_energy_consumption, area_name), ", 2021"),
caption = "Source: DESNZ, BEIS",
fill = NULL) +
theme_x() +
theme(aspect.ratio = 0.5,
panel.grid.major = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_text(hjust = 0))
```
***
## Road transport fuel consumption
Estimates of road transport fuel use by local authority are available for petrol (cars, motorcycles and LGVs) and diesel (cars, LGVs, HGVs and buses) consuming vehicles. Estimates by road type (motorways, A roads and minor roads) are also available in the source dataset.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Road transport energy consumption |2005-2021 |Local authority |<a href="https://www.gov.uk/government/collections/road-transport-consumption-at-regional-and-local-level" target="_blank">DESNZ, BEIS</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/road_transport_energy_consumption.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Fuel use by vehicle type in Trafford, 2005-2021."}
road_transport_fuel_consumption <- read_csv("data/road_transport_fuel_consumption.csv") %>%
filter(area_name == "Trafford") %>%
mutate(group = ordered(group, levels = pull(arrange(filter(., period == "2021-01-01"), value),group)))
ggplot(road_transport_fuel_consumption,
aes(x = period, y = value, colour = group, group = group)) +
geom_line(size = 0.8, show.legend = FALSE) +
geom_hline(yintercept = 0, size = 1, colour = "#212121") +
scale_y_continuous(position = "right", labels = comma, expand = c(0.005, 0.005)) +
scale_color_futurama() +
facet_wrap(~group, nrow = 1) +
labs(x = NULL,
y = "Thousand tonnes of oil equivalent (ktoe)",
title = "Fuel use by vehicle type",
subtitle = paste0(distinct(road_transport_fuel_consumption, area_name), ", 2005-2021"),
caption = "Source: DESNZ, BEIS",
colour = NULL) +
theme_x() +
theme(strip.text = element_text(size = 9, face = "bold", hjust = 0, vjust = 1))
```
***
## Domestic energy consumption
Estimates of total domestic energy consumption area available from 2005 until 2021.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Domestic energy consumption |2021 |Local authority |<a href="https://www.gov.uk/government/collections/total-final-energy-consumption-at-sub-national-level" target="_blank">DESNZ, BEIS</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/domestic_energy_consumption.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Domestic fuel use in Trafford, 2021."}
domestic_energy_consumption <- read_csv("data/domestic_energy_consumption.csv") %>%
filter(area_name == "Trafford") %>%
mutate(value = round(value,0)) %>%
arrange(value) %>%
mutate(group = factor(group, levels = group))
ggplot(domestic_energy_consumption, aes(x = value, y = group)) +
geom_segment(aes(x = 0, xend = value, y = group, yend = group),
linetype = "dotted", colour = "#212121", size = 0.5) +
geom_point(colour = "#DDCC77", size = 15) +
geom_text(aes(label = comma(value, accuracy = 1)), fontface = "bold", colour = "white") +
labs(x = "Thousands of tonnes of oil equivalent (ktoe)", y = NULL,
title = "Domestic fuel use",
subtitle = paste0(distinct(domestic_energy_consumption, area_name), ", 2021"),
caption = "Source: DESNZ, BEIS",
fill = NULL) +
theme_x() +
theme(aspect.ratio = 0.5,
panel.grid.major = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_text(hjust = 0))
```
***
## Domestic property build period
Information about the age of domestic dwellings is available from the <a href="https://www.gov.uk/government/organisations/valuation-office-agency" target="_blank">Valuation Office Agency</a>. The age of a building influences energy consumption with older properties tending to be less energy efficient than newer buildings.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Domestic property build period |pre-1900 to 2023 |Local authority |<a href="https://www.gov.uk/government/collections/valuation-office-agency-council-tax-statistics" target="_blank">VOA</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/domestic_property_build_period.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Domestic property build period in Trafford, pre-1900 to 2023."}
domestic_property_build_period <- read_csv("data/domestic_property_build_period.csv") %>%
filter(area_name == "Trafford") %>%
mutate(period = as.factor(period),
period = fct_relevel(period, "pre-1900"))
ggplot(domestic_property_build_period,
aes(x = factor(period), y = value)) +
geom_col(fill = "brown4") +
geom_hline(yintercept = 0, size = 1, colour = "#212121") +
scale_y_continuous(labels = comma) +
labs(x = NULL,
y = "Dwellings",
title = "Build period of domestic dwellings",
subtitle = paste0(distinct(domestic_property_build_period, area_name), ", Up to March 2023"),
caption = "Source: Valuation Office Agency") +
theme_x() +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
```
***
## EPCs by Energy Efficiency Rating
An Energy Performance Certificate's (EPC) Energy Efficiency Rating gives a property an energy efficiency rating from A (most efficient) to G (least efficient) and is valid for 10 years.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|EPCs by Energy Efficiency Rating |2013/Q4 to 2023/Q3 |Local authority |<a href="https://www.gov.uk/government/collections/energy-performance-of-buildings-certificates" target="_blank">MHCLG</a> | 2023-12-21 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/domestic_epcs_energy_efficiency.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3}
domestic_epcs_energy_efficiency <- read_csv("data/domestic_epcs_energy_efficiency.csv") %>%
filter(area_name == "Trafford") %>%
mutate(percent = value / sum(value)) %>%
filter(efficiency %in% c("A", "B", "C")) %>%
summarise(abc = sum(percent))
```
`r percent(domestic_epcs_energy_efficiency$abc, accuracy = 0.1)` of homes in Trafford are well insulated with an Energy Performance Certificate (EPC) rating of A, B or C.
***
## EPCs by Environmental Impact Rating
An Energy Performance Certificate's (EPC) Environmental Impact Rating is an estimate of the amount of CO<sub>2</sub> produced by a home. The most energy efficient homes fall within band A (lowest CO<sub>2</sub> emissions) and the least efficient in Band G (highest CO<sub>2</sub> emissions). Lodgements on the Energy Performance of Buildings Register are published on a quarterly basis.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|EPCs by Environmental Impact Rating |2013/Q4 to 2023/Q3 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/live-tables-on-energy-performance-of-buildings-certificates" target="_blank">MHCLG</a> | 2024-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/domestic_epcs_environmental_impact.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Cumulative domestic EPCs by Environmental Impact Rating in Trafford, 2008-2019."}
domestic_epcs_environmental_impact <- read_csv("data/domestic_epcs_environmental_impact.csv") %>%
filter(area_name == "Trafford") %>%
group_by(area_name, impact) %>%
summarise(value = sum(value)) %>%
mutate(value = value / sum(value))
ggplot(domestic_epcs_environmental_impact, aes(x = fct_rev(factor(impact)), y = value)) +
geom_col(fill = "#bcbddc") +
geom_hline(yintercept = 0, size = 1, colour = "#212121") +
geom_text(aes(x = impact, y = value, label = percent(value, accuracy = 0.1)),
colour = "#212121", size = 5, hjust = -0.1) +
scale_y_continuous(expand = c(0.005, 0.005), limit = c(0, 0.4)) +
labs(x = NULL, y = NULL,
title = "Cumulative domestic EPCs by Environmental Impact Rating",
subtitle = paste0(distinct(domestic_epcs_environmental_impact, area_name), ", 2008-2019"),
caption = "Source: MHCLG") +
coord_flip() +
theme_x() +
theme(panel.grid.major = element_blank(),
plot.title = element_text(size = 16),
axis.text.x = element_blank(),
axis.text.y = element_text(size = 14, face = "bold"))
```
***
## Fuel poverty
A household is considered fuel poor if their income is below the poverty line (taking into account housing costs) and their home has a low energy efficiency.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Fuel poverty |2021 |England |<a href="https://www.gov.uk/government/statistics/sub-regional-fuel-poverty-data-2019" target="_blank">BEIS</a> | 2023-11-24 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/fuel_poverty.csv" target="_blank">view</a> |
</div>
```{r}
fuel_poverty <- left_join(lsoa %>% select(lsoa21cd), read_csv("data/fuel_poverty.csv") %>%
filter(area_name == "Trafford"), by = "lsoa21cd") %>%
mutate(popup = str_c("<strong>", lsoa21nm, "</strong><br/>",
round(value,1), "%") %>%
map(HTML))
breaks <- classIntervals(fuel_poverty$value, n = 5, style = "jenks")$brks
pal <- colorBin(palette = "YlGnBu", domain = NULL, bins = breaks, na.color = "#FFFFFF")
leaflet(fuel_poverty, width = "100%") %>%
addTiles(urlTemplate = "https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://cartodb.com/attributions">CartoDB</a> | <a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2024)</a> | Data: <a href="https://www.gov.uk/government/statistics/sub-regional-fuel-poverty-data-2019" target="_blank">BEIS</a>') %>%
addPolygons(fillColor = ~pal(value), fillOpacity = 0.8, smoothFactor = 0.5,
stroke = TRUE, weight = 1, color = "#212121", opacity = 1,
label = ~popup,
labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "12px", direction = "auto"),
highlightOptions = highlightOptions(color = "white", weight = 2, bringToFront = TRUE)) %>%
addLegend(pal = pal, values = ~value, opacity = 0.7, title = NULL, position = "bottomright",
labFormat = labelFormat(suffix = "%")) %>%
addControl(paste0("<strong>Proportion of households in fuel poverty</strong><br /><em>Trafford's LSOAs, 2021</em>"), position = 'topright') %>%
onRender(paste0("function(el, x) {$('head').append(","\'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\'",");}"))
```
**Additional resources**
Detailed fuel poverty data at a national level (England) are available from <a href="https://www.gov.uk/government/statistics/fuel-poverty-detailed-tables-2023-2022-data" target="_blank">BEIS</a>.
***
## Flood risk from rivers and/or the sea
The chance of flooding from rivers and/or the sea is available at 50m by 50m resolution. Each grid cell is allocated to one of four flood risk categories, taking into account flood defences and their condition. The risk of flooding from surface water is available from <a href="https://data.gov.uk/dataset/d5ca01ec-e535-4d3f-adc0-089b4f03687d/risk-of-flooding-from-surface-water-suitability" target="_blank">data.gov.uk</a>.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Code |
|---|---|---|---|---|---|---|
|Flood risk |2019-12-20 (quarterly updates) |UK |<a href="https://data.gov.uk/dataset/risk-of-flooding-from-rivers-and-sea1" target="_blank">Environment Agency</a> | 2019-06-12 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="code/flood_risk.R" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Risk of flooding from rivers and sea in Trafford, 2019-12-20."}
flood_risk <- st_read("data/flood_risk.geojson", quiet = TRUE)
ggplot() +
geom_sf(data = la, fill = "#E7E7E7", alpha = 1, colour = "NA") +
geom_sf(data = flood_risk, aes(fill = prob_4band), colour = "NA") +
scale_fill_manual(values = c("#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"),
labels = c("Very Low", "Low", "Medium", "High")) +
labs(x = NULL, y = NULL,
title = "Risk of Flooding from Rivers and Sea",
subtitle = "Trafford, 2019-12-20",
caption = "Contains Ordnance Survey data © Crown copyright and database right 2020\nSource: Environment Agency",
fill = NULL) +
guides(fill = guide_legend(reverse = TRUE)) +
coord_sf(datum = NA) +
theme_x() +
theme(plot.caption = element_text(size = 8, hjust = 0),
legend.position = "right",
legend.title = element_text(size = 10),
legend.text = element_text(size = 8))
```
**Additional resources**
The <a href="https://www.gov.uk/government/organisations/environment-agency" target="_blank">Environment Agency</a> has an <a href="https://flood-warning-information.service.gov.uk/long-term-flood-risk/map" target="_blank">interactive map</a> showing flood risk information.
***
## Air Quality Management Areas
<a href="https://uk-air.defra.gov.uk/aqma/" target="_blank">Air Quality Management Areas</a> (AQMA) are declared when a local authority expects that air quality will not meet the <a href="https://uk-air.defra.gov.uk/assets/documents/National_air_quality_objectives.pdf" target="_blank" aria-label="National Air Quality Objectives (PDF)">National Air Quality Objectives</a>.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Code |
|---|---|---|---|---|---|---|
|Air Quality Management Areas |2020-07 |UK |<a href="https://uk-air.defra.gov.uk/aqma/maps" target="_blank">DEFRA</a> |2020-07 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="code/aqma.R" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Air Quality Management Area in Trafford, 2019."}
aqma <- st_read("data/aqma.geojson", quiet = TRUE)
ggplot() +
geom_sf(data = la, fill = "#E7E7E7", alpha = 1, colour = "NA") +
geom_sf(data = aqma, aes(fill = prob_4band), fill = "#727C81", colour = "NA") +
labs(x = NULL, y = NULL,
title = "Air Quality Management Area",
subtitle = "Trafford, 2020",
caption = "Contains Ordnance Survey data © Crown copyright and database right 2020\nSource: DEFRA") +
guides(fill = guide_legend(reverse = TRUE)) +
coord_sf(datum = NA) +
theme_x() +
theme(plot.caption = element_text(size = 8, hjust = 0),
legend.position = "right",
legend.title = element_text(size = 10),
legend.text = element_text(size = 8))
```
**Additional resources**
<a href="https://www.gov.uk/government/organisations/department-for-environment-food-rural-affairs" target="_blank">DEFRA</a> has an <a href="https://uk-air.defra.gov.uk/aqma/maps" target="_blank">AQMAs interactive map</a>.
***
## Background air pollution
Estimates for annual mean background concentrations of nitrogen oxide (NOx), nitrogen dioxide (NO<sub>2</sub>), coarse (PM<sub>10</sub>) and fine particulate matter (PM<sub>2.5</sub>) are available at 1km x 1km resolution.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Background air pollution |20 |1 km x 1 km grid square centroids |<a href="https://uk-air.defra.gov.uk/data/pcm-data" target="_blank">DEFRA</a> | 2022 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/background_air_pollution.shp" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Modelled background PM2.5 concentrations in Trafford, 2022"}
background_air_pollution <- st_read("data/background_air_pollution.shp", quiet = TRUE) %>%
filter(area_name == "Trafford")
ggplot(data = background_air_pollution,
aes(fill = pm252022g, color = pm252022g)) +
geom_sf(data = la, fill = NA, color = "#212121", size = 0.5) +
geom_sf(color = NA, alpha = 0.8) +
scale_fill_viridis_c(option = "magma", direction = -1,
guide = guide_colorbar(
barheight = unit(2, units = "mm"),
barwidth = unit(50, units = "mm"),
title.position = "left",
title.vjust = 1,
label.hjust = 0.5
)) +
labs(title = expression(bold(paste("Modelled background ", PM[2.5], " concentrations"))),
subtitle = "Trafford, 2022",
caption = "Contains Ordnance Survey data © Crown copyright and database right 2024\nSource: DEFRA",
fill = "Annual mean (μg/m3)") +
coord_sf(datum = NA) +
theme_x() +
theme(plot.title = element_text(size = 16),
plot.caption = element_text(size = 8, hjust = 0),
legend.title = element_text(size = 10),
legend.text = element_text(size = 8))
```
**Additional resources**
The <a href="https://uk-air.defra.gov.uk/data/gis-mapping" target="_blank">UK Ambient Air Quality Interactive Map</a> visualises background concentrations of air pollution.
***
## Roadside air pollution
There are several sources of continuous air quality monitoring data including: <a href="https://uk-air.defra.gov.uk/data/" target="_blank">DEFRA UK-AIR</a>; <a href="https://www.airqualityengland.co.uk/" target="_blank">Air Quality England</a>; <a href="http://www.scottishairquality.scot/" target="_blank">Air Quality in Scotland</a>; <a href="https://airquality.gov.wales/" target="_blank">Air Quality in Wales</a>; <a href="https://www.airqualityni.co.uk/" target="_blank">Northern Ireland Air</a> and <a href="https://openaq.org/#/locations?countries=GB" target="_blank">OpenAQ</a>. The legal limits for NO<sub>2</sub>, PM<sub>10</sub> and PM<sub>2.5</sub> concentrations are available from the <a href="https://ec.europa.eu/environment/air/quality/standards.htm" target="_blank">European Commission Air Quality Standards</a> page.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Code |
|---|---|---|---|---|---|---|
|Roadside air pollution |Continuous |Monitoring station |<a href="https://www.airqualityengland.co.uk/" target="_blank">Ricardo Energy & Environment</a> | 2024-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="code/roadside_air_pollution.R" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="1-hour mean NO2 concentrations at Trafford A56 monitoring station during 2023."}
roadside_air_pollution <- read_csv("data/roadside_air_pollution.csv")
ggplot(roadside_air_pollution, aes(x = date_hour, y = value)) +
geom_line(colour = "#CC6677", size = 0.3) +
geom_hline(aes(yintercept = 200), linetype = "dotted", color = "#000000", size = 0.8) +
geom_hline(yintercept = 0, size = 1, colour = "#212121") +
scale_x_datetime(breaks = roadside_air_pollution$date_hour, date_labels = "%b-%y", date_breaks = "3 months") +
scale_y_continuous(limits = c(0, 220), expand = c(0.005, 0.005)) +
labs(title = expression(bold(paste("1-hour mean ", NO[2], " concentrations"))),
subtitle = "Trafford A56 monitoring station, 2023",
caption = "Source: Trafford Council / Ricardo EE",
x = "",
y = expression(paste("μg/m"^3))) +
theme_x()
```
***
## Renewable electricity generation
Data on renewable electricity installations, their capacity (MW) and generation (MWh).
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Renewable electricity generation |2014-2022 |Local authority |<a href="https://www.gov.uk/government/statistics/regional-renewable-statistics" target="_blank">BEIS</a> | 2024-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/renewable_electricity_generation.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Renewable electricity generation by source in Trafford, 2022."}
renewable_electricity_generation <- read_csv("data/renewable_electricity_generation.csv") %>%
filter(area_name == "Trafford") %>%
mutate(info = str_c(group, ": ", comma(value)))
ggplot(renewable_electricity_generation %>% filter(value != 0),
aes(area = value, fill = fct_reorder(group, value, .desc = TRUE), subgroup = group, label = info)) +
geom_treemap(colour = "#212121") +
geom_treemap_text(colour = "#FFFFFF", place = "bottomleft", reflow = TRUE,
padding.x = grid::unit(1.5, "mm"),
padding.y = grid::unit(2, "mm"),
size = 14) +
scale_fill_simpsons() +
labs(x = NULL, y = NULL,
title = "Renewable electricity generation by source",
subtitle = paste0(distinct(renewable_electricity_generation, area_name), ", 2022"),
caption = paste0(paste0(renewable_electricity_generation %>% filter(is.na(value)) %>% pull(group),collapse = ", "), " generation\n was suppressed due to disclosure control.\nSource: BEIS"),
fill = "MWh") +
theme_x() +
theme(legend.position = "right")
```
***
## Onshore wind
The location of operational onshore (and offshore wind) turbines is recorded on the Renewable Energy Planning Database (REPD).
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Onshore wind |2023-10 |Point |<a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-monthly-extract" target="_blank">BEIS</a> | 2023-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/onshore_wind.csv" target="_blank">view</a> |
</div>
```{r}
onshore_wind <- read_csv("data/onshore_wind.csv") %>%
mutate(operator = iconv(operator, from = "latin1", to = "UTF-8"),
popup = str_c("<strong>", name, "</strong><br/>",
"<em>Local authority: </em>", area_name, "<br/>",
"<em>Turbines: </em>", turbines, "<br/>",
"<em>Capacity: </em>", capacity, " MW") %>%
map(HTML))
leaflet(width = "100%") %>%
setView(-2.28417866956407, 53.5151885751656, zoom = 9) %>%
addTiles(urlTemplate = "https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://cartodb.com/attributions">CartoDB</a> | <a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2020)</a> | Data: <a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-monthly-extract" target="_blank">BEIS</a>') %>%
addMarkers(data = onshore_wind, icon = makeIcon(iconUrl = "img/wind_turbine.png", iconWidth = 30, iconHeight = 30), label = ~popup, labelOptions = labelOptions(textsize = "12px", direction = "auto")) %>%
addFullscreenControl() %>%
addControl(paste0("<strong>Onshore wind turbines</strong>"), position = 'topright') %>%
onRender(paste0("function(el, x) {$('head').append(","\'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\'",");}"))
```
***
## Non-domestic Renewable Heat Incentive
The <a href="https://www.ofgem.gov.uk/environmental-programmes/non-domestic-rhi" target="_blank">Non-domestic Renewable Heat Incentive</a> is a UK Government scheme launched in November 2011 to encourage industry, businesses and public sector organisations to switch to renewable heating technologies. Participants are paid a tariff per unit of energy produced as recorded by an on-site meter over 20 years.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Non-domestic Renewable Heat Incentive |2011-11 to 2023-03 |Local authority |<a href="https://www.gov.uk/government/collections/renewable-heat-incentive-statistics" target="_blank">Ofgem</a> | 2024-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/non-domestic_rhi.csv" target="_blank">view</a> |
</div>
There have been `r pull(filter(read_csv("data/non-domestic_rhi.csv"),area_name == "Trafford"), value)` non-domestic Renewable Heat Incentive applications accredited in Trafford since the scheme was launched in 2011.
***
## Domestic Renewable Heat Incentive
The <a href="https://www.ofgem.gov.uk/environmental-programmes/domestic-rhi" target="_blank">Domestic Renewable Heat Incentive</a> is a UK Government scheme launched in April 2014 that encourages households to switch from gas and oil-fired boilers to low carbon heating technologies like heat pumps, biomass boilers and solar thermal panels. Financial support is linked to the production of renewable heat with payments received over seven years.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Domestic Renewable Heat Incentive |2014-04 to 2023-03 |Local authority |<a href="https://www.gov.uk/government/collections/renewable-heat-incentive-statistics" target="_blank">Ofgem</a> | 2024-01-22 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/domestic_rhi.csv" target="_blank">view</a> |
</div>
A total of `r pull(filter(read_csv("data/domestic_rhi.csv"),area_name == "Trafford"), value)` applications have been accredited for payment in Trafford between April 2014 and March 2023.
***
## Recycling
The percentage of household waste sent for reuse, recycling or composting. This local authority level measure is used as the basis of UK reporting for the <a href="https://ec.europa.eu/environment/waste/framework" target="_blank">EU Waste Framework Directive</a> which specifies a target to recycle, reuse or compost 50% of the UK's household waste by December 2020.
Data for England, Wales and Northern Ireland are available by financial year and by calendar year in Scotland.
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Recycling |2015/16 - 2021/22 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/env18-local-authority-collected-waste-annual-results-tables" target="_blank">Defra</a>; <a href="https://statswales.gov.wales/Catalogue/Environment-and-Countryside/Waste-Management/Local-Authority-Municipal-Waste" target="_blank">StatsWales</a>; <a href="https://www.sepa.org.uk/environment/waste/waste-data/waste-data-reporting/household-waste-data" target="_blank">SEPA</a>; <a href="https://www.daera-ni.gov.uk/publications/northern-ireland-local-authority-collected-municipal-waste-management-statistics-time-series-data" target="_blank">DAERA</a> | 2023-12-06 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/recycling.csv" target="_blank">view</a> |
```{r fig.retina = 3, fig.cap="Re-use, recycling or composting of household waste in Trafford, 2015/16 - 2021/22."}
recycling <- read_csv("data/recycling.csv") %>%
filter(area_name == "Trafford")
ggplot(recycling, aes(x = period, y = value, group = 1)) +
geom_line(colour = "#117733", size = 1) +
geom_hline(yintercept = 0, size = 1, colour = "#212121") +
scale_y_continuous(position = "right", labels = function(x) paste0(x, "%")) +
labs(x = NULL, y = NULL,
title = "Reuse, recycling or composting of household waste",
subtitle = paste0(distinct(recycling, area_name), ", 2015/16 - 2021/22"),
caption = "Source: DEFRA") +
theme_x() +
theme(plot.title = element_text(size = 18))
```
***
## Ultra low emission vehicles
Ultra low emission vehicles (ULEVs) emit less than 75g of CO<sub>2</sub> per km and typically refer to battery electric, plug-in hybrid electric and fuel cell electric vehicles.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Ultra low emission vehicles |2011-2022 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/all-vehicles-veh01" target="_blank">Department for Transport </a> | 2023-12-13 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/ulev.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="ULEVs as a proportion of all licensed vehicles in Trafford, 2011-2022."}
ulev <- read_csv("data/ulev.csv") %>%
filter(area_name == "Trafford") %>%
spread(indicator, value) %>%
drop_na() %>%
mutate(percent = `Ultra low emission vehicles`/`All licensed vehicles`)
ggplot(ulev, aes(x = period, y = percent)) +
geom_col(fill = "#ffa600") +
geom_hline(yintercept = 0, size = 1, colour = "#333333") +
scale_y_continuous(labels = percent_format(accuracy = 0.1)) +
scale_x_continuous(breaks=seq(2011,2022, by = 1)) +
labs(x = NULL, y = NULL,
title = "ULEVs as a proportion of all licensed vehicles",
subtitle = paste0(distinct(ulev, area_name), ", 2011-2022"),
caption = "Source: DfT and DVLA") +
theme_x() +
theme(axis.title.y = element_text(hjust = 0))
```
***
## Electric cars and vans
The number of licensed electric cars and vans (battery electric, plug-in hybrid electric, or range-extended electric) registered by the keeper's local authority is available by calendar year.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Licensed electric vehicles |2011-2022 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/all-vehicles-veh01" target="_blank">Department for Transport </a> | 2023-12-13 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/ev.csv" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="EVs as a proportion of all licensed cars and vans in Trafford, 2011-2018."}
ev <- read_csv("data/ev.csv") %>%
filter(area_name == "Trafford") %>%
spread(indicator, value) %>%
drop_na() %>%
mutate(percent = `Electric cars and vans`/`All cars and vans`)
ggplot(ev, aes(x = period, y = percent)) +
geom_col(fill = "#332288") +
geom_hline(yintercept = 0, size = 1, colour = "#333333") +
scale_y_continuous(labels = percent_format(accuracy = 0.1)) +
scale_x_continuous(breaks=seq(2011,2022, by = 1)) +
labs(x = NULL, y = NULL,
title = "EVs as a proportion of all licensed cars and vans",
subtitle = paste0(distinct(ev, area_name), ", 2011-2022"),
caption = "Source: DfT and DVLA") +
theme_x() +
theme(axis.title.y = element_text(hjust = 0))
```
***
## Electric vehicle charging locations
Infomation about electric car charging points are available from <a href="https://www.openchargemap.io" target="_blank">Open Charge Map</a>. The data are crowd-sourced so the accuracy of the data cannot be verified.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Code |
|---|---|---|---|---|---|---|
|Electric vehicle charging locations |Continuous |Point |<a href="https://www.openchargemap.io/site/about" target="_blank">Open Charge Map</a> |2024-01-22 |<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International</a> |<a href="code/electric_vehicle_charging_locations.R" target="_blank">view</a> |
</div>
```{r fig.retina = 3}
electric_vehicle_charging_locations <- read_csv("data/electric_vehicle_charging_locations.csv") %>%
mutate(site = str_replace_all(name, "'", ""),
popup = str_c("<strong>", name, "</strong><br/>",
"<em>Operator: </em>", operator, "<br/>",
"<em>Points: </em>", points) %>%
map(HTML))
leaflet(width = "100%") %>%
setView(lng = -2.330256, lat = 53.421829, zoom = 11) %>%
addTiles(urlTemplate = "https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://cartodb.com/attributions">CartoDB</a> | <a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2020)</a> | Data: <a href="https://map.openchargemap.io" target="_blank">Open Charge Map</a>') %>%
addPolygons(data = la, fillOpacity = 0, color = "#212121", weight = 2, opacity = 1) %>%
addMarkers(data = electric_vehicle_charging_locations, icon = makeIcon(iconUrl = "img/ev_charging_location.png", iconWidth = 20, iconHeight = 20), label = ~popup, labelOptions = labelOptions(textsize = "12px", direction = "auto")) %>%
addControl(paste0("<strong>Electric vehicle charging locations</strong><br /><em>Trafford, January 2024</em>"), position = 'topright') %>%
onRender(paste0("function(el, x) {$('head').append(","\'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\'",");}"))
```
**Additional resources**
<a href="https://map.openchargemap.io/#/search" target="_blank">Open Charge Map</a> allows you to explore electric vehicle charging locations across the UK.
***
## Cycling
Local authority cycling rates are published by the Department of Transport from the <a href="https://www.sportengland.org/research/active-lives-survey/" target="_blank">Active Lives Survey</a>.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Cycling |2021-11 - 2022-11 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/walking-and-cycling-statistics-cw" target="_blank">Department for Transport</a> | 2019-07-31 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/cycling.csv" target="_blank">view</a> |
</div>
The Active Lives Survey estimate that in 2022 the proportion of adults who cycled at least once a week was `r round(pull(filter(read_csv("data/cycling.csv"),area_name == "Trafford", frequency == "At least once per week"), value), 1)`%. Other cycling frequencies are shown below:
|How often? |% |
|:---|:-----|
|At least once a week |`r round(pull(filter(read_csv("data/cycling.csv"),area_name == "Trafford", frequency == "At least once per week"), value), 1)` |
|At least once per month |`r round(pull(filter(read_csv("data/cycling.csv"),area_name == "Trafford", frequency == "At least once per month"), value), 1)` |
***
## Walking
Local authority walking rates are published by the Department of Transport from the <a href="https://www.sportengland.org/research/active-lives-survey/" target="_blank">Active Lives Survey</a>.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Walking |2021-11 - 2022-11 |Local authority |<a href="https://www.gov.uk/government/statistical-data-sets/walking-and-cycling-statistics-cw" target="_blank">Department for Transport</a> | 2019-07-31 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/walking.csv" target="_blank">view</a> |
</div>
The Active Lives Survey estimate that in 2022 the proportion of adults who walked at least once a week was `r round(pull(filter(read_csv("data/walking.csv"),area_name == "Trafford", frequency == "Once per week"), value), 1)`%. Other walking frequencies are shown below:
|How often? |% |
|:---|:-----|
|At least five times a week |`r round(pull(filter(read_csv("data/walking.csv"),area_name == "Trafford", frequency == "At least 5 times per week"), value), 1)` |
|At least three times a week |`r round(pull(filter(read_csv("data/walking.csv"),area_name == "Trafford", frequency == "At least 3 times per week"), value), 1)` |
|At least once a week |`r round(pull(filter(read_csv("data/walking.csv"),area_name == "Trafford", frequency == "At least once per week"), value), 1)` |
|At least once per month |`r round(pull(filter(read_csv("data/walking.csv"),area_name == "Trafford", frequency == "At least once per month"), value), 1)` |
***
## Green belt
The percentage of land in each local authority area that is designated as Green Belt land by the local planning authority is published annually. Some local authorities are not listed in the dataset because they do not have any designated Green Belt land.
Please note: Greenwich is shown as ‘-’ in the raw data because it has less than five hectares of designated Green Belt land. This has been dropped from the processed data because it is not a numeric value.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Data |
|---|---|---|---|---|---|---|
|Green belt |2023-03-31 |England |<a href="https://www.gov.uk/government/collections/green-belt-statistics" target="_blank">Ministry of Housing, Communities & Local Government</a> |2023-12-15 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="data/green_belt.csv" target="_blank">view</a> |
</div>
The extent of the designated Green Belt in Trafford at 31 March 2023 was estimated at `r comma(pull(read_csv("data/green_belt.csv") %>% filter(area_name == "Trafford", indicator == "Green Belt area"), value))` hectares, or approximately `r round(pull(read_csv("data/green_belt.csv") %>% filter(area_name == "Trafford", indicator == "Green Belt area"), value)/pull(read_csv("data/green_belt.csv") %>% filter(area_name == "Trafford", indicator == "Total area"), value)*100, 1)`% of the land area of Trafford.
**Additional resources**
Green Belt polygon boundaries for local authorities (2023) can be directly downloaded from <a href="https://www.planning.data.gov.uk/dataset/green-belt" target="_blank">data.gov.uk</a>.
***
## Green spaces
Parks, playing fields, gardens and other green spaces that are likely to be publicly accessible are available in the <a href="https://www.ordnancesurvey.co.uk" target="_blank">Ordnance Survey's</a> OS Open Greenspace product.
<div class = "metadata">
|Indicator |Period |Geography |Source |Updated |Licence |Code |
|---|---|---|---|---|---|---|
|Green spaces |2019-04 |Great Britain |<a href="https://www.ordnancesurvey.co.uk/business-and-government/products/os-open-greenspace.html" target="_blank">Ordnance Survey</a> |2019-0 |<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" target="_blank">OGL v3.0</a> |<a href="code/greenspaces.R" target="_blank">view</a> |
</div>
```{r fig.retina = 3, fig.cap="Green spaces in Trafford, 2019"}
greenspaces <- st_read("data/greenspaces.geojson", quiet = TRUE)
ggplot() +
geom_sf(data = la, fill = "#E7E7E7", alpha = 1, colour = "NA") +
geom_sf(data = greenspaces, aes(fill = site_type), colour = "NA") +
scale_fill_manual(values = c("#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"),
labels = c("Allotments Or Community Growing Spaces",
"Golf Course", "Play Space", "Playing Field",
"Public Park Or Garden",
"Religious Ground and Cemeteries", "Sports")) +
labs(x = NULL, y = NULL,
title = "Green spaces",
subtitle = "Trafford, 2019",
caption = "Contains Ordnance Survey data © Crown copyright and database right 2019",
fill = NULL) +
coord_sf(datum = NA) +
theme_x() +
theme(plot.caption = element_text(size = 8),
legend.position = "right",
legend.title = element_text(size = 10),
legend.text = element_text(size = 8))
```
**Additional resources**
The <a href="http://naei.defra.gov.uk/" target="_blank">Ordnance Survey's</a> <a href="https://osmaps.ordnancesurvey.co.uk" target="_blank">interactive OS Maps tool</a> allows you to explore green spaces in the UK interactively.
<br /><br /><br /><br />
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /><br />All content is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</a> <a href="https://github.com/traffordDataLab/climate_emergency" target="_blank" aria-label="Visit our climate emergency repo on GitHub">
<span class="fa fa-github" style="font-size:24px; float:right; margin-top: -3px;"></span><span class="hideContent">GitHub</span>
</a></div></main>
<script>
// Add aria-label attribute to the fullscreen Leaflet map buttons to identify their purpose as the link are empty (assessibility issue)
// Maps may not have initialised at this point so set up an interval to keep calling until it has
var updateFullscreenButtonFn = setInterval(updateFullscreenButton, 100);
function updateFullscreenButton() {
try {
// We don't have an id or name so have to do it by classname
var arrFullscreenButtonLink = document.getElementsByClassName('leaflet-control-fullscreen-button');
if (arrFullscreenButtonLink.length == 2) {
for (var i = 0; i < arrFullscreenButtonLink.length; i++) {
// set aria-label to describe the function of the link/button
arrFullscreenButtonLink[i].setAttribute('aria-label', 'Maximise/minimise map.');
}
clearInterval(updateFullscreenButtonFn); // cancel any further calls to this function as we have completed all actions
}
}
catch(e) {
clearInterval(updateFullscreenButtonFn); // something went wrong so cancel fn call
}
}
// Add aria-label attribute to the reset Leaflet map button to identify its purpose as the button is empty (assessibility issue)
// Map may not have initialised at this point so set up an interval to keep calling until it has
var updateResetButtonFn = setInterval(updateResetButton, 100);
function updateResetButton() {
try {
// We don't have an id or name so have to do it by classname
var arrResetButtons = document.getElementsByClassName('easy-button-button');
if (arrResetButtons.length > 0) {
for (var i = 0; i < arrResetButtons.length; i++) {
// set aria-label to describe the function of the button
if (arrResetButtons[i].title == 'Reset View') arrResetButtons[i].setAttribute('aria-label', 'Reset map.');
}
clearInterval(updateResetButtonFn); // cancel any further calls to this function as we have completed all actions
}
}
catch(e) {
clearInterval(updateResetButtonFn); // something went wrong so cancel fn call
}
}
// Remove the redundant captions inserted below images. These are <p class="caption">...</p> elements created by the presence of fig.cap="..." in the chunks. We need these to provide the alt text for the images but don't need the captions as this creates duplicate/redundant text for screen readers.
// NOTE: the do while loop always references array index 0 because as the elements are removed from the DOM they are also removed from the array
var arrCaptions = document.getElementsByClassName('caption');
var parent;
do {
parent = arrCaptions[0].parentNode; // element containing the caption
parent.removeChild(arrCaptions[0]); // remove the caption element
}
while (arrCaptions.length > 0);
</script>