{"id":847,"date":"2015-04-01T14:03:05","date_gmt":"2015-04-01T21:03:05","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=847"},"modified":"2015-04-01T14:03:05","modified_gmt":"2015-04-01T21:03:05","slug":"using-rstudio-as-an-interactive-gis-with-leaflet","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2015\/04\/01\/using-rstudio-as-an-interactive-gis-with-leaflet\/","title":{"rendered":"Using RStudio as an interactive GIS with Leaflet"},"content":{"rendered":"<div id=\"header\">\n<h4 class=\"author\"><em>Kyle Walker, Texas Christian University<\/em><\/h4>\n<h4 class=\"date\"><em>February 17, 2015<\/em><\/h4>\n<\/div>\n<ul>\n<li>Web: <a class=\"uri\" href=\"http:\/\/personal.tcu.edu\/kylewalker\">http:\/\/personal.tcu.edu\/kylewalker<\/a><\/li>\n<li>Twitter: <a class=\"uri\" href=\"https:\/\/twitter.com\/kyle_e_walker\">https:\/\/twitter.com\/kyle_e_walker<\/a><\/li>\n<\/ul>\n<p>For exploratory GIS work, I have hesitated to use R instead of ArcGIS or QGIS due to a lack of visual interactivity. One of the things I have appreciated about desktop GIS software is its ability to run a function and then show the results in an interactive data view that I can zoom and pan around. However, with the new Leaflet package for R by RStudio, I can use RStudio in this way for exploratory GIS.<\/p>\n<p>I\u2019ve put together a few examples to show my GIS students at TCU, and I thought I\u2019d share how I created them to demonstrate the interactive GIS functionality that is now in RStudio. For my example, I\u2019ll be doing some GIS operations with the <a href=\"https:\/\/opendata.socrata.com\/Business\/All-Starbucks-Locations-in-the-US-Map\/ddym-zvjk\">open Starbucks dataset<\/a>, which you\u2019ll need to download from the link if you want to reproduce this. I\u2019ll look specifically at Starbucks in my city, Fort Worth. In a real analysis, you\u2019d want to use Starbucks locations in the Fort Worth suburbs as well (as the city of Fort Worth has a very odd shape) but this will work as an example.<\/p>\n<p>To get started, I\u2019ll load in the required libraries and the data. I\u2019ll create a SpatialPointsDataFrame from my Starbucks data frame, and then project the data to an appropriate projected coordinate system for buffering (UTM Zone 14N) with the <code>spTransform<\/code> function.<\/p>\n<pre class=\"r\"><code class=\"r\"><span class=\"keyword\">library<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">leaflet<\/span><span class=\"paren\">)<\/span>\n<span class=\"keyword\">library<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">rgeos<\/span><span class=\"paren\">)<\/span>\n<span class=\"keyword\">library<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">rgdal<\/span><span class=\"paren\">)<\/span>\n<span class=\"keyword\">library<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">spatstat<\/span><span class=\"paren\">)<\/span>\n<span class=\"keyword\">library<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">maptools<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">starbucks<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">read.csv<\/span><span class=\"paren\">(<\/span><span class=\"string\">'starbucks.csv'<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">fw<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">subset<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">starbucks<\/span>, <span class=\"identifier\">City<\/span> <span class=\"operator\">==<\/span> <span class=\"string\">'Fort Worth'<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">coords<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">cbind<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">fw<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">Longitude<\/span>, <span class=\"identifier\">fw<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">Latitude<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"comment\">## Spatial points w\/the WGS84 datum<\/span>\n\n<span class=\"identifier\">sp_fw<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">SpatialPointsDataFrame<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">coords<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">coords<\/span>, <span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span>, <span class=\"identifier\">proj4string<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+proj=longlat +datum=WGS84\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">sp_fw_proj<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">spTransform<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">sp_fw<\/span>, <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+init=epsg:26914\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span><\/code><\/pre>\n<p>For the first example, I\u2019ll create 2km buffers with the <code>gBuffer<\/code> function from the <code>rgeos<\/code> package around each Starbucks location. To show the data on a Leaflet map, I\u2019ll need to convert back to using XY coordinates so that the Leaflet package can read it in. The map will show Starbucks locations with markers and a pop-up, the buffers, and the default OSM basemap, and appear right in your RStudio viewer.<\/p>\n<pre class=\"r\"><code class=\"r\"><span class=\"identifier\">buff2km<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">gBuffer<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">sp_fw_proj<\/span>, <span class=\"identifier\">byid<\/span> <span class=\"operator\">=<\/span> <span class=\"literal\">TRUE<\/span>, <span class=\"identifier\">width<\/span> <span class=\"operator\">=<\/span> <span class=\"number\">2000<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">buff_xy<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">spTransform<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">buff2km<\/span>, <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+proj=longlat +datum=WGS84\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n\n<span class=\"identifier\">leaflet<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addMarkers<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span>, \n             <span class=\"identifier\">lat<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Latitude<\/span>, \n             <span class=\"identifier\">lng<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Longitude<\/span>, \n             <span class=\"identifier\">popup<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">Name<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addPolygons<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">buff_xy<\/span>, <span class=\"identifier\">color<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span>, <span class=\"identifier\">fill<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addTiles<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span><\/code><\/pre>\n<div id=\"htmlwidget-3175\" class=\"leaflet html-widget-static-bound leaflet-container leaflet-fade-anim\" tabindex=\"0\">\n<div class=\"leaflet-map-pane\">\n<div class=\"leaflet-tile-pane\">\n<div class=\"leaflet-layer\">\n<div class=\"leaflet-tile-container leaflet-zoom-animated\"><\/div>\n<div class=\"leaflet-tile-container leaflet-zoom-animated\"><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/2\/1\/2.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/2\/1\/1.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/2\/0\/2.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/2\/2\/2.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/2\/1\/3.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/2\/0\/1.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/2\/2\/1.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/2\/0\/3.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/2\/2\/3.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-objects-pane\">\n<div class=\"leaflet-shadow-pane\"><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-overlay-pane\"><\/div>\n<div class=\"leaflet-marker-pane\"><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-popup-pane\"><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-control-container\">\n<div class=\"leaflet-top leaflet-left\">\n<div class=\"leaflet-control-zoom leaflet-bar leaflet-control\"><a class=\"leaflet-control-zoom-in\" title=\"Zoom in\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">+<\/a><a class=\"leaflet-control-zoom-out\" title=\"Zoom out\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">&#8211;<\/a><\/div>\n<\/div>\n<div class=\"leaflet-top leaflet-right\"><\/div>\n<div class=\"leaflet-bottom leaflet-left\"><\/div>\n<div class=\"leaflet-bottom leaflet-right\">\n<div class=\"leaflet-control-attribution leaflet-control\"><a title=\"A JS library for interactive maps\" href=\"http:\/\/leafletjs.com\/\">Leaflet<\/a> | \u00a9 <a href=\"http:\/\/openstreetmap.org\/\">OpenStreetMap<\/a> contributors, <a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/\">CC-BY-SA<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>There are many other types of operations we can do. Here, I\u2019ll draw a convex hull around the points:<\/p>\n<pre class=\"r\"><code class=\"r\"><span class=\"identifier\">hull<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">gConvexHull<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">sp_fw_proj<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">hull_xy<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">spTransform<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">hull<\/span>, <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+proj=longlat +datum=WGS84\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n\n<span class=\"identifier\">leaflet<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addMarkers<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span>, \n             <span class=\"identifier\">lat<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Latitude<\/span>, \n             <span class=\"identifier\">lng<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Longitude<\/span>, \n             <span class=\"identifier\">popup<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">Name<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addPolygons<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">hull_xy<\/span>, <span class=\"identifier\">color<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span>, <span class=\"identifier\">fill<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addTiles<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span><\/code><\/pre>\n<div id=\"htmlwidget-5791\" class=\"leaflet html-widget-static-bound leaflet-container leaflet-fade-anim\" tabindex=\"0\">\n<div class=\"leaflet-map-pane\">\n<div class=\"leaflet-tile-pane\">\n<div class=\"leaflet-layer\">\n<div class=\"leaflet-tile-container\"><\/div>\n<div class=\"leaflet-tile-container leaflet-zoom-animated\"><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/235\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/235\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/234\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/236\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/235\/414.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/234\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/236\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/234\/414.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/236\/414.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-objects-pane\">\n<div class=\"leaflet-shadow-pane\"><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-overlay-pane\"><\/div>\n<div class=\"leaflet-marker-pane\"><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-popup-pane\"><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-control-container\">\n<div class=\"leaflet-top leaflet-left\">\n<div class=\"leaflet-control-zoom leaflet-bar leaflet-control\"><a class=\"leaflet-control-zoom-in\" title=\"Zoom in\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">+<\/a><a class=\"leaflet-control-zoom-out\" title=\"Zoom out\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">&#8211;<\/a><\/div>\n<\/div>\n<div class=\"leaflet-top leaflet-right\"><\/div>\n<div class=\"leaflet-bottom leaflet-left\"><\/div>\n<div class=\"leaflet-bottom leaflet-right\">\n<div class=\"leaflet-control-attribution leaflet-control\"><a title=\"A JS library for interactive maps\" href=\"http:\/\/leafletjs.com\/\">Leaflet<\/a> | \u00a9 <a href=\"http:\/\/openstreetmap.org\/\">OpenStreetMap<\/a> contributors, <a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/\">CC-BY-SA<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Now, let\u2019s try something a little more complicated. I\u2019m going to draw Thiessen (or Voronoi, Dirichlet) polygons around each point. Each Thiessen polygon represents the area that is nearest to the point that it contains for a given study area (<code>window<\/code> in the code below). After a bit of StackOverflowing I was able to get this done with help from the <code>spatstat<\/code> package. I\u2019m setting this up so that each polygon has a popup as well that shows its area in square kilometers.<\/p>\n<pre class=\"r\"><code class=\"r\"><span class=\"identifier\">fw_coords<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">sp_fw_proj<\/span>@<span class=\"identifier\">coords<\/span>\n\n<span class=\"comment\">## Create the window for the polygons<\/span>\n\n<span class=\"identifier\">window<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">owin<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">range<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">fw_coords<\/span><span class=\"paren\">[<\/span>,<span class=\"number\">1<\/span><span class=\"paren\">]<\/span><span class=\"paren\">)<\/span>, <span class=\"identifier\">range<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">fw_coords<\/span><span class=\"paren\">[<\/span>,<span class=\"number\">2<\/span><span class=\"paren\">]<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"comment\">## Create the polygons<\/span>\n\n<span class=\"identifier\">d<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">dirichlet<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">as.ppp<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">fw_coords<\/span>, <span class=\"identifier\">window<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"comment\">## Convert to a SpatialPolygonsDataFrame and calculate an \"area\" field.  <\/span>\n\n<span class=\"identifier\">dsp<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">as<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">d<\/span>, <span class=\"string\">\"SpatialPolygons\"<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">dsp_df<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">SpatialPolygonsDataFrame<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp<\/span>, \n                                   <span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">data.frame<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">id<\/span> <span class=\"operator\">=<\/span> <span class=\"number\">1<\/span><span class=\"operator\">:<\/span><span class=\"identifier\">length<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp<\/span>@<span class=\"identifier\">polygons<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">proj4string<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp_df<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+init=epsg:26914\"<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">dsp_df<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">area<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">round<\/span><span class=\"paren\">(<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">gArea<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp_df<\/span>, <span class=\"identifier\">byid<\/span> <span class=\"operator\">=<\/span> <span class=\"literal\">TRUE<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">\/<\/span> <span class=\"number\">1000000<\/span><span class=\"paren\">)<\/span>, <span class=\"number\">1<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">dsp_xy<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">spTransform<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp_df<\/span>, <span class=\"identifier\">CRS<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"+proj=longlat +datum=WGS84\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"comment\">## Map it!<\/span>\n\n<span class=\"identifier\">leaflet<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addMarkers<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span>, \n             <span class=\"identifier\">lat<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Latitude<\/span>, \n             <span class=\"identifier\">lng<\/span> <span class=\"operator\">=<\/span> <span class=\"operator\">~<\/span> <span class=\"identifier\">Longitude<\/span>, \n             <span class=\"identifier\">popup<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">fw<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">Name<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addPolygons<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">data<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">dsp_xy<\/span>, \n              <span class=\"identifier\">color<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span>, \n              <span class=\"identifier\">fill<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"green\"<\/span>, \n              <span class=\"identifier\">popup<\/span> <span class=\"operator\">=<\/span> <span class=\"identifier\">paste0<\/span><span class=\"paren\">(<\/span><span class=\"string\">\"Area: \"<\/span>, \n                             <span class=\"identifier\">as.character<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dsp_xy<\/span><span class=\"operator\">$<\/span><span class=\"identifier\">area<\/span><span class=\"paren\">)<\/span>, \n                             <span class=\"string\">\" square km\"<\/span><span class=\"paren\">)<\/span><span class=\"paren\">)<\/span> <span class=\"operator\">%&gt;%<\/span>\n  <span class=\"identifier\">addTiles<\/span><span class=\"paren\">(<\/span><span class=\"paren\">)<\/span><\/code><\/pre>\n<div id=\"htmlwidget-2471\" class=\"leaflet html-widget-static-bound leaflet-container leaflet-fade-anim\" tabindex=\"0\">\n<div class=\"leaflet-map-pane\">\n<div class=\"leaflet-tile-pane\">\n<div class=\"leaflet-layer\">\n<div class=\"leaflet-tile-container\"><\/div>\n<div class=\"leaflet-tile-container leaflet-zoom-animated\"><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/235\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/235\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/234\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/236\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/235\/414.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/234\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/236\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/234\/414.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/236\/414.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-objects-pane\">\n<div class=\"leaflet-shadow-pane\"><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-overlay-pane\"><\/div>\n<div class=\"leaflet-marker-pane\"><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-popup-pane\"><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-control-container\">\n<div class=\"leaflet-top leaflet-left\">\n<div class=\"leaflet-control-zoom leaflet-bar leaflet-control\"><a class=\"leaflet-control-zoom-in\" title=\"Zoom in\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">+<\/a><a class=\"leaflet-control-zoom-out\" title=\"Zoom out\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">&#8211;<\/a><\/div>\n<\/div>\n<div class=\"leaflet-top leaflet-right\"><\/div>\n<div class=\"leaflet-bottom leaflet-left\"><\/div>\n<div class=\"leaflet-bottom leaflet-right\">\n<div class=\"leaflet-control-attribution leaflet-control\"><a title=\"A JS library for interactive maps\" href=\"http:\/\/leafletjs.com\/\">Leaflet<\/a> | \u00a9 <a href=\"http:\/\/openstreetmap.org\/\">OpenStreetMap<\/a> contributors, <a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/\">CC-BY-SA<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Of course, if I want to do this again for another place, it is a good idea to wrap this code in a function so you don\u2019t have to write the code over and over. I\u2019ve written a function to create Thiessen polygons as in the above example, but with a different dataset as input. <a href=\"https:\/\/gist.github.com\/walkerke\/c3c481e566c35ff1d3cd\">You can view the code at this GitHub Gist<\/a>.<\/p>\n<p>Let\u2019s try it here for Dallas this time:<\/p>\n<pre class=\"r\"><code class=\"r\"><span class=\"identifier\">dallas<\/span> <span class=\"operator\">&lt;-<\/span> <span class=\"identifier\">subset<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">starbucks<\/span>, <span class=\"identifier\">City<\/span> <span class=\"operator\">==<\/span> <span class=\"string\">\"Dallas\"<\/span> <span class=\"operator\">&amp;<\/span> <span class=\"identifier\">State<\/span> <span class=\"operator\">==<\/span> <span class=\"string\">\"TX\"<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">devtools<\/span><span class=\"operator\">:<\/span><span class=\"operator\">:<\/span><span class=\"identifier\">source_gist<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">id<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"c3c481e566c35ff1d3cd\"<\/span><span class=\"paren\">)<\/span>\n\n<span class=\"identifier\">leaflet_thiessen<\/span><span class=\"paren\">(<\/span><span class=\"identifier\">dallas<\/span>, <span class=\"identifier\">id<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"Name\"<\/span>, <span class=\"identifier\">long<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"Longitude\"<\/span>, <span class=\"identifier\">lat<\/span> <span class=\"operator\">=<\/span> <span class=\"string\">\"Latitude\"<\/span>, <span class=\"identifier\">epsg_code<\/span> <span class=\"operator\">=<\/span> <span class=\"number\">26914<\/span><span class=\"paren\">)<\/span><\/code><\/pre>\n<div id=\"htmlwidget-3164\" class=\"leaflet html-widget-static-bound leaflet-container leaflet-fade-anim\" tabindex=\"0\">\n<div class=\"leaflet-map-pane\">\n<div class=\"leaflet-tile-pane\">\n<div class=\"leaflet-layer\">\n<div class=\"leaflet-tile-container\"><\/div>\n<div class=\"leaflet-tile-container leaflet-zoom-animated\"><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/236\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/236\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/235\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/b.tile.openstreetmap.org\/10\/237\/412.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/a.tile.openstreetmap.org\/10\/235\/413.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-tile leaflet-tile-loaded\" src=\"http:\/\/c.tile.openstreetmap.org\/10\/237\/413.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-objects-pane\">\n<div class=\"leaflet-shadow-pane\"><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-shadow leaflet-zoom-animated\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-shadow.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-overlay-pane\"><\/div>\n<div class=\"leaflet-marker-pane\"><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><img decoding=\"async\" class=\"leaflet-marker-icon leaflet-zoom-animated leaflet-clickable\" tabindex=\"0\" src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7.3\/images\/marker-icon.png\" alt=\"\" \/><\/div>\n<div class=\"leaflet-popup-pane\"><\/div>\n<\/div>\n<\/div>\n<div class=\"leaflet-control-container\">\n<div class=\"leaflet-top leaflet-left\">\n<div class=\"leaflet-control-zoom leaflet-bar leaflet-control\"><a class=\"leaflet-control-zoom-in\" title=\"Zoom in\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">+<\/a><a class=\"leaflet-control-zoom-out\" title=\"Zoom out\" href=\"https:\/\/rstudio-pubs-static.s3.amazonaws.com\/60061_915900b66c294f1d8f55e2a8c7a2ccf1.html#\">&#8211;<\/a><\/div>\n<\/div>\n<div class=\"leaflet-top leaflet-right\"><\/div>\n<div class=\"leaflet-bottom leaflet-left\"><\/div>\n<div class=\"leaflet-bottom leaflet-right\">\n<div class=\"leaflet-control-attribution leaflet-control\"><a title=\"A JS library for interactive maps\" href=\"http:\/\/leafletjs.com\/\">Leaflet<\/a> | \u00a9 <a href=\"http:\/\/openstreetmap.org\/\">OpenStreetMap<\/a> contributors, <a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/\">CC-BY-SA<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Now, with the Leaflet package for R, RStudio can function much better for exploratory GIS work. I look forward to testing this out further!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kyle Walker, Texas Christian University February 17, 2015 Web: http:\/\/personal.tcu.edu\/kylewalker Twitter: https:\/\/twitter.com\/kyle_e_walker For exploratory GIS work, I have hesitated to use R instead of ArcGIS&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-847","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=847"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/847\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}