8000 minor revision · plotly/plotly.r-docs@e3789dc · GitHub
[go: up one dir, main page]

Skip to content

Commit e3789dc

Browse files
author
mahdis-z
committed
minor revision
1 parent 0d486f0 commit e3789dc

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

r/2017-04-12-county-level-choropleth.Rmd

Lines changed: 0 additions & 15 deletions
This file was deleted.

r/2020-01-30-choropleth-rmapbox.Rmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ output:
1111
page_type: u-guide
1212
permalink: r/mapbox-county-choropleth/
1313
thumbnail: thumbnail/mapbox-choropleth.png
14+
redirect_from: r/county-level-choropleth/
1415
---
1516

1617
```{r, echo = FALSE, message=FALSE}
@@ -56,15 +57,13 @@ Here we load unemployment data by county, also indexed by [FIPS code](https://en
5657
df = read.csv("https://raw.githubusercontent.com/plotly/datasets/master/fips-unemp-16.csv", header = T, colClasses = c("fips"="character"))
5758
head(df)
5859
```
59-
6060
### Choropleth map using carto base map (no token needed)
6161

6262
With `choroplethmapbox`, each row of the DataFrame is represented as a region of the choropleth.
6363

6464
```{r}
6565
library(rjson)
6666
library(plotly)
67-
library(data.table)
6867
6968
url <- 'https://raw.githubusercontent.com/plotly/datasets/master/geojson-counties-fips.json'
7069
counties <- rjson::fromJSON(file=url)
@@ -97,7 +96,6 @@ fig
9796
```{r}
9897
library(rjson)
9998
library(plotly)
100-
library(data.table)
10199
102100
mapboxToken <- paste(readLines("../.mapbox_token"), collapse="") # You need your own token
103101
Sys.setenv("MAPBOX_TOKEN" = mapboxToken) # for Orca
@@ -132,4 +130,4 @@ fig
132130
```
133131
#Reference
134132

135-
See [https://plot.ly/r/reference/#scattermapbox](https://plot.ly/r/reference/#scattermapbox) for more information and options!
133+
See [https://plot.ly/r/reference/#scattermapbox](https://plot.ly/r/reference/#choroplethmapbox) for more information and options!

0 commit comments

Comments
 (0)
0