rmap: An R package to plot and compare tabular data on customizable maps across scenarios and time

Zarrar Khan, Mengqi Zhao, Chris R. Vernon, Thomas Wild, and Brinda Yarlagadda

DOI: https://doi.org/10.21105/joss.04015

Department of Energy, Office of Science, Earth & Environmental Systems Modeling Program Acknowledged Support: Yes, MultiSector Dynamics Program


rmap is an R package that allows users to easily plot tabular data (CSV or R data frames) on maps without any Geographic Information Systems (GIS) knowledge. Maps produced by rmap are ggplot objects and thus capitalize on the flexibility and advancements of the ggplot2 package (Wickham, 2011) and all elements of each map are thus fully customizable. Additionally, rmap automatically detects and produces comparison maps if the data has multiple scenarios or time periods as well as 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 also provide any R color palette or create their own as needed. Four different legend types
are available to highlight different kinds of 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 (Calvin et al., 2019). rmap has a growing number of users and its productshave been used in multiple multisector dynamics publications (Khan et al., 2021; Wild, Khan, Clarke, et al., 2021; Wild, Khan, Zhao, et al., 2021). rmap is also a required dependency in other R packages such as rfasst (Sampedro, 2021). 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 and yet simple tool for users looking to explore multi-sector, multi-scenario data across space and time.

Leave a Reply