Lesson 6 - R ArcGIS Bridge Overview and Demo
22 April 2018
If don’t already have ArcGIS, you can get a free 21 day trial here.
Instructional videos on installing the R-ArcGIS bridge.
Using R and ArcGIS together: The most effective way to leverage the combined value of ArcGIS and R is to use the R-ArcGIS bridge, an open source project providing a seamless two-way data bridge between R and ArcGIS. The bridge also allows R scripts to be run from ArcGIS as geoprocessing tools. The R-ArcGIS bridge works with versions beginning at R 3.2.2 , ArcMap 10.3.1, ArcGIS Pro 1.1, or later. The bridge supports feature, raster, and tabular data from ArcGIS. This can be data on your local disk as well as URLs to feature services and image services. The bridge supports data objects of the most common spatial packages: sp, sf, and raster, along with R data frame objects. The usage is very similar to standard R syntax.
Open ArcGIS data:
gis_data <- arc.open(path = ‘c:/data/seagrass.shp’)
Load dataset to R data frame:
R_data <- arc.select(gis_data, fields, SQL, spatial ref)
Working with spatial data and you need the shape (geometry) information:
ozone.sp.df <- arc.data2sp(ozone.dataframe)
ozone.dataframe <- arc.sp2data(ozone.sp.df)
Results of analysis can be written with ArcGIS capabilities as well:
arc.write(path = tempfile("ca_new", fileext=".shp"), data = ozone.dataframe)
Installation instructions
Free Online Training & Tutorials
- Analyze Crime Using Statistics and the R-ArcGIS Bridge: A guided learn lesson that covers all the basic functionality of the bridge along with how to perform an analysis integrating R and ArcGIS.
- Using the R-ArcGIS Bridge: A guided web course that covers all the basic functionality of the bridge.
- Integrating R Scripts into ArcGIS Geoprocessing Tools: A guided web course on creating an ArcGIS Geoprocessing tool which calls an R script.
- New online tutorial in early May on use of raster data
Resources
- arcgisbinding package vignette: The package vignette provides a detailed description of each function in the arcgisbinding R package. It also includes a template for creating script tools.
- Sample script tools: Sample script tools to be used as working examples to create new script tools from.
Help
- R-ArcGIS GeoNet: The main place to go for everything about the R-ArcGIS project and community, including discussion forum, training materials, videos, blogs, etc. Users can ask questions in the forum to other users and to the R-ArcGIS project team.
- R-ArcGIS GitHub: For suspected bugs and install issues, use the ‘Issues’ section of the r-bridge-install page. We also have a section where R-ArcGIS bridge community members can share script tools they have created to help other users. Contact us if you would like to add or link in your project here.