{"id":2270082,"date":"2024-03-11T08:00:07","date_gmt":"2024-03-11T15:00:07","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2270082"},"modified":"2025-07-22T12:05:50","modified_gmt":"2025-07-22T19:05:50","slug":"announcing-arcgis-r-package","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","title":{"rendered":"Announcing {arcgis}, an R package for ArcGIS Location Services"},"author":340172,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341,37101,738191],"tags":[39801,30241,31611,23391,25581],"industry":[],"product":[36571,761642,36551,36561,36861,36601],"class_list":["post-2270082","blog","type-blog","status-publish","format-standard","hentry","category-analytics","category-announcements","category-developers","tag-arcgis-developer-community","tag-r","tag-r-arcgis-bridge","tag-spatial-analytics","tag-spatial-statistics","product-arcgis-enterprise","product-platform","product-arcgis-online","product-arcgis-pro","product-api-rest","product-developers"],"acf":{"authors":[{"ID":340172,"user_firstname":"Martha","user_lastname":"Bass","nickname":"Martha Bass","user_nicename":"mbass","display_name":"Martha Bass","user_email":"mbass@esri.com","user_url":"","user_registered":"2023-06-02 14:19:01","user_description":"Martha Bass is a Product Engineer on the Spatial Statistics team at Esri.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"},{"ID":154341,"user_firstname":"Nicholas","user_lastname":"Giner","nickname":"Nick Giner","user_nicename":"nginer","display_name":"Nicholas Giner","user_email":"NGiner@esri.com","user_url":"","user_registered":"2021-01-07 14:31:25","user_description":"Nick Giner is a Product Manager for Spatial Analysis and Data Science.  Prior to joining Esri in 2014, he completed Bachelor\u2019s and PhD degrees in Geography from Penn State University and Clark University, respectively. In his spare time, he likes to play guitar, golf, cook, cut the grass, and read\/watch shows about history.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/headshot-e1610030307989-213x200.jpeg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"},{"ID":354322,"user_firstname":"Josiah","user_lastname":"Parry","nickname":"Josiah Parry","user_nicename":"jparry","display_name":"Josiah Parry","user_email":"jparry@esri.com","user_url":"https:\/\/josiahparry.com","user_registered":"2024-03-06 19:22:54","user_description":"Josiah Parry is a Senior Product Engineer in Spatial Analytics and Data Science and helps lead the R-ArcGIS Bridge project.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/26cadf4c99dadd093f2ea5675170ce5fad8a67803ac882b0a71018b47287be7b?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/26cadf4c99dadd093f2ea5675170ce5fad8a67803ac882b0a71018b47287be7b?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"short_description":"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services.","flexible_content":[{"acf_fc_layout":"content","content":"<p>The R-ArcGIS Bridge team is excited to announce the release of <code>{arcgis}<\/code>, an open-source meta-package that facilitates interacting with ArcGIS location services from R. Now, ArcGIS users can access, modify, and publish web-based data from the comfort of R and their development environment of choice.<\/p>\n<p>This new addition to the <a href=\"https:\/\/developers.arcgis.com\/r-bridge\/\">R-ArcGIS Bridge<\/a> complements the existing <code>{arcgisbinding}<\/code> package &#8211; which &#8220;bridges&#8221; between R and ArcGIS Pro &#8211; by providing new ways for users to combine the powers of data science and statistical R packages with ArcGIS analytical, visualization, and data hosting capabilities.<\/p>\n<h2><code>{arcgis}<\/code> overview<\/h2>\n<p>The <code><a href=\"https:\/\/cran.r-project.org\/package=arcgis\">{arcgis}<\/a><\/code> meta-package provides a single point of access for users to install and load the associated packages, including:<\/p>\n<ul>\n<li><a href=\"https:\/\/CRAN.R-project.org\/package=arcgisutils\"><code>{arcgisutils}<\/code><\/a>: developer-oriented utilities powering interactions between R and ArcGIS, including authorization and data conversion.<\/li>\n<li><a href=\"https:\/\/cran.r-project.org\/package=arcgislayers\"><code>{arcgislayers}<\/code><\/a>: functions for reading, writing, publishing, and managing data in ArcGIS Online, ArcGIS Enterprise, and ArcGIS Platform.<\/li>\n<\/ul>\n<p>Together, these packages enable data scientists, analysts, and developers to integrate the capabilities of R and ArcGIS for workflows and applications that use web-based services. Behind the scenes, <code>{arcgis}<\/code> achieves this by interacting with <a href=\"https:\/\/developers.arcgis.com\/rest\/\">ArcGIS REST API<\/a> endpoints.<\/p>\n<p>With <code>{arcgis}<\/code>, users can:<\/p>\n<ul>\n<li><a href=\"http:\/\/developers.arcgis.com\/r-bridge\/authentication\/\">Authorize with ArcGIS Online, ArcGIS Enterprise, and ArcGIS Platform<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/r-bridge\/layers\/read-layers\/\">Read data from ArcGIS services<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/r-bridge\/layers\/publishing\/\">Publish data to ArcGIS services<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/r-bridge\/editing\/editing-overview\/\">Edit features in ArcGIS services<\/a><\/li>\n<li><a href=\"https:\/\/developers.arcgis.com\/r-bridge\/editing\/overwrite-features\/\">Overwrite features in ArcGIS services<\/a><\/li>\n<li>And more!<\/li>\n<\/ul>\n<p>Let&#8217;s take a look at a simple example of how <code>{arcgis}<\/code> can serve as a bridge between R and ArcGIS location services:<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Get started by reading data from a public ArcGIS Online feature service into R<\/h2>\n<p>With <code>{arcgis}<\/code>, you can read data from ArcGIS web services including feature services, image services, and map services. In this simple example, you can use R to access attributes and geometries from a public ArcGIS Online feature service.<\/p>\n<p>First, find an item of interest from the <a href=\"https:\/\/livingatlas.arcgis.com\/en\/browse\/\">ArcGIS Living Atlas of the World<\/a>. In this case, let&#8217;s use <a href=\"https:\/\/www.arcgis.com\/home\/item.html?id=0086120c2bda4f929a931147a4c6f542\">National Park Service Trails<\/a>. You will need the URL in the bottom right corner of the page:<\/p>\n<p><a href=\"https:\/\/services2.arcgis.com\/FiaPA4ga0iQKduv3\/arcgis\/rest\/services\/National_Park_Service_Trails\/FeatureServer\">https:\/\/services2.arcgis.com\/FiaPA4ga0iQKduv3\/arcgis\/rest\/services\/National_Park_Service_Trails\/FeatureServer<\/a><\/p>\n<p>This URL is the REST endpoint for the National Park Service Trails FeatureServer. <code>{arcgis}<\/code> performs requests against such endpoints to return metadata, associated layers, and feature data.<\/p>\n<p>In your R development environment of choice, run the following code to install (if needed) and load the package:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275522,"id":2275522,"title":"Install and load the {arcgis} package","filename":"install-load-package.png","filesize":14553,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/install-load-package","alt":"install.packages('arcgis') library('arcgis')","author":"340172","description":"","caption":"","name":"install-load-package","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:12","modified":"2024-03-06 17:35:15","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":514,"height":159,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package-213x159.png","thumbnail-width":213,"thumbnail-height":159,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","medium-width":464,"medium-height":144,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","medium_large-width":514,"medium_large-height":159,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","large-width":514,"large-height":159,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","1536x1536-width":514,"1536x1536-height":159,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","2048x2048-width":514,"2048x2048-height":159,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","card_image-width":514,"card_image-height":159,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/install-load-package.png","wide_image-width":514,"wide_image-height":159}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Now assign the URL to an object, <code>furl<\/code>, and use <code>arc_open()<\/code> to retrieve the metadata for the National Park Service Trails FeatureServer:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275532,"id":2275532,"title":"arc_open","filename":"open-featureserver.png","filesize":22412,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/open-featureserver","alt":"arc_open()","author":"340172","description":"","caption":"","name":"open-featureserver","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:16","modified":"2024-03-06 17:36:06","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1446,"height":216,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","medium-width":464,"medium-height":69,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","medium_large-width":768,"medium_large-height":115,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","large-width":1446,"large-height":216,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","1536x1536-width":1446,"1536x1536-height":216,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","2048x2048-width":1446,"2048x2048-height":216,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver-826x123.png","card_image-width":826,"card_image-height":123,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/open-featureserver.png","wide_image-width":1446,"wide_image-height":216}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>This FeatureServer just contains one layer. You can access that layer by its ID (<code>0<\/code>) using <code>get_layer()<\/code>:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275542,"id":2275542,"title":"get_layer","filename":"get-layer.png","filesize":13472,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/get-layer","alt":"get_layer","author":"340172","description":"","caption":"","name":"get-layer","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:20","modified":"2024-03-06 17:36:20","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":505,"height":184,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer-213x184.png","thumbnail-width":213,"thumbnail-height":184,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","medium-width":464,"medium-height":169,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","medium_large-width":505,"medium_large-height":184,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","large-width":505,"large-height":184,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","1536x1536-width":505,"1536x1536-height":184,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","2048x2048-width":505,"2048x2048-height":184,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","card_image-width":505,"card_image-height":184,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/get-layer.png","wide_image-width":505,"wide_image-height":184}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The NPS_Trails FeatureLayer allows query operations, giving you access to the underlying data. Because it is a best practice to only read in the data you need, consider limiting the fields returned and\/or filtering using a SQL query.<\/p>\n<p>Start by viewing the fields and selecting a relevant subset:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275552,"id":2275552,"title":"list_fields","filename":"select-fields.png","filesize":42214,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/select-fields","alt":"list_fields","author":"340172","description":"","caption":"","name":"select-fields","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:24","modified":"2024-03-06 17:36:52","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":756,"height":397,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","medium-width":464,"medium-height":244,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","medium_large-width":756,"medium_large-height":397,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","large-width":756,"large-height":397,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","1536x1536-width":756,"1536x1536-height":397,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","2048x2048-width":756,"2048x2048-height":397,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","card_image-width":756,"card_image-height":397,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/select-fields.png","wide_image-width":756,"wide_image-height":397}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>You can also construct a SQL query to filter the park name field (<code>UNITNAME<\/code>) to only return trails in Zion National Park:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275562,"id":2275562,"title":"sql-query","filename":"sql-query.png","filesize":3861,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/sql-query","alt":"sqlquery","author":"340172","description":"","caption":"","name":"sql-query","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:27","modified":"2024-03-05 20:48:01","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":561,"height":46,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query-213x46.png","thumbnail-width":213,"thumbnail-height":46,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","medium-width":464,"medium-height":38,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","medium_large-width":561,"medium_large-height":46,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","large-width":561,"large-height":46,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","1536x1536-width":561,"1536x1536-height":46,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","2048x2048-width":561,"2048x2048-height":46,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","card_image-width":561,"card_image-height":46,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/sql-query.png","wide_image-width":561,"wide_image-height":46}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Now use these objects to load a subset of the feature layer&#8217;s trail data:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2275572,"id":2275572,"title":"arc_select","filename":"arc-select.png","filesize":84371,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/arc-select","alt":"arc_select","author":"340172","description":"","caption":"","name":"arc-select","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 20:46:31","modified":"2024-03-06 17:37:14","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":802,"height":693,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","medium-width":302,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","medium_large-width":768,"medium_large-height":664,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","large-width":802,"large-height":693,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","1536x1536-width":802,"1536x1536-height":693,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","2048x2048-width":802,"2048x2048-height":693,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select-538x465.png","card_image-width":538,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arc-select.png","wide_image-width":802,"wide_image-height":693}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>This returns an <code>sf<\/code> object containing the Zion National Park trail features. You can use <code>plot(ziontrails['TRLSURFACE'])<\/code> to view the spatial features, symbolized by trail surface type. From here you can conduct analysis, build apps, or create visualizations in R!<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2276012,"id":2276012,"title":"Zion Trails Plot","filename":"plot-ziontrails.png","filesize":10432,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\/plot-ziontrails","alt":"A plot of the Zion trail features symbolized by trail surface type","author":"340172","description":"","caption":"","name":"plot-ziontrails","status":"inherit","uploaded_to":2270082,"date":"2024-03-05 22:16:45","modified":"2024-03-05 22:17:15","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":680,"height":489,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","medium-width":363,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","medium_large-width":680,"medium_large-height":489,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","large-width":680,"large-height":489,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","1536x1536-width":680,"1536x1536-height":489,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","2048x2048-width":680,"2048x2048-height":489,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails-647x465.png","card_image-width":647,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/plot-ziontrails.png","wide_image-width":680,"wide_image-height":489}},"image_position":"left-center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"sidebar","content":"<p>Sample R Code<\/p>\n","image_reference":false,"layout":"code_snippet","image_reference_figure":"","snippet":"# install and load the package\r\ninstall.packages('arcgis')\r\nlibrary(arcgis)\r\n\r\n# create a `FeatureServer` object\r\nfurl &lt;- &quot;https:\/\/services2.arcgis.com\/FiaPA4ga0iQKduv3\/arcgis\/rest\/services\/National_Park_Service_Trails\/FeatureServer&quot;\r\nfs &lt;- arc_open(furl)\r\nfs\r\n\r\n# retrieve the feature layer of interest from the FeatureServer\r\nflayer &lt;- get_layer(fs, id = 0)\r\nflayer\r\n\r\n# view fields\r\nfields &lt;- list_fields(flayer)\r\nfields[, c(1:3)]\r\n\r\n# select fields to include in query\r\nselectfields &lt;- c(&quot;MAPLABEL&quot;, &quot;TRLSURFACE&quot;, &quot;TRLUSE&quot;)\r\n\r\n# build SQL query to limit data to Zion trails\r\nsqlquery &lt;- &quot;UNITNAME = &#039;Zion National Park&#039;&quot;\r\n\r\n# load a subset of the feature layer&#039;s data\r\nziontrails &lt;- arc_select(\r\n  flayer,\r\n  where = sqlquery,\r\n  fields = selectfields\r\n)\r\nziontrails\r\n\r\n# plot sf object\r\nplot(ziontrails[&quot;TRLSURFACE&quot;])","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false}],"related_articles":[{"ID":2269132,"post_author":"340172","post_date":"2024-03-06 12:30:45","post_date_gmt":"2024-03-06 20:30:45","post_content":"","post_title":"R-ArcGIS Bridge at the 2024 Esri Developer Summit","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"r-arcgis-bridge-at-the-2024-esri-developer-summit","to_ping":"","pinged":"","post_modified":"2025-08-22 17:12:07","post_modified_gmt":"2025-08-23 00:12:07","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2269132","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arcgis-hex-c1.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arcgis-R-package-banner.jpg","show_article_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Announcing {arcgis}, an R package for ArcGIS Location Services<\/title>\n<meta name=\"description\" content=\"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Announcing {arcgis}, an R package for ArcGIS Location Services\" \/>\n<meta property=\"og:description\" content=\"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-22T19:05:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\"},\"author\":{\"name\":\"Martha Bass\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/c53191f40f02bfb63b6f0107fceee0ff\"},\"headline\":\"Announcing {arcgis}, an R package for ArcGIS Location Services\",\"datePublished\":\"2024-03-11T15:00:07+00:00\",\"dateModified\":\"2025-07-22T19:05:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\"},\"wordCount\":9,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS Developer Community\",\"r\",\"R-ArcGIS Bridge\",\"spatial analytics\",\"spatial statistics\"],\"articleSection\":[\"Analytics\",\"Announcements\",\"Developers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\",\"name\":\"Announcing {arcgis}, an R package for ArcGIS Location Services\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2024-03-11T15:00:07+00:00\",\"dateModified\":\"2025-07-22T19:05:50+00:00\",\"description\":\"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Announcing {arcgis}, an R package for ArcGIS Location Services\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/c53191f40f02bfb63b6f0107fceee0ff\",\"name\":\"Martha Bass\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=96&d=blank&r=g\",\"caption\":\"Martha Bass\"},\"description\":\"Martha Bass is a Product Engineer on the Spatial Statistics team at Esri.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/marthabass\/\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/mbass\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Announcing {arcgis}, an R package for ArcGIS Location Services","description":"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","og_locale":"en_US","og_type":"article","og_title":"Announcing {arcgis}, an R package for ArcGIS Location Services","og_description":"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-07-22T19:05:50+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package"},"author":{"name":"Martha Bass","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/c53191f40f02bfb63b6f0107fceee0ff"},"headline":"Announcing {arcgis}, an R package for ArcGIS Location Services","datePublished":"2024-03-11T15:00:07+00:00","dateModified":"2025-07-22T19:05:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package"},"wordCount":9,"commentCount":1,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS Developer Community","r","R-ArcGIS Bridge","spatial analytics","spatial statistics"],"articleSection":["Analytics","Announcements","Developers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","name":"Announcing {arcgis}, an R package for ArcGIS Location Services","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2024-03-11T15:00:07+00:00","dateModified":"2025-07-22T19:05:50+00:00","description":"A new R package created by the R-ArcGIS Bridge team enables integration with ArcGIS location services, enhancing their combined powers.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Announcing {arcgis}, an R package for ArcGIS Location Services"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/c53191f40f02bfb63b6f0107fceee0ff","name":"Martha Bass","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f1833d3ccca7aa1c13005e3621a85247b3f9947ee6cbcc857a68e0a6c24546b0?s=96&d=blank&r=g","caption":"Martha Bass"},"description":"Martha Bass is a Product Engineer on the Spatial Statistics team at Esri.","sameAs":["https:\/\/www.linkedin.com\/in\/marthabass\/"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/mbass"}]}},"text_date":"March 11, 2024","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/announcing-arcgis-r-package","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/03\/arcgis-R-package-banner.jpg","primary_product":"Developers","tag_data":[{"term_id":39801,"name":"ArcGIS Developer Community","slug":"arcgis-developer-community","term_group":0,"term_taxonomy_id":39801,"taxonomy":"post_tag","description":"","parent":0,"count":21,"filter":"raw"},{"term_id":30241,"name":"r","slug":"r","term_group":0,"term_taxonomy_id":30241,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"},{"term_id":31611,"name":"R-ArcGIS Bridge","slug":"r-arcgis-bridge","term_group":0,"term_taxonomy_id":31611,"taxonomy":"post_tag","description":"","parent":0,"count":15,"filter":"raw"},{"term_id":23391,"name":"spatial analytics","slug":"spatial-analytics","term_group":0,"term_taxonomy_id":23391,"taxonomy":"post_tag","description":"","parent":0,"count":344,"filter":"raw"},{"term_id":25581,"name":"spatial statistics","slug":"spatial-statistics","term_group":0,"term_taxonomy_id":25581,"taxonomy":"post_tag","description":"","parent":0,"count":128,"filter":"raw"}],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1329,"filter":"raw"},{"term_id":37101,"name":"Announcements","slug":"announcements","term_group":0,"term_taxonomy_id":37101,"taxonomy":"category","description":"","parent":0,"count":1963,"filter":"raw"},{"term_id":738191,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":738191,"taxonomy":"category","description":"","parent":0,"count":423,"filter":"raw"}],"product_data":[{"term_id":36571,"name":"ArcGIS Enterprise","slug":"arcgis-enterprise","term_group":0,"term_taxonomy_id":36571,"taxonomy":"product","description":"","parent":0,"count":974,"filter":"raw"},{"term_id":761642,"name":"ArcGIS Location Platform","slug":"platform","term_group":0,"term_taxonomy_id":761642,"taxonomy":"product","description":"","parent":36601,"count":214,"filter":"raw"},{"term_id":36551,"name":"ArcGIS Online","slug":"arcgis-online","term_group":0,"term_taxonomy_id":36551,"taxonomy":"product","description":"","parent":0,"count":2426,"filter":"raw"},{"term_id":36561,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":36561,"taxonomy":"product","description":"","parent":0,"count":2036,"filter":"raw"},{"term_id":36861,"name":"ArcGIS REST API","slug":"api-rest","term_group":0,"term_taxonomy_id":36861,"taxonomy":"product","description":"","parent":36601,"count":75,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":763,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=developers","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2270082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/340172"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2270082"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2270082\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2270082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2270082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2270082"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2270082"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2270082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}