You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/choropleths.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1138,7 +1138,7 @@ <h2>Choropleths</h2>
1138
1138
<h3>Data source</h3>
1139
1139
<p>We’ll start by loading the data from JSON. While the Leaflet.js example loads the JSON directly into JavaScript, with the Leaflet R package we instead want to load the data into R.</p>
1140
1140
<p>In this case, we’ll use the <code>geojsonio</code> package to load the data into <code>sp</code> objects, which will let us easily manipulate the geographic features, and their properties, in R.</p>
1141
-
<pre class="r"><code>states <- geojsonio::geojson_read(system.file("json/us-states.geojson", package="leaflet"), what = "sp")
1141
+
<pre class="r"><code>states <- geojsonio::geojson_read("https://rstudio.github.io/leaflet/json/us-states.geojson", what = "sp")
Copy file name to clipboardExpand all lines: docs/json.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -250,13 +250,13 @@ <h3>Reading as <code>sp</code></h3>
250
250
<p>The first approach is to use either <code>rgdal</code> or <code>geojsonio</code> (packages) to read GeoJSON/TopoJSON as <code>sp</code> objects. Then, you can use the full functionality of <a href="shapes.html">polygons</a>, <a href="markers.html">markers</a>, <a href="colors.html">colors</a>, <a href="legends.html">legends</a>, etc.</p>
251
251
<pre class="r"><code># From http://eric.clst.org/Stuff/USGeoJSON and
<pre class="r"><code># Or use the geojsonio equivalent:
259
-
# nycounties <- geojsonio::geojson_read(system.file("json/nycounties.geojson", package="leaflet"), what = "sp")
259
+
# nycounties <- geojsonio::geojson_read("https://rstudio.github.io/leaflet/json/nycounties.geojson", what = "sp")
260
260
261
261
pal <- colorNumeric("viridis", NULL)
262
262
@@ -917,7 +917,7 @@ <h3>Working with raw GeoJSON/TopoJSON</h3>
917
917
<p>The <code>addGeoJSON()</code> and <code>addTopoJSON()</code> functions accept GeoJSON data in either parsed (nested lists) or stringified (single-element character vector) format.</p>
918
918
<p>Note that for larger JSON data, using parsed is significantly slower than using stringified, because parsed data must go through a JSON encoding step.</p>
0 commit comments