devtools::install_github("kmwest/SRI")
library(SRI)
# See palette options
names(sri_palettes)
#> [1] "sricool" "srisunset" "srioranges" "sriblues" "sricolors"
#> [6] "sricolors2" "dcfscolors"
sri_palette("sricool")
sri_palette("srisunset")
sri_palette("srioranges")
sri_palette("sriblues")
sri_palette("sricolors")
sri_palette("sricolors2")
This palette is based on the DCFS specified region colors. The palette is applied in alphabetical order; Eastern (green), Northern (red), Salt Lake Valley (orange), Southwest (blue), Western (yellow), and Statewide (purple).
sri_palette("dcfscolors")
library("ggplot2")
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point(size = 3) + theme_sri() + scale_color_manual(values=sri_palette("sricool"))
Add +sribasic to your ggplot to apply a quick format. This applies theme_sri and sets scale color and fill to "sricolors". For example:
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point(size = 3) + sribasic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.