Preface |
|
xiii | |
About the author |
|
xix | |
|
I Geospatial health data and INLA |
|
|
1 | (50) |
|
|
3 | (4) |
|
1.1 Geospatial health data |
|
|
3 | (1) |
|
|
4 | (1) |
|
1.3 Communication of results |
|
|
5 | (2) |
|
2 Spatial data and R packages for mapping |
|
|
7 | (20) |
|
2.1 Types of spatial data |
|
|
7 | (3) |
|
|
7 | (2) |
|
2.1.2 Geostatistical data |
|
|
9 | (1) |
|
|
9 | (1) |
|
2.2 Coordinate reference systems |
|
|
10 | (5) |
|
2.2.1 Geographic coordinate systems |
|
|
11 | (1) |
|
2.2.2 Projected coordinate systems |
|
|
12 | (1) |
|
2.2.3 Setting Coordinate Reference Systems in R |
|
|
13 | (2) |
|
|
15 | (3) |
|
|
18 | (9) |
|
|
19 | (2) |
|
|
21 | (1) |
|
|
22 | (3) |
|
|
25 | (2) |
|
3 Bayesian inference and INLA |
|
|
27 | (6) |
|
|
27 | (2) |
|
3.2 Integrated nested Laplace approximation |
|
|
29 | (4) |
|
|
33 | (18) |
|
|
34 | (1) |
|
|
34 | (1) |
|
|
35 | (2) |
|
|
37 | (12) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (10) |
|
4.5 Control variables to compute approximations |
|
|
49 | (2) |
|
II Modeling and visualization |
|
|
51 | (124) |
|
|
53 | (22) |
|
5.1 Spatial neighborhood matrices |
|
|
54 | (3) |
|
5.2 Standardized incidence ratio |
|
|
57 | (5) |
|
5.3 Spatial small area disease risk estimation |
|
|
62 | (9) |
|
5.3.1 Spatial modeling of lung cancer in Pennsylvania |
|
|
64 | (7) |
|
5.4 Spatio-temporal small area disease risk estimation |
|
|
71 | (3) |
|
5.5 Issues with areal data |
|
|
74 | (1) |
|
6 Spatial modeling of areal data. Lip cancer in Scotland |
|
|
75 | (18) |
|
|
75 | (3) |
|
|
78 | (2) |
|
|
79 | (1) |
|
|
80 | (3) |
|
|
83 | (4) |
|
|
83 | (1) |
|
6.4.2 Neighborhood matrix |
|
|
83 | (1) |
|
6.4.3 Inference using INLA |
|
|
84 | (1) |
|
|
85 | (2) |
|
6.5 Mapping relative risks |
|
|
87 | (1) |
|
6.6 Exceedance probabilities |
|
|
88 | (5) |
|
7 Spatio-temporal modeling of areal data. Lung cancer in Ohio |
|
|
93 | (18) |
|
|
93 | (2) |
|
|
95 | (6) |
|
|
95 | (1) |
|
|
96 | (2) |
|
|
98 | (1) |
|
|
98 | (3) |
|
|
101 | (1) |
|
|
102 | (4) |
|
|
106 | (2) |
|
|
106 | (1) |
|
7.5.2 Neighborhood matrix |
|
|
106 | (1) |
|
7.5.3 Inference using INLA |
|
|
107 | (1) |
|
7.6 Mapping relative risks |
|
|
108 | (3) |
|
|
111 | (22) |
|
8.1 Gaussian random fields |
|
|
111 | (4) |
|
8.2 Stochastic partial differential equation approach |
|
|
115 | (1) |
|
8.3 Spatial modeling of rainfall in Parana, Brazil |
|
|
116 | (13) |
|
|
116 | (1) |
|
|
117 | (2) |
|
8.3.3 Building the SPDE model on the mesh |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (2) |
|
|
122 | (2) |
|
8.3.7 Stack with data for estimation and prediction |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
8.3.11 Projecting the spatial field |
|
|
126 | (3) |
|
8.4 Disease mapping with geostatistical data |
|
|
129 | (4) |
|
9 Spatial modeling of geostatistical data. Malaria in The Gambia |
|
|
133 | (22) |
|
|
133 | (1) |
|
|
134 | (6) |
|
|
134 | (2) |
|
9.2.2 Transforming coordinates |
|
|
136 | (1) |
|
|
137 | (1) |
|
9.2.4 Environmental covariates |
|
|
137 | (3) |
|
|
140 | (5) |
|
|
140 | (1) |
|
|
141 | (1) |
|
9.3.3 Building the SPDE model on the mesh |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (1) |
|
9.3.7 Stack with data for estimation and prediction |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
9.4 Mapping malaria prevalence |
|
|
145 | (5) |
|
9.5 Mapping exceedance probabilities |
|
|
150 | (5) |
|
10 Spatio-temporal modeling of geostatistical data. Air pollution in Spain |
|
|
155 | (20) |
|
|
155 | (3) |
|
|
158 | (4) |
|
|
162 | (10) |
|
|
163 | (1) |
|
|
163 | (1) |
|
10.3.3 Building the SPDE model on the mesh |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
166 | (2) |
|
10.3.7 Stack with data for estimation and prediction |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (2) |
|
10.4 Mapping air pollution predictions |
|
|
172 | (3) |
|
III Communication of results |
|
|
175 | (86) |
|
11 Introduction to R Markdown |
|
|
177 | (12) |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
180 | (2) |
|
|
182 | (2) |
|
|
184 | (1) |
|
|
184 | (5) |
|
12 Building a dashboard to visualize spatial data with flexdash-board |
|
|
189 | (14) |
|
12.1 The R package flexdashboard |
|
|
189 | (3) |
|
|
190 | (1) |
|
|
190 | (1) |
|
12.1.3 Dashboard components |
|
|
191 | (1) |
|
12.2 A dashboard to visualize global air pollution |
|
|
192 | (11) |
|
|
192 | (2) |
|
|
194 | (1) |
|
|
195 | (2) |
|
12.2.4 Histogram using ggplot2 |
|
|
197 | (1) |
|
12.2.5 R Markdown structure. YAML header and layout |
|
|
197 | (2) |
|
12.2.6 R code to obtain the data and create the visualizations |
|
|
199 | (4) |
|
|
203 | (14) |
|
13.1 Examples of Shiny apps |
|
|
203 | (2) |
|
13.2 Structure of a Shiny app |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
207 | (1) |
|
13.5 Inputs, outputs and reactivity |
|
|
208 | (1) |
|
13.6 Examples of Shiny apps |
|
|
209 | (3) |
|
|
209 | (2) |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (2) |
|
|
215 | (2) |
|
14 Interactive dashboards with flexdashboard and Shiny |
|
|
217 | (8) |
|
14.1 An interactive dashboard to visualize global air pollution |
|
|
218 | (7) |
|
15 Building a Shiny app to upload and visualize spatio-temporal data |
|
|
225 | (30) |
|
|
225 | (2) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
231 | (6) |
|
|
231 | (1) |
|
15.7.2 Time plot using dygraphs |
|
|
232 | (2) |
|
|
234 | (3) |
|
|
237 | (8) |
|
15.8.1 Reactivity in dygraphs |
|
|
239 | (1) |
|
15.8.2 Reactivity in leaflet |
|
|
240 | (5) |
|
|
245 | (3) |
|
15.9.1 Inputs in ui to upload a CSV file and a shapefile |
|
|
245 | (1) |
|
15.9.2 Uploading CSV file in server() |
|
|
246 | (1) |
|
15.9.3 Uploading shapefile in server() |
|
|
246 | (1) |
|
15.9.4 Accessing the data and the map |
|
|
247 | (1) |
|
15.10 Handling missing inputs |
|
|
248 | (2) |
|
15.10.1 Requiring input files to be available using req() |
|
|
248 | (1) |
|
15.10.2 Checking data are uploaded before creating the map |
|
|
249 | (1) |
|
|
250 | (5) |
|
16 Disease surveillance with SpatialEpiApp |
|
|
255 | (6) |
|
|
255 | (1) |
|
16.2 Use of SpatialEpiApp |
|
|
256 | (5) |
|
|
256 | (1) |
|
|
256 | (4) |
|
|
260 | (1) |
|
|
261 | (4) |
|
A R installation and packages used in the book |
|
|
261 | (4) |
|
A.1 Installing R and RStudio |
|
|
261 | (1) |
|
A.2 Installing R packages |
|
|
262 | (1) |
|
A.3 Packages used in the book |
|
|
262 | (3) |
Bibliography |
|
265 | (8) |
Index |
|
273 | |