CRAN Task View: Mapping tools and services
Jeff Hollister, Scott Chamberlain, hollister.jeff at epa.gov
Karthik Ram, Hadley Wickham, Ben
Marwick, Cory Nissen
Mapping tools in R
- cartodb: CartoDB R client. Not on CRAN, and hasn't been active for a while. Source on Github
- cartographer: Interactive maps in R using d3-carto-map. Source on Github
- ggmap: Visualization of spatial data and models on top of Google Maps, OpenStreetMaps, Stamen Maps, or CloudMade Maps using ggplot2. Source on Github
- mapview: This package provides wrappers to the leaflet package that simplifies the creation of maps. Stated purpose of the package is to facilitate interactive viewing of spatial data in R. Source on Github.
- micromap: This group of functions simplifies the creation of linked micromap plots, and uses ggplot2 plotting framework. Source on Github.
- OpenStreetMap: An R client for fetching raster images via the Open Street Maps API.
- plotGoogleMaps: This package provides a interactive plot device for handling the geographic data for web browsers. It is designed for the automatic creation of web maps as a combination of users' data and Google Maps layers.
- quickmpar: Quick visualization of sp and raster objects. Provides basic interactivity including zooming and panning as well as identifying features. Source on Github
- rasterVis: Package for enhanced visualization of raster data. Source on Github
- Rgooglemaps: Query Google static maps, and use the map as a background image to overlay plots within R. Source on Github
- sp: Core spatial package in R with basic spatial data manipulation methods. Most spatial analysis packages reuse the classes and methods provided by sp. Plotting capability in sp is provided through plot methods. More advanced plotting based on lattice. Source on GitHub
- tmap: Package provides an approach to build thematic maps (e.g. chloropleth or bubble maps). Utilizes a grammar of graphics syntax. Source on GitHub
Once you know that you need to transform you data there are several options:
- sp: The
spTransform(and methods in rgdal) is the workhorse function for spatial transformations of vector data and it uses PROJ.4 arguments to specify the transformations. Accepted inputs are provided by the spTransform methods in rgdal. Source for
spon GitHub. Source for
- mapproj: This package provides a function to convert two vectors representing longitude (x) and latitude (y) to projected coordinates.
convULwill transform coordinates between Universal Transverse Mercator (UTM) and longitude-latitude. A data frame with a
projectionattribute is required input. Source on Google Code
Geocoding is the process of converting address or place name information into geographic coordinates. Most of these have somewhat restricted Terms of Service(TOS). Be sure to read those carefully prior to use. Links for the TOS are provided.
- geocodeHERE: Client for Nokia's HERE geocoding API. Source on GitHub
geocodein ggmap uses the Google Geocoding API. Source on Github
- rydn: Client for the Yahoo! Developers Network BOSS PlaceFinder API. Source on Github
There are *many* possible sources and formats of data to use as base layers, so this list will most certainly be incomplete. Details for reading and writing most types of spatial data are already included in the Analysis of Spatial Data Task View, thus this list will focus on additional sources or features not discussed in that task view.
- geojsonio: Provides utility for working with geojson data in R. Includes functions to convert sp objects, lists, and character to geojson format.
- geonames: functions for working with geonames, a geographical database that covers all countries and contains over eight million place names
- maps: Collection of coarse scaled for the US, some European countries, and a world map. Stored as `map` objects and various other geographic datasets. Location information in decimal degrees. Needs conversion to work with visualization from sp, ggmap, etc. Code for projections and additional maps in packages mapproj mapdata.
- openadds: An R client for Openaddresses. The Openaddresses data comes in a variety of formats and this package provides common interface to simplify working with it in R. Source on Github
- osmar: Package for interacting with the Open Street Map API in R. Functions for converting an open street map object into sp or igraph objects. Source on R-Forge.
- prism: Accesses climate data from PRSIM. Also provides some basic plotting and mapping functions.
- rworldmap: Set of functions to create country based world maps. Allows for joining of user specified data and can display chloropleth, gridded, bubble plot, bar charts, or pie charts. Data stored as `sp` objects. Source on Google Code.
- tigris: Access US Census TIGER shapefiles directly in R. This package is currently in active development.
- USAboundaries: provides spatial objects with the boundaries of states or counties in the United States of America from 1629 to 2000. It provides data from the Atlas of Historical County Boundaries.
- UScensus2010: Functions to facilitate accessing data from the 2010 US Census using a suite of packages. Includes spatial data for census geographies (e.g. tracts, blocks, block groups, etc.). This packages is the third in a series of related package suites: UScensus1990blkgrp and UScensus2000.
- sp (core)