December 15, 2022
Research Highlight

Creating Customizable Maps for Comparisons Across Scenarios, Years, And Data Classes

rmap helps users with limited to no geographic information system knowledge use R to visualize simple tabular data

Map of the US with multicolored regions

rmap provides the global modeling community with a new tool to easily create highly customizable maps based on simple tabular data.

(Image by Zarrar Khan | Pacific Northwest National Laboratory)

The Science                                 

Most data relevant to the multi-sector dynamics (MSD) community involves changes in both space and time. “rmap” is an R package that allows users to easily plot tabular data onto maps with limited geographic information systems (GIS) knowledge. All elements of rmap produced maps are fully customizable. Thus, rmap allows users to easily visualize and highlight key changes across time, scenarios, and space by converting simple tables into powerful maps.

The Impact

MSD research deals with evolution of parameters across sectors over time and space. rmap generalizes the visualization of spatio-temporal data by providing an easy-to-use tool that transforms basic standardized tables to detailed maps showing how a provided parameter changes across space and time. These changes are important to the key messages from many analyses. rmap makes it easy to capture changes without prior GIS knowledge, something that may be outside the domain of some scientists working on MSD-related projects as well as any other studies where visualization of spatio-temporal data is useful.

Summary

rmap is an R package that allows users to easily plot tabular data on maps without any GIS knowledge. Maps produced by rmap are ggplot objects, capitalizing on the flexibility and advancements of the ggplot2 package. All elements of each map are fully customizable. rmap automatically detects and produces comparison maps if the data has multiple scenarios or time periods. It also generates animations for time series data. Advanced users can load their own shapefiles if desired. rmap comes with a range of pre-built color palettes but users can provide any existing R color palette or create their own. Four different legend types are available to highlight different data distributions. The input spatial data can be either gridded or polygon data. rmap comes preloaded with standard country, state, and basin maps as well as custom maps compatible with the Global Change Analysis Model (GCAM) spatial boundaries. rmap has already been used in multiple multisector dynamics publications. rmap's automatic processing of tabular data using pre-built map selection, difference map calculations, faceting, and animations offers unique functionality that makes it a powerful, yet simple tool for users looking to explore multi-sector, multi-scenario data across space and time.

PNNL Contact

Marshall Wise, Pacific Northwest National Laboratory, marshall.wise@pnnl.gov

Funding

This research was supported by the Department of Energy, Office of Science, as part of research in MultiSector Dynamics, Earth and Environmental System Modeling Program.

Published: December 15, 2022

Khan, Z., M. Zhao, C. R. Vernon, T. Wild, and B. Yarlagadda. 2022. “rmap: An R package to plot and compare tabular data on customizable maps across scenarios and time.” Journal of Open Source Software, 7(77), 4015. [DOI: 10.21105/joss.04015]