-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
252 lines (188 loc) · 7.54 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
---
title: "Brisbane Flooding Vulnerability Index"
author:
- Catherine Kim
- Kaitlyn Brown
- Richard Cottrell
- Jess Hopf
- Aiden Price
- Connie Susilawati
date: "29/06/2022"
output:
ioslides_presentation:
css: assets/torino_style.css
beamer_presentation: default
subtitle: ''
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, cache=TRUE, message=FALSE, results=FALSE, warning=FALSE, tidy.opts=list(width.cutoff=38, indent=2), tidy=TRUE)
library(sf)
library(tidyverse)
library(ozmaps)
qut_blue = "#00407a"
qut_dark_blue = "#06ABE8"
```
<!-- Remove slide numbers -->
<style type="text/css">
slides > slide:not(.nobackground):after {
content: '';
}
</style>
<!-- Code to make images full size -->
<style>
.fullslide img {
margin-top: -85px;
margin-left: -60px;
width: 900px;
height: 700px;
}
</style>
# Brisbane Flooding Hackathon Presentation | For R Ladies Brisbane
## {.fullslide}
<center>
<img src="images/UQ_flooding.jpeg">
</center>
<div style="position: absolute; left: 50px; top:50px;background-color:#00407a72";>
<p><font color="white">
<br><strong> Motivation </strong><br>
<br> Impacts beyond flood inundation <br>
<p style = "margin-left: 40px"> Access to services - shops, hospitals, petrol stations </p>
<p style = "margin-left: 40px"> Loss of power </p>
<p style = "margin-left: 40px"> Road and public transport closures </p>
</font></p></div>
## {.fullslide}
<center>
<img src="images/flood_map.png">
</center>
<div style="position: absolute; left: 300px; top:150px;background-color:#00407a72";>
<p><font color="white">
<br><strong> What is the gap? </strong><br>
</font></p></div>
## What is vulnerability?
**Vulnerability** = ***Exposure*** + ***Sensitivity*** + ***Adaptive Capacity*** <br><font size="1"> IPCC Climate Change 2001: Impacts, Adaptation, and Vulnerability (eds McCarthy, J. J., Canziani, O. F., Leary, N. A., Dokken, D. J. & White, K. S.)</font></br>
**Exposure** is the immediate effect
**Sensitivity** represents the longstanding innate properties of the population
**Adaptive capacity** are the things that can be done to change impacts
## Our approach
We aim to create a vulnerability index for the Brisbane City local government area (LGA) predicting the vulnerability of each level 2 statistical area (SA2).
<font size="4">
**Exposure**: flood extent intersection with properties, services, infrastructure
<font size="3">
<ul>
<li>rules for certain services like power, buffer of affected area</li>
<li>various levels of exposure</li>
<li>measure changed access to services with flooded roads</li>
</ul>
</font>
**Sensitivity**: SA2 averages of demographic and socio-economic census data
**Adaptive capacity**: actions in place to increase resilience to flooding
<font size="3">
<ul>
<li>buy back programs</li>
<li>moving towns, [Grantham](https://theconversation.com/moving-grantham-relocating-flood-prone-towns-is-nothing-new-4878)</li>
<li>minimum build heights</li>
</ul>
</font>
</font>
## R Libraries
```{r echo=TRUE}
# simple features package for vector spatial data
library(sf)
# for data manipulation
library(tidyverse)
# Australian maps
library(ozmaps)
```
Code is courtesy of Rich Cotrell
Great data from Queensland Spatial Catalogue - [QSpatial](https://qldspatial.information.qld.gov.au/catalogue/custom/index.page)
## Flood awareness plot
```{r echo=-1, results=FALSE, tidy=TRUE, out.width="70%"}
path <- "C:/Users/kimc7/OneDrive - Queensland University of Technology/flooding_vulnerability/data/"
flood_extents_shp <- st_read(paste0(path,
"spatial/Flood__Awareness__Extents/Flood___Awareness___Extents.shp"))
ggplot()+
geom_sf(data = flood_extents_shp, fill="lightblue", colour = "grey90", size = 0.01)+
theme_bw()
```
## Local Government Areas - {ozmaps}
```{r echo=TRUE, results=FALSE, cache=TRUE}
lgas <- ozmaps::ozmap_data(data = "abs_lga")
bris_lga <- lgas %>% filter(NAME == unique(lgas$NAME)[grep("Brisbane", unique(lgas$NAME))]) %>% st_transform(crs = st_crs(flood_extents_shp))
```
## Level 2 Statistical Area
From the Australian Bureau of Statistics:
```{r echo=TRUE, results=FALSE}
SA2_aus <- st_read(paste0(path, "spatial/sa2_2016_aust_shape/SA2_2016_AUST.shp"))
SA2_bris <- SA2_aus %>%
filter(STE_NAME16 == "Queensland" &
GCC_NAME16 == "Greater Brisbane" &
SA4_NAME16 %in% c("Brisbane - East","Brisbane - North", "Brisbane - South", "Brisbane - West", "Brisbane Inner City") &
(! SA2_NAME16 %in% c("Redland Islands"))) %>%
st_transform(crs = st_crs(flood_extents_shp))
```
## Plot LGAs and SA2s
```{r, echo=TRUE, eval=FALSE}
ggplot()+ geom_sf(data= bris_lga) + labs(title = "LGA") +
theme(plot.title = element_text(size=30)) +
theme_bw()
ggplot()+ geom_sf(data= SA2_bris) + labs(title = "SA2s") +
theme(plot.title = element_text(size=30)) +
theme_bw()
```
```{r, out.width="50%"}
ggplot()+ geom_sf(data= bris_lga) + labs(title = "LGA") +
theme_bw()
ggplot()+ geom_sf(data= SA2_bris) + labs(title = "SA2s") +
theme_bw()
```
## Emergency Services
```{r echo=TRUE}
ems <- st_read(paste0(path, "/spatial/QSC_QLD emergency service locations/Emergency_services_facilities.shp")) %>%
st_transform(crs = st_crs(flood_extents_shp))
ems_crop <- st_crop(x = ems, y = st_bbox(flood_extents_shp)) %>% filter(ATTRIBUTES %in% c("Queensland Ambulance Service", "Queensland Fire and Emergency Services", "Queensland Police Service"))
ems_intersect <- st_intersection(ems_crop, SA2_bris)
```
## Plot Emergency Services
```{r plot EMS, echo=TRUE, out.width="80%"}
ggplot()+
geom_sf(data = SA2_bris, alpha=0, size =0.5) +
geom_sf(data = ems_intersect, aes(colour = ATTRIBUTES), size= 1)+
theme_bw()
```
## Petrol stations
```{r, echo=-4}
petrol <- st_read(paste0(path, "spatial/Petrol_Stations_Australia/PetrolStations.gdb")) %>% st_transform(crs = st_crs(flood_extents_shp))
petrol_crop <- st_crop(x = petrol, y = st_bbox(SA2_bris))
petrol_intersect <- st_intersection(x = petrol_crop, y = SA2_bris)
```
## Putting it all together | Flood extent with emergency services and petrol stations
```{r, out.width="110%"}
ggplot()+
geom_sf(data = flood_extents_shp, size=0.01, fill="lightblue", alpha = 1)+
geom_sf(data = SA2_bris, alpha=0, size =0.2, colour= "grey50")+
geom_sf(data = ems_intersect, aes(colour = ATTRIBUTES), size= 1)+
geom_sf(data = petrol_intersect, aes(fill = OPERATIONALSTATUS), size = 1, shape = 17)+
theme_bw()+
labs(colour = "EMS", fill="Petrol stations")
```
## Work in Progress
How to turn this in to an index?
- Combine all the variables of each component (Exposure etc) into a score
- Add exposure, sensitivity, adaptive capacity and scale
## Future Work - Dream RShiny App!
Example: [SpatialEpiApp](https://community.rstudio.com/t/shiny-contest-submission-spatialepiapp-for-disease-surveillance/22699) for disease surveillance by Paula Moraga.
<img src="https://community.rstudio.com/uploads/default/original/2X/c/c13be2cb13791b8f44e7f8fd08038bd5960ba41c.gif" width = "800">
<br><font size="2">
SpatialEpiApp is a Shiny web application that allows to visualize spatial and spatio-temporal disease data, estimate disease risk, and detect clusters.
</font></br>
## Team
<center>
<img src="images/CKim.jpg" alt="Catherine Kim" width = 25%>
<img src="images/KBrown.jpg" alt="Kaitlyn Brown" width = 25%>
<img src="images/RCotrell_sq_2022-05-079.jpg" alt="Richard Cottrell" width = 25%>
<img src="images/JHopf.jpg" alt="Jess Hopf" width = 25%>
<img src="images/APrice.jpg" alt="Aiden price" width = 25%>
<img src="images/Connie-Susilawati.jpg" alt="Connie Susilawati" width = 25%>
</centre>
Thank you!
<script src = "assets/beamer.js"></script>