Small Area Disease Risk Estimation and Visualization Using R

Small area disease risk estimation is essential for disease prevention and control. In this paper, we demonstrate how R can be used to obtain disease risk estimates and quantify risk factors using areal data. We explain how to define disease risk models and how to perform Bayesian inference using the INLA package. We also show how to make interactive maps of estimates using the leaflet package to better understand the disease spatial patterns and communicate the results. We show an example of lung cancer risk in Pennsylvania, United States, in year 2002, and demonstrate that R represents an excellent tool for disease surveillance by enabling reproducible health data analysis.

Paula Moraga

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

leaflet, SpatialEpi, spdep, ggplot2, flexdashboard, shiny, SpatialEpiApp, dygraphs, DT, rmarkdown

CRAN Task Views implied by cited packages

ReproducibleResearch, Spatial, Econometrics, Graphics, Phylogenetics, TimeSeries, WebTechnologies


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Moraga, "The R Journal: Small Area Disease Risk Estimation and Visualization Using R", The R Journal, 2018

BibTeX citation

  author = {Moraga, Paula},
  title = {The R Journal: Small Area Disease Risk Estimation and Visualization Using R},
  journal = {The R Journal},
  year = {2018},
  note = {},
  doi = {10.32614/RJ-2018-036},
  volume = {10},
  issue = {1},
  issn = {2073-4859},
  pages = {495-506}