set_token( secret::get_secret("mapbox") )
df <- capitals
df$my_colour <- ifelse( substr(df$country, 1, 1) == "A", "#00FF00FF", "#FF0000FF")
l1 <- legend_element(
variables = c("Begins with A", "Doesn't begin with A")
, colours = c("#00FF00FF", "#FF0000FF")
, colour_type = "fill"
, variable_type = "category"
)
js <- mapdeck_legend(l1)
mapdeck() %>%
add_scatterplot(
data = capitals
, fill_colour = "country"
, legend = js
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4