lawn: An R client for the Turf Javascript Library for Geospatial Analysis


lawn is an R package to provide access to the geospatial analysis capabilities in the Turf javascript library (R Core Team 2016; Herlocker 2016). Turf expects data in GeoJSON format. Given that many datasets are now available natively in GeoJSON providing an easier method for conducting geospatial analyses on these datasets in R is desired. Additionally, many existing packages (e.g. sp and rgeos) do provide similar analysis capabilities; however, they require data be converted to sp objects and also have external dependencies (e.g. gdal and geos) that can be challenging to maintain on some systems (Roger S Bivand, Pebesma, and Gómez-Rubio 2013; Roger S. Bivand and Rundel 2016; GDAL Development Team 2015; Team 2016). To address these challenges and facilitate geospatial analysis of GeoJSON formatted data, we developed the lawn package.


Bivand, Roger S, Edzer Pebesma, and Virgilio Gómez-Rubio. 2013. Applied Spatial Data Analysis with R. 2nd ed. Springer.

Bivand, Roger S., and C. Rundel. 2016. Rgeos: Interface to Geometry Engine - Open Source (Geos).

GDAL Development Team. 2015. GDAL - Geospatial Data Abstraction Library, Version 1.11.3. Open Source Geospatial Foundation.

Herlocker, Morgan. 2016. “Turf: Advanced Geospatial Analysis for Browsers and Node.”

R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.

Team, GEOS Development. 2016. GEOS - Geometry Engine, Open Source. Open Source Geospatial Foundation.