View source: R/grattan_leaflet.R
grattan_leaflet | R Documentation |
Draw leaflet charts in grattan style
grattan_leaflet(
DT,
Year = c("2011", "2013", "2016"),
simple = FALSE,
na.value = "#6A737B"
)
DT |
A data frame whose first column is of the form |
Year |
The year to which |
simple |
Use a simplified shapefile (if available)? |
na.value |
|
A leaflet
object; a map of Australia.
## Not run:
library(readxl)
library(data.table)
library(magrittr)
library(grattanCharts)
DT <-
read_excel(system.file("extdata", "unemp.xlsx", package = "ASGS")) %>%
setDT %>%
.[, .(SA2_NAME11 = `Statistical Area Level 2 (SA2)`,
fillColor = gpal(7)[Breaks],
labelText = `Statistical Area Level 2 (SA2)`,
labelTitle = "Unemployment")]
grattan_leaflet(DT, Year = "2011")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.