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 work flow 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:

install.packages("spdplyr")

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

devtools::install_github("mdsumner/spdplyr")

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.

Issues

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

News

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 https://github.com/mdsumner/spbabel/pull/10

  • 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.

install.packages("spdplyr")

0.1.3 by Michael D. Sumner, 6 months ago


https://github.com/mdsumner/spdplyr


Report a bug at https://github.com/mdsumner/spdplyr/issues


Browse source code at https://github.com/cran/spdplyr


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


Documentation:   PDF Manual  


GPL-3 license


Imports lazyeval, methods, rlang, spbabel, tibble, utils

Depends on dplyr, sp

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


Suggested by tabularaster.


See at CRAN