ABSTRACT

This chapter shows how to create a dashboard to visualize spatial data using flexdashboard. The dashboard shows fine particulate air pollution levels in each of the world countries in 2016. R Markdown allows easy work reproducibility by including R code that generates results and narrative text explaining the work. When the R Markdown file is compiled, the R code is executed and the results are appended to a report that can take a variety of formats including HTML and PDF documents. Dashboard components are shown according to a layout that needs to be specified. Dashboards are divided into columns and rows. The dashboard shows fine particulate air pollution levels in each of the world countries in 2016. Air pollution data are obtained from the World Bank1 using the wbstats package, and the world map is obtained from the rnaturalearth package.