Data Manipulation Verbs for the Spatial Classes

Methods for 'dplyr' verbs for 'sp' 'Spatial' classes. The basic verbs that modify data attributes, remove or re-arrange rows are supported and provide complete 'Spatial' analogues of the input data. The group by and summarize workflow returns a non-topological spatial union. There is limited support for joins, with left and inner to copy attributes from another table.

spdplyr =======

spdplyr provides methods for the dplyr verbs for the Spatial classes in the sp package.

Install from CRAN:


The development version of spdplyr can be installed directly from Github:


dplyr verbs for Spatial

Apply dplyr verbs to the attribute data of sp objects with dplyr verbs.

See ?dplyr-Spatial' for supported verbs.

Most of it is easy, simply applying the analogous operation of the verb to the Spatial*DataFrame and subsetting/re-organizing as necessary. Some operations use the spbabel::sptable approach which provides a loss-less way to do what ggplot2::fortify does and its reverse.


NOTE: joins aren't really thought through or developed properly, send me your feedback / ideas / help!


spdplyr 0.1.2

  • updated to use sp rather than spFromTable in line with spbabel

  • modified the print/show details for Spatial

  • removed some leftover references from original source

spdplyr 0.1.1

  • first working version

  • forked from spbabel 0b95adb3, previous news is from spbabel originally

  • various improvements provided by jlegewie, removed transmute_ (not needed), improved filter_ and select_, added left_join and inner_join, see

  • added group_by and complementary summarize capability for Spatial

  • set data.frame and tbl and tbl_df as S4 compatible

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.2 by Michael D. Sumner, 7 months ago

Report a bug at

Browse source code at

Authors: Michael D. Sumner [aut, cre], Joscha Legewie [ctb]

Documentation:   PDF Manual  

GPL-3 license

Imports lazyeval, methods, spbabel, tibble

Depends on dplyr, sp

Suggests testthat, maptools, raster, rmarkdown, knitr, covr

See at CRAN