{"id":34257890,"url":"https://github.com/ropensci/maptools","last_synced_at":"2025-12-16T14:51:43.481Z","repository":{"id":23098663,"uuid":"26452768","full_name":"ropensci/maptools","owner":"ropensci","description":"CRAN Task View for mapping tools","archived":false,"fork":false,"pushed_at":"2016-04-04T17:58:35.000Z","size":98,"stargazers_count":42,"open_issues_count":2,"forks_count":12,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-12T08:41:24.985Z","etag":null,"topics":["task-view"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ropensci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-10T19:51:56.000Z","updated_at":"2024-05-07T16:48:21.000Z","dependencies_parsed_at":"2022-08-21T11:40:09.812Z","dependency_job_id":null,"html_url":"https://github.com/ropensci/maptools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ropensci/maptools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmaptools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmaptools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmaptools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmaptools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/maptools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmaptools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27766553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["task-view"],"created_at":"2025-12-16T14:51:42.873Z","updated_at":"2025-12-16T14:51:43.471Z","avatar_url":"https://github.com/ropensci.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"CRAN Task View: Mapping tools and services\n------------------------------------------\n\n  ------------------------------------ ------------------------------------\n  **Maintainer:**                      **Contact:**\n  Jeff Hollister, Scott Chamberlain,   hollister.jeff at epa.gov\n  Karthik Ram, Hadley Wickham, Ben     \n  Marwick, Cory Nissen                 \n  ------------------------------------ ------------------------------------\n\nThis task view contains information about mapping and visualizing\nspatial data in R. The base version of R does not ship with many tools\nfor mapping spatial data. Thankfully, there are an increasingly large\nnumber of tools for doing so, both with just R or javascript libraries.\nA list of available packages and functions is presented below, grouped\nby the type of activity. If you have any comments or suggestions for\nadditions or improvements for this taskview, go to Github and [submit an\nissue](https://github.com/ropensci/maptools/issues), or [make some\nchanges](https://github.com/ropensci/maptools/CONTRIBUTING.md) and\n[submit a pull request](https://github.com/ropensci/maptools/pulls). If\nyou can't contribute on Github, [send Jeff an\nemail](mailto:hollister.jeff@epa.gov). If you have an issue with one of\nthe packages discussed below, please contact the maintainer of that\npackage. This task view is focused on mapping spatial data and less so\non the foundations of working with spatial data in R. That material is\ncovered in detail in the [Spatial Task\nView](Spatial%20Task%20View.html). There is some overlap between the two\ntask views, but an effort has been made to reduce redundancy so that\nthese task views compliment one another.\n\nMapping tools in R\n------------------\n\n### Visualization\n\n-   [cartodb](https://github.com/Vizzuality/cartodb-r): CartoDB R\n    client. Not on CRAN, and hasn't been active for a while. [Source on\n    Github](https://github.com/Vizzuality/cartodb-r)\n-   [cartographer](https://github.com/ropensci/cartographer):\n    Interactive maps in R using\n    [d3-carto-map](https://github.com/emeeks/d3-carto-map). [Source on\n    Github](https://github.com/ropensci/cartographer)\n-   [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html):\n    Visualization of spatial data and models on top of Google Maps,\n    OpenStreetMaps, Stamen Maps, or CloudMade Maps using ggplot2.\n    [Source on Github](https://github.com/dkahle/ggmap)\n-   [leaflet](http://cran.r-project.org/web/packages/leaflet/index.html):\n    Client for the JavaScript library Leaflet.js. Uses\n    [htmlwidgets](http://cran.r-project.org/web/packages/htmlwidgets/index.html)\n    to provide structure for output. Integrated with R Console, RStudio,\n    and R Markdown v 2. Can include interactive maps with markdown\n    documents as well as with\n    [shiny](http://cran.r-project.org/web/packages/shiny/index.html)\n    apps. [Source on Github](https://github.com/rstudio/leaflet)\n-   [leafletR](http://cran.r-project.org/web/packages/leafletR/index.html):\n    Another client for the JavaScript library Leaflet.js. Basic mapping\n    functionality to combine vector data and online map tiles from\n    different sources. [Source on\n    Github](https://github.com/chgrl/leafletR)\n-   [mapview](http://cran.r-project.org/web/packages/mapview/index.html):\n    This package provides wrappers to the\n    [leaflet](http://cran.r-project.org/web/packages/leaflet/index.html)\n    package that simplifies the creation of maps. Stated purpose of the\n    package is to facilitate interactive viewing of spatial data in R.\n    [Source on\n    Github.](https://github.com/environmentalinformatics-marburg/mapview)\n-   [micromap](http://cran.r-project.org/web/packages/micromap/index.html):\n    This group of functions simplifies the creation of linked micromap\n    plots, and uses ggplot2 plotting framework. [Source on\n    Github.](https://github.com/USEPA/R-micromap-package-development)\n-   [OpenStreetMap](http://cran.r-project.org/web/packages/OpenStreetMap/index.html):\n    An R client for fetching raster images via the Open Street Maps API.\n-   [plotGoogleMaps](http://cran.r-project.org/web/packages/plotGoogleMaps/index.html):\n    This package provides a interactive plot device for handling the\n    geographic data for web browsers. It is designed for the automatic\n    creation of web maps as a combination of users' data and Google Maps\n    layers.\n-   [quickmpar](http://cran.r-project.org/web/packages/quickmpar/index.html):\n    Quick visualization of\n    [sp](http://cran.r-project.org/web/packages/sp/index.html) and\n    [raster](http://cran.r-project.org/web/packages/raster/index.html)\n    objects. Provides basic interactivity including zooming and panning\n    as well as identifying features. [Source on\n    Github](https://github.com/jhollist/quickmapr)\n-   [rasterVis](http://cran.r-project.org/web/packages/rasterVis/index.html):\n    Package for enhanced visualization of raster data. [Source on\n    Github](https://github.com/oscarperpinan/rastervis/)\n-   [Rgooglemaps](http://cran.r-project.org/web/packages/Rgooglemaps/index.html):\n    Query Google static maps, and use the map as a background image to\n    overlay plots within R. [Source on\n    Github](https://github.com/markusloecher/RgoogleMaps)\n-   [rMaps](https://github.com/ramnathv/rMaps): A general purpose\n    wrapper around main Javascript mapping libraries, including\n    [Leaflet](http://leafletjs.com/),\n    [Datamaps](http://datamaps.github.io/), and\n    [Crosslet](http://sztanko.github.io/crosslet/). [Source on\n    Github](https://github.com/ramnathv/rMaps)\n-   [sp](http://cran.r-project.org/web/packages/sp/index.html): Core\n    spatial package in R with basic spatial data manipulation methods.\n    Most spatial analysis packages reuse the classes and methods\n    provided by\n    [sp](http://cran.r-project.org/whttp://cran.r-project.org/web/packages/sp/index.html).\n    Plotting capability in\n    [sp](http://cran.r-project.org/whttp://cran.r-project.org/web/packages/sp/index.html)\n    is provided through plot methods. More advanced plotting based on\n    [lattice](http://cran.r-project.org/web/packages/lattice/index.html).\n    [Source on GitHub](https://github.com/edzer/sp/)\n-   [tmap](http://cran.r-project.org/web/packages/tmap/index.html):\n    Package provides an approach to build thematic maps (e.g.\n    chloropleth or bubble maps). Utilizes a grammar of graphics syntax.\n    [Source on GitHub](https://github.com/mtennekes/tmap)\n\n### Projecting Data\n\nCoordinates for spatial data can come in many different flavors with\ndifferent units, datum, projections, and more. Many of the tools will\nvisualize your data regardless of the native coordinate reference\nsystem; however, most (all?) of the javascript libraries assume some\nflavor of latitude-longitude, thus if your data are projected they need\nto be transformed back to geographic coordinates prior to mapping. For\nmost mapping and visualization efforts unprojected data (often displayed\nin Web Mercator/EPSG::3857) is fine; however, if accurate area, length,\nor distance measurements are required through interacting with the map,\nthen projections need to be considered. A discussion of projections and\ncoordinate systems is beyond the scope of this task view. To learn more\na good starting place is [NCEAS' Overview of Coordinate Reference\nSystems in\nR](https://www.nceas.ucsb.edu/\\~frazier/RSpatialGuides/OverviewCoordinateReferenceSystems.pdf).\nThis more general discussion of projection from the\n[USGS](http://egsc.usgs.gov/isb//pubs/MapProjections/projections.html)\nis also good.\n\nOnce you know that you need to transform you data there are several\noptions:\n\n-   [sp](http://cran.r-project.org/web/packages/sp/index.html): The\n    function `spTransform` (and methods in\n    [rgdal](http://cran.r-project.org/web/packages/rgdal/index.html)) is\n    the workhorse function for spatial transformations of vector data\n    and it uses [PROJ.4](http://trac.osgeo.org/proj/) arguments to\n    specify the transformations. Accepted inputs are provided by the\n    spTransform methods in\n    [rgdal](http://cran.r-project.org/web/packages/rgdal/index.html).\n    [Source for `sp` on GitHub](https://github.com/edzer/sp/). [Source\n    for `rgdal` on\n    R-Forge](https://r-forge.r-project.org/projects/rgdal/).\n-   [mapproj](http://cran.r-project.org/web/packages/mapproj/index.html):\n    This package provides a function to convert two vectors representing\n    longitude (x) and latitude (y) to projected coordinates.\n-   [PBSmapping](http://cran.r-project.org/web/packages/PBSmapping/index.html):\n    The function `convUL` will transform coordinates between Universal\n    Transverse Mercator (UTM) and longitude-latitude. A data frame with\n    a `projection` attribute is required input. [Source on Google\n    Code](http://code.google.com/p/pbs-software/)\n\n### Geocoding\n\nGeocoding is the process of converting address or place name information\ninto geographic coordinates. Most of these have somewhat restricted\nTerms of Service(TOS). Be sure to read those carefully prior to use.\nLinks for the TOS are provided.\n\n-   [geocodeHERE](http://cran.r-project.org/web/packages/geocodeHERE/index.html):\n    Client for Nokia's [HERE geocoding\n    API](https://developer.here.com/geocoder). [Source on\n    GitHub](https://github.com/corynissen/geocodeHERE/)\n-   [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html):\n    The function `geocode` in\n    [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html)\n    uses the [Google Geocoding\n    API](https://developers.google.com/maps/documentation/geocoding/?csw=1).\n    [Source on Github](https://github.com/dkahle/ggmap)\n-   [rydn](https://github.com/trestletech/rydn): Client for the Yahoo!\n    Developers Network [BOSS PlaceFinder\n    API](https://developer.yahoo.com/boss/). [Source on\n    Github](https://github.com/trestletech/rydn)\n\n### Map Data\n\nThere are \\*many\\* possible sources and formats of data to use as base\nlayers, so this list will most certainly be incomplete. Details for\nreading and writing most types of spatial data are already included in\nthe [Analysis of Spatial Data Task\nView](Analysis%20of%20Spatial%20Data%20Task%20View.html), thus this list\nwill focus on additional sources or features not discussed in that task\nview.\n\n-   [geojsonio](http://cran.r-project.org/web/packages/geojsonio/index.html):\n    Provides utility for working with geojson data in R. Includes\n    functions to convert sp objects, lists, and character to geojson\n    format.\n-   [geonames](http://cran.r-project.org/web/packages/geonames/index.html):\n    functions for working with [geonames](http://www.geonames.org/), a\n    geographical database that covers all countries and contains over\n    eight million place names\n-   [maps](http://cran.r-project.org/web/packages/maps/index.html):\n    Collection of coarse scaled for the US, some European countries, and\n    a world map. Stored as \\`map\\` objects and various other geographic\n    datasets. Location information in decimal degrees. Needs conversion\n    to work with visualization from\n    [sp](http://cran.r-project.org/web/packages/sp/index.html),\n    [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html),\n    etc. Code for projections and additional maps in packages\n    [mapproj](http://cran.r-project.org/web/packages/mapproj/index.html)\n    [mapdata](http://cran.r-project.org/web/packages/mapdata/index.html).\n-   [openadds](https://github.com/sckott/openadds): An R client for\n    [Openaddresses](http://openaddresses.io). The Openaddresses data\n    comes in a variety of formats and this package provides common\n    interface to simplify working with it in R. [Source on\n    Github](https://github.com/sckott/openadds)\n-   [osmar](http://cran.r-project.org/web/packages/osmar/index.html):\n    Package for interacting with the Open Street Map API in R. Functions\n    for converting an open street map object into\n    [sp](http://cran.r-project.org/web/packages/sp/index.html) or\n    [igraph](http://cran.r-project.org/web/packages/igraph/index.html)\n    objects. [Source on\n    R-Forge.](https://r-forge.r-project.org/projects/osmar/)\n-   [prism](https://github.com/ropensci/prism): Accesses climate data\n    from [PRSIM](http://www.prism.oregonstate.edu/). Also provides some\n    basic plotting and mapping functions.\n-   [rworldmap](http://cran.r-project.org/web/packages/rworldmap/index.html):\n    Set of functions to create country based world maps. Allows for\n    joining of user specified data and can display chloropleth, gridded,\n    bubble plot, bar charts, or pie charts. Data stored as \\`sp\\`\n    objects. [Source on Google\n    Code.](https://code.google.com/p/rworld/downloads/list)\n-   [tigris](https://github.com/walkerke/tigris): Access US Census TIGER\n    shapefiles directly in R. This package is currently in active\n    development.\n-   [USAboundaries](http://cran.r-project.org/web/packages/USAboundaries/index.html):\n    provides spatial objects with the boundaries of states or counties\n    in the United States of America from 1629 to 2000. It provides data\n    from the Atlas of Historical County Boundaries.\n-   [UScensus2010](http://cran.r-project.org/web/packages/UScensus2010/index.html):\n    Functions to facilitate accessing data from the 2010 US Census using\n    a suite of packages. Includes spatial data for census geographies\n    (e.g. tracts, blocks, block groups, etc.). This packages is the\n    third in a series of related package suites:\n    [UScensus1990blkgrp](http://cran.r-project.org/web/packages/UScensus1990blkgrp/index.html)\n    and\n    [UScensus2000](http://cran.r-project.org/web/packages/UScensus2000/index.html).\n\n### CRAN packages:\n\n-   [geocodeHERE](http://cran.r-project.org/web/packages/geocodeHERE/index.html)\n-   [geojsonio](http://cran.r-project.org/web/packages/geojsonio/index.html)\n-   [geonames](http://cran.r-project.org/web/packages/geonames/index.html)\n-   [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html)\n-   [htmlwidgets](http://cran.r-project.org/web/packages/htmlwidgets/index.html)\n-   [igraph](http://cran.r-project.org/web/packages/igraph/index.html)\n-   [lattice](http://cran.r-project.org/web/packages/lattice/index.html)\n-   [leaflet](http://cran.r-project.org/web/packages/leaflet/index.html)\n-   [leafletR](http://cran.r-project.org/web/packages/leafletR/index.html)\n-   [mapdata](http://cran.r-project.org/web/packages/mapdata/index.html)\n-   [mapproj](http://cran.r-project.org/web/packages/mapproj/index.html)\n-   [maps](http://cran.r-project.org/web/packages/maps/index.html)\n-   [mapview](http://cran.r-project.org/web/packages/mapview/index.html)\n-   [micromap](http://cran.r-project.org/web/packages/micromap/index.html)\n-   [OpenStreetMap](http://cran.r-project.org/web/packages/OpenStreetMap/index.html)\n-   [osmar](http://cran.r-project.org/web/packages/osmar/index.html)\n-   [PBSmapping](http://cran.r-project.org/web/packages/PBSmapping/index.html)\n-   [plotGoogleMaps](http://cran.r-project.org/web/packages/plotGoogleMaps/index.html)\n-   [quickmpar](http://cran.r-project.org/web/packages/quickmpar/index.html)\n-   [raster](http://cran.r-project.org/web/packages/raster/index.html)\n-   [rasterVis](http://cran.r-project.org/web/packages/rasterVis/index.html)\n-   [rgdal](http://cran.r-project.org/web/packages/rgdal/index.html)\n-   [Rgooglemaps](http://cran.r-project.org/web/packages/Rgooglemaps/index.html)\n-   [rworldmap](http://cran.r-project.org/web/packages/rworldmap/index.html)\n-   [shiny](http://cran.r-project.org/web/packages/shiny/index.html)\n-   [sp](http://cran.r-project.org/web/packages/sp/index.html) (core)\n-   [tmap](http://cran.r-project.org/web/packages/tmap/index.html)\n-   [USAboundaries](http://cran.r-project.org/web/packages/USAboundaries/index.html)\n-   [UScensus1990blkgrp](http://cran.r-project.org/web/packages/UScensus1990blkgrp/index.html)\n-   [UScensus2000](http://cran.r-project.org/web/packages/UScensus2000/index.html)\n-   [UScensus2010](http://cran.r-project.org/web/packages/UScensus2010/index.html)\n\n### Related links:\n\n-   [Analysis of Spatial Data Task\n    View](http://cran.r-project.org/web/views/Spatial.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fmaptools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropensci%2Fmaptools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fmaptools/lists"}