title: "quickmapr
: Simplified mapping and basic interactivity."
author:
- name: Jeffrey W. Hollister
affiliation: U.S. Environmental Protection Agency
address:
- Office of Research and Development
- National Health and Environmental Effects Research Laboratory
- Atlantic Ecology Division
- 27 Tarzwell Drive
- Narragansett, RI 02882
email: hollister.jeff@epa.gov
abstract: >
There are many packages that already exist or are in active development that support the visualization of spatial data in R. However, there seems to be a gap for those that need to quickly view, compare, and interactively explore the results of a given spatial analysis without first having to convert to a different coordinate reference system. Functionality for the current release (v0.2.0) simplifies mapping of multiple sf
, sp
or raster
layers, and also provides interactive zooming, panning, labelling, selecting, and identifying. These tools are intended for use within an active spatial analysis workflow and not for production quality maps. Additionally, quickmapr
does not make any assumptions about coordinate reference systems and leaves managing of projections to the analyst. This paper introduces the package and shows examples of its typical use.
preamble: >
% Any extra latex you need in the preamble, \citep{R}, \citet{R}
bibliography: hollister.bib
output: rticles::rjournal_article
Spatial data analysis capabilities in R have been steadily growing over the last several years. We are now to the point where nearly all Geographic Information Systems (GIS) functionality can be accomplished without leaving R. The one area that had lagged behind was spatial data visualization and interactivity. This too is changing rapidly. Initially, spatial data visualization had been handled via base plotting methods (e.g from \CRANpkg{sp} or \CRANpkg{raster}) or via additional plotting packages such as \CRANpkg{ggplot2}\citep{pebesma2005classes, bivand2013asdar, raster, ggplot2}. While these methods provide the ability to make high quality maps, they do not provide interactivity, a hallmark of GIS.
To address this, most solutions (e.g. \CRANpkg{ggmap}, \CRANpkg{leaflet}, \CRANpkg{mapview} etc.) have relied on javascript libraries or other web APIs \citep{ggmap, leaflet, mapview}. These provide a modern interface, with a rich set of basemaps, but all assume a geographic coordinate system or Web Mercator coordinate reference system. In the case of typical spatial data analysis workflow it is often desirable to quickly map the resultant spatial datasets in the projection chosen for the analysis. Currently, this is not possible with the most used javascript libraries.
I developed \CRANpkg{quickmapr} to fill this gap and provide spatial data analysts with a tool to quickly map multiple layers and interact with the resultant map without having to utilize various APIs or external libraries and without having to re-project data. The goals of this paper are to describe the basic usage of \pkg{quickmapr}, show several examples of its use, and outline changes expected in future versions. We also briefly discuss the contribtuion that \pkg{quickmapr} makes to the existing suite of spatial data visualization tools in R.
The basic workflow for using \pkg{quickmapr} is as follows:
library(quickmapr)
data(lake)
qm <- qmap(elev,lake,samples,buffer)
The \code{qmap} object is an S3 object, with a class of "qmap" and contains a list with 11 items. These items are:
map_data
, but changes to reflect the currently selected zoom extent.map_data
. Defaults to order of map_data
map_data
basemap
. Controls quality of image with smaller resolution resulting in higher quality image, but slower drawing.Currently, the only implemented default method is for plotting which may be accessed either through qm
, plot(qm)
or print(qm)
.
This file is only a basic article template. For full details of The R Journal style and information on how to prepare your article for submission, see the Instructions for Authors.
\bibliography{hollister}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.