Skip to main content
U.S. flag

An official website of the United States government

Publication Date
16 September 2022

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

Authors

Author

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 products have 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.

Khan, Zarrar, Mengqi Zhao, Chris R. Vernon, Thomas Wild, and Brinda Yarlagadda. 2022. “Rmap: An R Package To Plot And Compare Tabular Data Oncustomizable Maps Across Scenarios And Time”. Journal Of Open Source Software 7 (77). The Open Journal: 4015. doi:10.21105/joss.04015.
Funding Program Area(s)