├── .Rbuildignore ├── .gitignore ├── .travis.yml ├── CONDUCT.md ├── DESCRIPTION ├── LICENSE ├── NAMESPACE ├── R ├── annotate.r ├── color.r ├── legend.r ├── marker.r ├── phantom.R ├── sg_axis_x.r ├── sg_axis_y.r ├── shiny.r ├── streamgraph-package.R ├── streamgraph.R └── utils.R ├── README.Rmd ├── README.html ├── README.md ├── example.png ├── inst └── htmlwidgets │ ├── lib │ ├── colorbrewer │ │ ├── LICENSE.txt │ │ ├── colorbrewer.css │ │ └── colorbrewer.js │ ├── d3 │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ ├── d3.js │ │ └── d3.min.js │ └── streamgraph │ │ └── streamgraph.css │ ├── streamgraph.js │ └── streamgraph.yaml ├── man ├── renderStreamgraph.Rd ├── sg_add_marker.Rd ├── sg_annotate.Rd ├── sg_axis_x.Rd ├── sg_axis_y.Rd ├── sg_colors.Rd ├── sg_fill_brewer.Rd ├── sg_fill_manual.Rd ├── sg_fill_tableau.Rd ├── sg_legend.Rd ├── sg_title.Rd ├── streamgraph-exports.Rd ├── streamgraph-package.Rd ├── streamgraph.Rd ├── streamgraphOutput.Rd └── widgetThumbnail.Rd ├── streamgraph.Rmd ├── streamgraph.Rproj ├── streamgraph.html ├── streamgraph.md ├── tests ├── test-all.R └── testthat │ ├── ccasn.R │ ├── sg.R │ ├── space.R │ ├── space.html │ └── test-streamgraph.R └── vignettes └── introduction.Rmd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^\.travis\.yml$ 4 | README\.md 5 | README\.Rmd 6 | streamgraph\.Rmd 7 | streamgraph\.html 8 | ^\.example.png$ 9 | ^CONDUCT\.md$ 10 | ^README\.html$ 11 | example\.png$ 12 | streamgraph\.md$ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Rproj 5 | src/*.o 6 | src/*.so 7 | src/*.dll 8 | inst/doc 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | before_install: 4 | - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh 5 | - chmod 755 ./travis-tool.sh 6 | - ./travis-tool.sh bootstrap 7 | 8 | install: 9 | - ./travis-tool.sh install_github plyr 10 | - ./travis-tool.sh install_deps 11 | 12 | script: ./travis-tool.sh run_tests 13 | 14 | on_failure: 15 | - ./travis-tool.sh dump_logs 16 | 17 | branches: 18 | except: 19 | - /-expt$/ 20 | notifications: 21 | email: 22 | on_success: change 23 | on_failure: change 24 | -------------------------------------------------------------------------------- /CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, we pledge to respect all people who 4 | contribute through reporting issues, posting feature requests, updating documentation, 5 | submitting pull requests or patches, and other activities. 6 | 7 | We are committed to making participation in this project a harassment-free experience for 8 | everyone, regardless of level of experience, gender, gender identity and expression, 9 | sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. 10 | 11 | Examples of unacceptable behavior by participants include the use of sexual language or 12 | imagery, derogatory comments or personal attacks, trolling, public or private harassment, 13 | insults, or other unprofessional conduct. 14 | 15 | Project maintainers have the right and responsibility to remove, edit, or reject comments, 16 | commits, code, wiki edits, issues, and other contributions that are not aligned to this 17 | Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed 18 | from the project team. 19 | 20 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by 21 | opening an issue or contacting one or more of the project maintainers. 22 | 23 | This Code of Conduct is adapted from the Contributor Covenant 24 | (http:contributor-covenant.org), version 1.0.0, available at 25 | http://contributor-covenant.org/version/1/0/0/ 26 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: streamgraph 2 | Type: Package 3 | Title: streamgraph is an htmlwidget for building streamgraph visualizations 4 | Version: 0.9.0 5 | Date: 2019-05-02 6 | Author: Bob Rudis 7 | Maintainer: Bob Rudis 8 | Description: A streamgraph (or "stream graph") is a type of stacked area graph 9 | which is displaced around a central axis, resulting in a flowing, 10 | organic shape. Streamgraphs were developed by Lee Byron and popularized 11 | by their use in a February 2008 New York Times article on movie 12 | box office revenues. [Wikipedia] The streamgraph package is based on 13 | the htmlwidget package and uses D3.js to render the visualizations. 14 | URL: http://github.com/hrbrmstr/streamgraph 15 | BugReports: https://github.com/hrbrmstr/streamgraph/issues 16 | License: MIT + file LICENSE 17 | Suggests: 18 | testthat, 19 | knitr, 20 | babynames, 21 | ggplot2movies 22 | Encoding: UTF-8 23 | Depends: 24 | R (>= 3.0.0), 25 | Imports: 26 | htmlwidgets, 27 | htmltools, 28 | magrittr, 29 | xts, 30 | tidyr, 31 | dplyr 32 | VignetteBuilder: knitr 33 | RoxygenNote: 6.1.1 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2015 2 | COPYRIGHT HOLDER: Bob Rudis 3 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export("%>%") 4 | export(renderStreamgraph) 5 | export(sg_annotate) 6 | export(sg_axis_x) 7 | export(sg_axis_y) 8 | export(sg_colors) 9 | export(sg_fill_brewer) 10 | export(sg_fill_manual) 11 | export(sg_fill_tableau) 12 | export(sg_legend) 13 | export(sg_title) 14 | export(streamgraph) 15 | export(streamgraphOutput) 16 | export(widgetThumbnail) 17 | import(htmltools) 18 | import(htmlwidgets) 19 | import(xts) 20 | importFrom(dplyr,arrange) 21 | importFrom(dplyr,bind_rows) 22 | importFrom(dplyr,left_join) 23 | importFrom(dplyr,mutate) 24 | importFrom(dplyr,select) 25 | importFrom(magrittr,"%>%") 26 | importFrom(tidyr,expand) 27 | -------------------------------------------------------------------------------- /R/annotate.r: -------------------------------------------------------------------------------- 1 | . <- NULL 2 | 3 | #' Add text annotation to streamgraph 4 | #' 5 | #' Use this function to place text at any point on a streamgraph. This 6 | #' is especially useful for non-interactive streamgraphs (i.e. to label 7 | #' a particular stream). 8 | #' 9 | #' @param sg streamgraph object 10 | #' @param label text for the annotation 11 | #' @param x horizontal position 12 | #' @param y vertical position 13 | #' @param color color of the label 14 | #' @param size font size 15 | #' @export 16 | sg_annotate <- function(sg, label, x, y, color="black", size=12) { 17 | 18 | if (inherits(x, "Date")) { x <- format(x, "%Y-%m-%d") } 19 | 20 | ann <- data.frame(label=label, x=x, y=y, color=color, size=size, stringsAsFactors=FALSE) 21 | 22 | if (is.null(sg$x$annotations)) { 23 | sg$x$annotations <- ann 24 | } else { 25 | sg$x$annotations <- bind_rows(ann, sg$x$annotations) 26 | } 27 | 28 | sg 29 | 30 | } 31 | -------------------------------------------------------------------------------- /R/color.r: -------------------------------------------------------------------------------- 1 | #' Modify streamgraph colors 2 | #' 3 | #' Change the ColorBrewer palette being used 4 | #' 5 | #' @param sg streamgraph object 6 | #' @param palette UNUSED; being removed in next release; use \code{sg_fill_*} instead 7 | #' @param axis_color color of the axis text (defaults to "\code{black}") 8 | #' @param tooltip_color color of the tooltip text (defaults to "\code{black}") 9 | #' @param label_color color of the label text for the legend select menu (defaults to "\code{black}") 10 | #' @return streamgraph object 11 | #' @export 12 | #' @examples \dontrun{ 13 | #' library(dplyr) 14 | #' library(streamgraph) 15 | #' ggplot2movies::movies %>% 16 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 17 | #' tidyr::gather(genre, value, -year) %>% 18 | #' group_by(year, genre) %>% 19 | #' tally(wt=value) %>% 20 | #' ungroup %>% 21 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 22 | #' 23 | #' streamgraph(dat, "genre", "n", "year") %>% 24 | #' sg_colors("PuOr") 25 | #' } 26 | sg_colors <- function(sg, palette=NULL, axis_color="black", tooltip_color="black", label_color="black") { 27 | 28 | if (!is.null(palette)) { 29 | message("Use 'sg_fill_*' for setting stream colors. This parameter will be removed in an upcoming release.") 30 | } 31 | 32 | sg$x$text <- axis_color 33 | sg$x$tooltip <- tooltip_color 34 | sg$x$label_col <- label_color 35 | 36 | sg 37 | 38 | } 39 | 40 | #' Use ColorBrewer palettes for streamgraph fill colors 41 | #' 42 | #' ColorBrewer provides sequential, diverging and qualitative colour schemes 43 | #' which are particularly suited and tested to display categorical values. 44 | #' 45 | #' @param sg streamgraph object 46 | #' @param palette ColorBrewer pallete atomic character value (defaults to \code{Spectral}) 47 | #' @return streamgraph object 48 | #' @export 49 | #' @examples \dontrun{ 50 | #' library(dplyr) 51 | #' library(streamgraph) 52 | #' ggplot2movies::movies %>% 53 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 54 | #' tidyr::gather(genre, value, -year) %>% 55 | #' group_by(year, genre) %>% 56 | #' tally(wt=value) %>% 57 | #' ungroup %>% 58 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 59 | #' 60 | #' streamgraph(dat, "genre", "n", "year") %>% 61 | #' sg_fill_brewer("PuOr") 62 | #' } 63 | sg_fill_brewer <- function(sg, palette="Spectral") { 64 | 65 | sg$x$fill <- "brewer" 66 | sg$x$palette <- palette 67 | 68 | sg 69 | 70 | } 71 | 72 | #' Use Tableau discrete palettes for streamgraph fill colors 73 | #' 74 | #' Tableau discrete palettes provide colour schemes 75 | #' which are particularly suited and tested to display categorical values. 76 | #' 77 | #' @param sg streamgraph object 78 | #' @param palette Tableau discrete pallete atomic character value (defaults to \code{tableau20}). Must be one of 79 | #' \code{c("tableau20", "tableau10medium", "gray5", "colorblind10", "trafficlight", "purplegray12", "bluered12", "greenorange12", "cyclic")} 80 | #' @return streamgraph object 81 | #' @export 82 | #' @examples \dontrun{ 83 | #' library(dplyr) 84 | #' library(streamgraph) 85 | #' ggplot2movies::movies %>% 86 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 87 | #' tidyr::gather(genre, value, -year) %>% 88 | #' group_by(year, genre) %>% 89 | #' tally(wt=value) %>% 90 | #' ungroup %>% 91 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 92 | #' 93 | #' streamgraph(dat, "genre", "n", "year") %>% 94 | #' sg_fill_tableau("purplegray12") 95 | #' } 96 | sg_fill_tableau<- function(sg, palette="tableau20") { 97 | 98 | if (palette %in% c("tableau20", "tableau10medium", "gray5", 99 | "colorblind10", "trafficlight", "purplegray12", 100 | "bluered12", "greenorange12", "cyclic")) { 101 | 102 | sg$x$fill <- "manual" 103 | sg$x$palette <- tableau_colors(palette) 104 | 105 | } else { 106 | warning("'palette' value is not a valid Tableau discrete color scale, using streamgraph defaults") 107 | } 108 | 109 | sg 110 | 111 | } 112 | 113 | #' Use manual colors for streamgraph fill colors 114 | #' 115 | #' Specify a vector of colors (e.g. \code{c("red", "#00ff00", rgb(0,0,1))}) to 116 | #' use for the color scale. Note that \code{streamgraph} sorts the categorical values 117 | #' before assigning the mappings, which means you can use that as a determinstic way of 118 | #' assigning specific colors to categories. If the number of categories 119 | #' exceeds the number of colors in the palette, the colors will be reused in order. 120 | #' 121 | #' @param sg streamgraph object 122 | #' @param values character vector of 123 | #' @return streamgraph object 124 | #' @export 125 | #' @examples \dontrun{ 126 | #' library(dplyr) 127 | #' library(streamgraph) 128 | #' ggplot2movies::movies %>% 129 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 130 | #' tidyr::gather(genre, value, -year) %>% 131 | #' group_by(year, genre) %>% 132 | #' tally(wt=value) %>% 133 | #' ungroup %>% 134 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 135 | #' 136 | #' streamgraph(dat, "genre", "n", "year") %>% 137 | #' sg_fill_manual(c("black", "#ffa500", "blue", "white", "#00ff00", "red")) 138 | #' } 139 | sg_fill_manual <- function(sg, values=NULL) { 140 | 141 | if (is.null(values)) { 142 | 143 | warning("color values not specified, using streamgraph defauls") 144 | 145 | } else { 146 | 147 | sg$x$fill <- "manual" 148 | sg$x$palette <- col2hex(values) 149 | 150 | } 151 | 152 | sg 153 | 154 | } 155 | -------------------------------------------------------------------------------- /R/legend.r: -------------------------------------------------------------------------------- 1 | 2 | #' Modify streamgraph legend properties 3 | #' 4 | #' If the \code{streamgraph} is interactive, a "legend" can be added 5 | #' that displays a select menu of all the stream categories. Selecting 6 | #' a category will highlight that stream in the graph. 7 | #' 8 | #' TODO: legends for non-interactive streamgraphs 9 | #' 10 | #' @param sg streamgraph object 11 | #' @param show if this is \code{TRUE} and \code{interactive} is \code{TRUE} then a popup menu 12 | #' will be available that lists ll the keys in the data set. Selecting a key will 13 | #' perform the same action as hovering over the area with the mouse. 14 | #' @param label label for the legend (optional) 15 | #' @export 16 | #' @examples \dontrun{ 17 | #' library(dplyr) 18 | #' library(streamgraph) 19 | #' ggplot2movies::movies %>% 20 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 21 | #' tidyr::gather(genre, value, -year) %>% 22 | #' group_by(year, genre) %>% 23 | #' tally(wt=value) %>% 24 | #' ungroup %>% 25 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 26 | #' 27 | #' streamgraph(dat, "genre", "n", "year") %>% 28 | #' sg_fill_brewer("PuOr") %>% 29 | #' sg_legend(TRUE, "Genre: ") 30 | #' } 31 | sg_legend <- function(sg, show=FALSE, label="") { 32 | 33 | sg$x$legend <- show 34 | sg$x$legend_label <- label 35 | 36 | sg 37 | 38 | } -------------------------------------------------------------------------------- /R/marker.r: -------------------------------------------------------------------------------- 1 | 2 | #' Add a vertical marker (with optional label) to streamgraph 3 | #' 4 | #' This is useful for marking/labeling notable events along the streams. 5 | #' 6 | #' @param sg streamgraph object 7 | #' @param x horizontal position 8 | #' @param label text for the annotation 9 | #' @param stroke_width line width 10 | #' @param stroke line color 11 | #' @param space space (in points) from the marker to place the label 12 | #' @param y vertical position 13 | #' @param color color of the label 14 | #' @param size font size#' @export 15 | #' @param anchor how to justify the label (one of \code{start} [left], 16 | #' \code{middle} [center] or \code{end} [right]) 17 | sg_add_marker <- function(sg, x, label="", stroke_width=0.5, stroke="#7f7f7f", space=5, 18 | y=0, color="#7f7f7f", size=12, anchor="start") { 19 | 20 | if (inherits(x, "Date")) { x <- format(x, "%Y-%m-%d") } 21 | 22 | mark <- data.frame(x=x, y=y, label=label, color=color, stroke_width=stroke_width, stroke=stroke, 23 | space=space, size=size, anchor=anchor, stringsAsFactors=FALSE) 24 | 25 | if (is.null(sg$x$markers)) { 26 | sg$x$markers <- mark 27 | } else { 28 | sg$x$markers <- bind_rows(mark, sg$x$markers) 29 | } 30 | 31 | sg 32 | 33 | } -------------------------------------------------------------------------------- /R/phantom.R: -------------------------------------------------------------------------------- 1 | #' Make a thumbnail for an htmlwidget panel 2 | #' 3 | #' @param p htmlwidget object 4 | #' @param thumbPath where to save thumbnail file 5 | #' @export 6 | widgetThumbnail <- function(p, thumbPath) { 7 | phantom <- findPhantom() 8 | thumbPath <- path.expand(thumbPath) 9 | 10 | if(phantom == "") { 11 | message("** phantomjs dependency could not be found - thumbnail cannot be generated\n (Please visit this page to install phantomjs on your system: http://phantomjs.org/download.html)") 12 | } else { 13 | res <- try({ 14 | ff <- tempfile(fileext = ".html") 15 | ffjs <- tempfile(fileext = ".js") 16 | 17 | # don't want any padding 18 | p$sizingPolicy$padding <- 0 19 | suppressMessages(saveWidget(p, ff)) 20 | 21 | js <- paste0("var page = require('webpage').create(); 22 | page.open('file://", ff, "', function() { 23 | window.setTimeout(function () { 24 | page.render('", thumbPath, "'); 25 | phantom.exit(); 26 | }, 500); 27 | });") 28 | cat(js, file = ffjs) 29 | system2(phantom, ffjs) 30 | }) 31 | if(inherits(res, "try-error")) 32 | message("** could not create htmlwidget thumbnail...") 33 | 34 | # system(paste("open ", ffjs)) 35 | # system(paste("open ", dirname(ffjs))) 36 | } 37 | } 38 | 39 | 40 | # similar to webshot 41 | findPhantom <- function() { 42 | 43 | phantom <- Sys.which("phantomjs") 44 | 45 | if(Sys.which("phantomjs") == "") { 46 | if(identical(.Platform$OS.type, "windows")) { 47 | phantom <- Sys.which(file.path(Sys.getenv("APPDATA"), "npm", "phantomjs.cmd")) 48 | } 49 | } 50 | 51 | phantom 52 | 53 | } -------------------------------------------------------------------------------- /R/sg_axis_x.r: -------------------------------------------------------------------------------- 1 | #' Modify streamgraph x axis formatting 2 | #' 3 | #' Change the tick interval, units and label text display format for the 4 | #' streamgraph x axis. 5 | #' 6 | #' @param sg streamgraph object 7 | #' @param tick_interval tick interval 8 | #' @param tick_units units for the ticks 9 | #' @param tick_format how to show the labels (subset of \code{strftime} 10 | #' formatters for \code{date} scale, otherwise \code{sprintf} formats for 11 | #' \code{continuous} scale) (defaults to \code{\%b} - must specify if \code{continuous}). 12 | #' See \href{D3 formatting}{https://github.com/mbostock/d3/wiki/Formatting} for more details. 13 | #' @return streamgraph object 14 | #' @export 15 | #' @examples \dontrun{ 16 | #' library(dplyr) 17 | #' library(streamgraph) 18 | #' ggplot2movies::movies %>% 19 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 20 | #' tidyr::gather(genre, value, -year) %>% 21 | #' group_by(year, genre) %>% 22 | #' tally(wt=value) %>% 23 | #' ungroup %>% 24 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 25 | #' 26 | #' streamgraph(dat, "genre", "n", "year") %>% 27 | #' sg_axis_x(20, "year", "%Y") 28 | #' } 29 | sg_axis_x <- function(sg, 30 | tick_interval=NULL, 31 | tick_units=NULL, 32 | tick_format=NULL) { 33 | 34 | if (!is.null(tick_interval))sg$x$x_tick_interval <- tick_interval 35 | if (!is.null(tick_units)) sg$x$x_tick_units <- tick_units 36 | if (!is.null(tick_format)) sg$x$x_tick_format <- tick_format 37 | 38 | sg 39 | 40 | } 41 | -------------------------------------------------------------------------------- /R/sg_axis_y.r: -------------------------------------------------------------------------------- 1 | #' Modify streamgraph y axis formatting 2 | #' 3 | #' Change the tick count & format 4 | #' 5 | #' @param sg streamgraph object 6 | #' @param tick_count number of y axis ticks, not tick interval (defaults to \code{5}); 7 | #' make this \code{0} if you want to hide the y axis labels 8 | #' @param tick_format d3 \href{https://github.com/mbostock/d3/wiki/Formatting#d3_format}{tick format} string 9 | #' @return streamgraph object 10 | #' @export 11 | #' @examples \dontrun{ 12 | #' library(dplyr) 13 | #' library(streamgraph) 14 | #' ggplot2movies::movies %>% 15 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 16 | #' tidyr::gather(genre, value, -year) %>% 17 | #' group_by(year, genre) %>% 18 | #' tally(wt=value) %>% 19 | #' ungroup %>% 20 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 21 | #' 22 | #' streamgraph(dat, "genre", "n", "year") %>% 23 | #' sg_axis_x(20, "year", "%Y") %>% 24 | #' sg_axis_y(0) 25 | #' }#' @export 26 | sg_axis_y <- function(sg, tick_count=5, tick_format=",g") { 27 | 28 | sg$x$y_tick_count <- tick_count 29 | sg$x$y_tick_format <- tick_format 30 | 31 | sg 32 | 33 | } 34 | -------------------------------------------------------------------------------- /R/shiny.r: -------------------------------------------------------------------------------- 1 | #' Widget output function for use in Shiny 2 | #' 3 | #' @param outputId outputId 4 | #' @param width width 5 | #' @param height height 6 | #' @export 7 | streamgraphOutput <- function(outputId, width = '100%', height = '400px'){ 8 | shinyWidgetOutput(outputId, 'streamgraph', width, height, package = 'streamgraph') 9 | } 10 | 11 | 12 | #' Widget render function for use in Shiny 13 | #' 14 | #' @param expr expr 15 | #' @param env env 16 | #' @param quoted quoted 17 | #' @export 18 | renderStreamgraph <- function(expr, env = parent.frame(), quoted = FALSE) { 19 | if (!quoted) { expr <- substitute(expr) } # force quoted 20 | shinyRenderWidget(expr, streamgraphOutput, env, quoted = TRUE) 21 | } 22 | -------------------------------------------------------------------------------- /R/streamgraph-package.R: -------------------------------------------------------------------------------- 1 | #' A package to make \href{http://www.leebyron.com/else/streamgraph/}{streamgraphs} 2 | #' @name streamgraph-package 3 | #' @docType package 4 | #' @author Bob Rudis (@@hrbrmstr) 5 | #' @import htmlwidgets htmltools xts 6 | #' @importFrom dplyr bind_rows arrange left_join mutate select 7 | NULL 8 | 9 | 10 | #' streamgraph exported operators 11 | #' 12 | #' The following functions are imported and then re-exported 13 | #' from the metricsgraphics package to enable use of the magrittr 14 | #' pipe operator with no additional library calls 15 | #' 16 | #' @name streamgraph-exports 17 | NULL 18 | 19 | #' @importFrom magrittr %>% 20 | #' @name %>% 21 | #' @export 22 | #' @rdname streamgraph-exports 23 | NULL 24 | -------------------------------------------------------------------------------- /R/streamgraph.R: -------------------------------------------------------------------------------- 1 | #' Create a new streamgraph 2 | #' 3 | #' \code{streamgraph()} initializes the streamgraph html widget 4 | #' and takes a data frame in "long" format with columns for the 5 | #' category (by default, it looks for \code{key}) and its associated 6 | #' \code{date} and \code{value}. You can supply the names for those 7 | #' columns if they aren't named as such in your data.\cr 8 | #' \cr 9 | #' By default, interactivity is on, but you can disable that by setting 10 | #' the \code{interactive} parameter to \code{FALSE}. 11 | #' 12 | #' @param data data frame 13 | #' @param key bare or quoted name of the category column (defaults to \code{key}) 14 | #' @param value bare or quoted name of the value column (defaults to \code{value}) 15 | #' @param date bare or quoted name of the date column (defaults to \code{date}) 16 | #' @param width Width in pixels (optional, defaults to automatic sizing) 17 | #' @param height Height in pixels (optional, defaults to automatic sizing) 18 | #' @param offset see d3's \href{https://github.com/mbostock/d3/wiki/Stack-Layout#offset}{offset layout} for more details. 19 | #' The default is probably fine for most uses but can be one of \code{silhouette} (default), 20 | #' \code{wiggle}, \code{expand} or \code{zero} 21 | #' @param interpolate see d3's \href{https://github.com/mbostock/d3/wiki/SVG-Shapes#area_interpolate}{area interpolation} for more details. 22 | #' The default is probably fine fore most uses, but can be one of \code{cardinal} (default), 23 | #' \code{linear}, \code{step}, \code{step-before}, \code{step-after}, \code{basis}, \code{basis-open}, 24 | #' \code{cardinal-open}, \code{monotone} 25 | #' @param interactive set to \code{FALSE} if you do not want an interactive streamgraph 26 | #' @param scale axis scale (\code{date} [default] or \code{continuous}) 27 | #' @param top top margin (default should be fine, this allows for fine-tuning plot space) 28 | #' @param right right margin (default should be fine, this allows for fine-tuning plot space) 29 | #' @param bottom bottom margin (default should be fine, this allows for fine-tuning plot space) 30 | #' @param left left margin (default should be fine, this allows for fine-tuning plot space) 31 | #' @param sort experimental 32 | #' @param complete experimental 33 | #' @param order streamgraph ribbon order. "`compat`" to match the orignial package behavior, 34 | #' "`asis`" to use the input order, "`inside-out`" to sort by index of maximum value, 35 | #' then use balanced weighting, or "`reverse`" to reverse the input layer order. 36 | #' @import htmlwidgets htmltools 37 | #' @importFrom tidyr expand 38 | #' @return streamgraph object 39 | #' @export 40 | #' @examples \dontrun{ 41 | #' library(dplyr) 42 | #' library(streamgraph) 43 | #' ggplot2movies::movies %>% 44 | #' select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 45 | #' tidyr::gather(genre, value, -year) %>% 46 | #' group_by(year, genre) %>% 47 | #' tally(wt=value) %>% 48 | #' ungroup %>% 49 | #' mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 50 | #' 51 | #' streamgraph(dat, "genre", "n", "year") 52 | #' } 53 | streamgraph <- function(data, 54 | key, 55 | value, 56 | date, 57 | width=NULL, height=NULL, 58 | offset="silhouette", 59 | interpolate="cardinal", 60 | interactive=TRUE, 61 | scale="date", 62 | top=20, 63 | right=40, 64 | bottom=30, 65 | left=50, 66 | sort=TRUE, 67 | complete=TRUE, 68 | order = c("compat", "asis", "inside-out", "reverse")) { 69 | 70 | order <- match.arg(order, choices = c("compat", "asis", "inside-out", "reverse")) 71 | if (order == "compat") order <- "none" 72 | if (order == "asis") order <- "default" 73 | 74 | if (!(offset %in% c("silhouette", "wiggle", "expand", "zero"))) { 75 | warning("'offset' does not have a valid value, defaulting to 'silhouette'") 76 | offset <- "silhouette" 77 | } 78 | 79 | if (!(interpolate %in% c("cardinal", "linear", "step", "step-before", 80 | "step-after", "basis", "basis-open", 81 | "cardinal-open", "monotone"))) { 82 | warning("'interpolate' does not have a valid value, defaulting to 'cardinal'") 83 | interpolate <- "cardinal" 84 | } 85 | 86 | if (!missing(key)) { 87 | key <- substitute(key) 88 | if (inherits(key, "name")) { key <- as.character(key) } 89 | } else { 90 | key <- "key" 91 | } 92 | 93 | if (!missing(value)) { 94 | value <- substitute(value) 95 | if (inherits(value, "name")) { value <- as.character(value) } 96 | } else { 97 | value <- "value" 98 | } 99 | 100 | if (!missing(date)) { 101 | date <- substitute(date) 102 | if (inherits(date, "name")) { date <- as.character(date) } 103 | } else { 104 | date <- "date" 105 | } 106 | 107 | data <- data.frame(data) 108 | data <- data[,c(key, value, date)] 109 | colnames(data) <- c("key", "value", "date") 110 | 111 | xtu <- "month" 112 | xtf <- "%b" 113 | xti <- 1 114 | 115 | if (scale=="date") { 116 | 117 | # date format 118 | 119 | if (all(class(data$date) %in% c("numeric", "character", "integer"))) { 120 | if (all(nchar(as.character(data$date)) == 4)) { 121 | data %>% 122 | mutate(date=sprintf("%04d-01-01", as.numeric(date))) -> data 123 | xtu <- "year" 124 | xtf <- "%Y" 125 | xti <- 10 126 | } 127 | } 128 | 129 | } else { 130 | 131 | xtu <- NULL 132 | xtf <- ",.0f" 133 | xti <- 10 134 | 135 | } 136 | 137 | # needs all combos, so we do the equiv of expand.grid, but w/dplyr & tidyr 138 | 139 | if (complete) { 140 | data %>% 141 | left_join(tidyr::expand(., key, date), ., by=c("key", "date")) %>% 142 | mutate(value=ifelse(is.na(value), 0, value)) %>% 143 | select(key, value, date) -> data 144 | } 145 | 146 | if (scale=="date") { 147 | 148 | # date format 149 | 150 | data %>% 151 | mutate(date=format(as.Date(date), "%Y-%m-%d")) %>% 152 | arrange(date) -> data 153 | 154 | } 155 | 156 | params = list( 157 | data=data, 158 | markers=NULL, 159 | annotations=NULL, 160 | offset=offset, 161 | interactive=interactive, 162 | interpolate=interpolate, 163 | palette="Spectral", 164 | text="black", 165 | tooltip="black", 166 | x_tick_interval=xti, 167 | x_tick_units=xtu, 168 | x_tick_format=xtf, 169 | y_tick_count=5, 170 | y_tick_format=",g", 171 | top=top, 172 | right=right, 173 | bottom=bottom, 174 | left=left, 175 | legend=FALSE, 176 | legend_label="", 177 | fill="brewer", 178 | label_col="black", 179 | x_scale=scale, 180 | sort=sort, 181 | order=order 182 | ) 183 | 184 | htmlwidgets::createWidget( 185 | name = 'streamgraph', 186 | x = params, 187 | width = width, 188 | height = height, 189 | package = 'streamgraph' 190 | ) 191 | 192 | } 193 | 194 | #' Add a title to the streamgraph 195 | #' 196 | #' @param sg streamgraph object 197 | #' @param title title 198 | #' @return THIS DOES NOT RETURN AN \code{htmlwidget}!! It returns a \code{shiny.tag} 199 | #' class HTML (the widget is wrapped in a \code{
}). It should be the LAST 200 | #' call in a magrittr pipe chain or called to wrap a streamgraph object for 201 | #' output 202 | #' @export 203 | sg_title <- function(sg, title="") { 204 | 205 | div(style="margin:auto;text-align:center", strong(title), br(), sg) 206 | 207 | } 208 | 209 | streamgraph_html <- function(id, style, class, width, height, ...) { 210 | list(tags$div(id = id, class = class, style = style), 211 | tags$div(id = sprintf("%s-legend", id), style=sprintf("width:%s", width), class = sprintf("%s-legend", class), 212 | HTML(sprintf("
", id, id)))) 213 | } 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /R/utils.R: -------------------------------------------------------------------------------- 1 | 2 | # taken from gplots pkg 3 | col2hex <- function (cname) { 4 | colMat <- col2rgb(cname) 5 | rgb(red = colMat[1, ]/255, green = colMat[2, ]/255, blue = colMat[3,]/255) 6 | } 7 | 8 | # ripped/modified from ggthemes pkg 9 | tableau_colors <- function(palette="tableau20") { 10 | 11 | x <- list( 12 | tableau20 = 13 | c("#1F77B4", 14 | "#AEC7E8", 15 | "#FF7F0E", 16 | "#FFBB78", 17 | "#2CA02C", 18 | "#98DF8A", 19 | "#D62728", 20 | "#FF9896", 21 | "#9467BD", 22 | "#C5B0D5", 23 | "#8C564B", 24 | "#C49C94", 25 | "#E377C2", 26 | "#F7B6D2", 27 | "#7F7F7F", 28 | "#C7C7C7", 29 | "#BCBD22", 30 | "#DBDB8D", 31 | "#17BECF", 32 | "#9EDAE5"), 33 | ## Tablau10 are odd, Tableau10-light are even 34 | tableau10medium = 35 | c("#729ECE", 36 | "#FF9E4A", 37 | "#67BF5C", 38 | "#ED665D", 39 | "#AD8BC9", 40 | "#A8786E", 41 | "#ED97CA", 42 | "#A2A2A2", 43 | "#CDCC5D", 44 | "#6DCCDA"), 45 | gray5 = 46 | c("#60636A", 47 | "#A5ACAF", 48 | "#414451", 49 | "#8F8782", 50 | "#CFCFCF"), 51 | colorblind10 = 52 | c("#006BA4", 53 | "#FF800E", 54 | "#ABABAB", 55 | "#595959", 56 | "#5F9ED1", 57 | "#C85200", 58 | "#898989", 59 | "#A2C8EC", 60 | "#FFBC79", 61 | "#CFCFCF"), 62 | trafficlight = 63 | c("#B10318", 64 | "#DBA13A", 65 | "#309343", 66 | "#D82526", 67 | "#FFC156", 68 | "#69B764", 69 | "#F26C64", 70 | "#FFDD71", 71 | "#9FCD99"), 72 | purplegray12 = 73 | c("#7B66D2", 74 | "#A699E8", 75 | "#DC5FBD", 76 | "#FFC0DA", 77 | "#5F5A41", 78 | "#B4B19B", 79 | "#995688", 80 | "#D898BA", 81 | "#AB6AD5", 82 | "#D098EE", 83 | "#8B7C6E", 84 | "#DBD4C5"), 85 | ## purplegray6 is oddd 86 | bluered12 = 87 | c("#2C69B0", 88 | "#B5C8E2", 89 | "#F02720", 90 | "#FFB6B0", 91 | "#AC613C", 92 | "#E9C39B", 93 | "#6BA3D6", 94 | "#B5DFFD", 95 | "#AC8763", 96 | "#DDC9B4", 97 | "#BD0A36", 98 | "#F4737A"), 99 | ## bluered6 is odd 100 | greenorange12 = 101 | c("#32A251", 102 | "#ACD98D", 103 | "#FF7F0F", 104 | "#FFB977", 105 | "#3CB7CC", 106 | "#98D9E4", 107 | "#B85A0D", 108 | "#FFD94A", 109 | "#39737C", 110 | "#86B4A9", 111 | "#82853B", 112 | "#CCC94D"), 113 | ## greenorange6 is odd 114 | cyclic = 115 | c("#1F83B4", 116 | "#1696AC", 117 | "#18A188", 118 | "#29A03C", 119 | "#54A338", 120 | "#82A93F", 121 | "#ADB828", 122 | "#D8BD35", 123 | "#FFBD4C", 124 | "#FFB022", 125 | "#FF9C0E", 126 | "#FF810E", 127 | "#E75727", 128 | "#D23E4E", 129 | "#C94D8C", 130 | "#C04AA7", 131 | "#B446B3", 132 | "#9658B1", 133 | "#8061B4", 134 | "#6F63BB") 135 | ) 136 | 137 | return(x[[palette]]) 138 | } -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "streamgraph" 3 | output: 4 | html_document: 5 | keep_md: true 6 | md_document: 7 | variant: markdown_github 8 | --- 9 | 10 | streamgraph is an htmlwidget for making, well, _streamgraphs_. 11 | 12 | ![example](example.png) 13 | 14 | [Sample Rmd](http://rpubs.com/hrbrmstr/59200) 15 | 16 | A streamgraph (or "stream graph") is a type of stacked area graph 17 | which is displaced around a central axis, resulting in a flowing, 18 | organic shape. Streamgraphs were developed by Lee Byron and popularized 19 | by their use in a February 2008 New York Times article on movie 20 | box office revenues. ([Wikipedia](http://en.wikipedia.org/wiki/Streamgraph)) 21 | 22 | The x axis values can be continous or dates. 23 | 24 | ### TODO 25 | 26 | - Support is planned for `xts` objects, but not for a bit. 27 | - Support for categorical/discrete x axis 28 | 29 | The following functions are implemented: 30 | 31 | - `streamgraph` : Create a new streamgraph 32 | - `sg_axis_x` : Modify streamgraph x axis formatting 33 | - `sg_axis_y` : Modify streamgraph y axis formatting 34 | - `sg_colors` : Modify streamgraph axis text, legend popup label text and tooltip text colors (NOTE: no longer modifies fill colors, use `sg_fill_*` for fill colors) 35 | - `sg_legend` : Add select menu "legend" to interactive streamgraphs 36 | - `sg_fill_brewer` : Specify a ColorBrewer palette to use for the stream fills 37 | - `sg_fill_manual` : Specify a manual color palette to use for the stream fills 38 | - `sg_fill_tableau` : Specify a Tableau color palette to use for the stream flls 39 | - `sg_add_marker` : Annotate streamgraph with vertical line and label 40 | - `sg_annotate` : Annotate streamgraph with a label 41 | 42 | ### News 43 | 44 | - Version `0.8.1` released - ggplot2 movies fix; corrected numerous notes from CRAN check 45 | - Version `0.8` released - support for negative Y axis numbers and upgrade to latest D3 46 | - Version `0.7.5` released - `key`, `value` and `date` can be either bare or quoted 47 | - Version `0.7` released - New `sg_add_marker` and `sg_annotation` to enable annotation of streamgraphs 48 | - Version `0.6` released - New `scale` parameter to `streamgraph` lets you choose between continuous or date scales. 49 | - Version `0.5.1` released - `sg_colors` now has nothing to do with the stream fills but _does_ set the axis text, legend popup label text and tooltip text. 50 | - Version `0.5` released - deprecated use of `sg_colors`. Its functionality will change soon and is replaced by three `sg_fill_*` functions (`brewer`, `manual` and `tableau`) which makes more sense, is aligned to the `ggplot2` way of specifying fill aesthetics and now makes it easier to highly customize the streamgraph appearance. 51 | - Versioin `0.4.2` released - fixed bug (thanks to teammate @bhaskarvk) that causes inconsistent color rendering for each area component (noticeable on resize of flexible width/height graphs) 52 | - Version `0.4.1` released - removed warning message when supplying `POSIXct` values (remember, `POSIXct` still only works for granularities >= 1 day) 53 | - Version `0.4` released - select menu "legend" (interactive only) 54 | - Version `0.3.1` released - bug fix to fix error with `d3.stack`; `streamgraph` will now see if the date input is a year and automatically convert it to the necessary format (no need to use `as.Date`) 55 | - Version `0.3` released - folks can have some fun with new `offset` and `interpolate` parameters to `streamgraph` 56 | - Version `0.2.2` relased - rly rly rly fixed tooltips now, also assed ability to format y axis text 57 | - Version `0.2.1` released - ok, working tool tips for realz now 58 | - Version `0.2` released - working SVG tooltips; general code cleanup 59 | - Version `0.1` released 60 | 61 | ### Installation 62 | 63 | ```{r eval=FALSE} 64 | devtools::install_github("hrbrmstr/streamgraph") 65 | ``` 66 | 67 | ```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE} 68 | options(width=120) 69 | ``` 70 | 71 | ### Usage 72 | 73 | ```{r eval=FALSE} 74 | library(streamgraph) 75 | 76 | # current verison 77 | packageVersion("streamgraph") 78 | 79 | library(dplyr) 80 | 81 | ggplot2movies::movies %>% 82 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 83 | tidyr::gather(genre, value, -year) %>% 84 | group_by(year, genre) %>% 85 | tally(wt=value) -> dat 86 | 87 | streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>% 88 | sg_axis_x(20, "year", "%Y") %>% 89 | sg_fill_brewer("PuOr") 90 | 91 | ``` 92 | 93 | --------------- 94 | 95 | Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # streamgraph 2 | 3 | streamgraph is an htmlwidget for making, well, _streamgraphs_. 4 | 5 | ![example](example.png) 6 | 7 | [Sample Rmd](http://rpubs.com/hrbrmstr/59200) 8 | 9 | A streamgraph (or "stream graph") is a type of stacked area graph 10 | which is displaced around a central axis, resulting in a flowing, 11 | organic shape. Streamgraphs were developed by Lee Byron and popularized 12 | by their use in a February 2008 New York Times article on movie 13 | box office revenues. ([Wikipedia](http://en.wikipedia.org/wiki/Streamgraph)) 14 | 15 | The x axis values can be continous or dates. 16 | 17 | ### TODO 18 | 19 | - Support is planned for `xts` objects, but not for a bit. 20 | - Support for categorical/discrete x axis 21 | 22 | The following functions are implemented: 23 | 24 | - `streamgraph` : Create a new streamgraph 25 | - `sg_axis_x` : Modify streamgraph x axis formatting 26 | - `sg_axis_y` : Modify streamgraph y axis formatting 27 | - `sg_colors` : Modify streamgraph axis text, legend popup label text and tooltip text colors (NOTE: no longer modifies fill colors, use `sg_fill_*` for fill colors) 28 | - `sg_legend` : Add select menu "legend" to interactive streamgraphs 29 | - `sg_fill_brewer` : Specify a ColorBrewer palette to use for the stream fills 30 | - `sg_fill_manual` : Specify a manual color palette to use for the stream fills 31 | - `sg_fill_tableau` : Specify a Tableau color palette to use for the stream flls 32 | - `sg_add_marker` : Annotate streamgraph with vertical line and label 33 | - `sg_annotate` : Annotate streamgraph with a label 34 | 35 | ### News 36 | 37 | - Version `0.8.1` released - ggplot2 movies fix; corrected numerous notes from CRAN check 38 | - Version `0.8` released - support for negative Y axis numbers and upgrade to latest D3 39 | - Version `0.7.5` released - `key`, `value` and `date` can be either bare or quoted 40 | - Version `0.7` released - New `sg_add_marker` and `sg_annotation` to enable annotation of streamgraphs 41 | - Version `0.6` released - New `scale` parameter to `streamgraph` lets you choose between continuous or date scales. 42 | - Version `0.5.1` released - `sg_colors` now has nothing to do with the stream fills but _does_ set the axis text, legend popup label text and tooltip text. 43 | - Version `0.5` released - deprecated use of `sg_colors`. Its functionality will change soon and is replaced by three `sg_fill_*` functions (`brewer`, `manual` and `tableau`) which makes more sense, is aligned to the `ggplot2` way of specifying fill aesthetics and now makes it easier to highly customize the streamgraph appearance. 44 | - Versioin `0.4.2` released - fixed bug (thanks to teammate @bhaskarvk) that causes inconsistent color rendering for each area component (noticeable on resize of flexible width/height graphs) 45 | - Version `0.4.1` released - removed warning message when supplying `POSIXct` values (remember, `POSIXct` still only works for granularities >= 1 day) 46 | - Version `0.4` released - select menu "legend" (interactive only) 47 | - Version `0.3.1` released - bug fix to fix error with `d3.stack`; `streamgraph` will now see if the date input is a year and automatically convert it to the necessary format (no need to use `as.Date`) 48 | - Version `0.3` released - folks can have some fun with new `offset` and `interpolate` parameters to `streamgraph` 49 | - Version `0.2.2` relased - rly rly rly fixed tooltips now, also assed ability to format y axis text 50 | - Version `0.2.1` released - ok, working tool tips for realz now 51 | - Version `0.2` released - working SVG tooltips; general code cleanup 52 | - Version `0.1` released 53 | 54 | ### Installation 55 | 56 | 57 | ```r 58 | devtools::install_github("hrbrmstr/streamgraph") 59 | ``` 60 | 61 | 62 | 63 | ### Usage 64 | 65 | 66 | ```r 67 | library(streamgraph) 68 | 69 | # current verison 70 | packageVersion("streamgraph") 71 | 72 | library(dplyr) 73 | 74 | ggplot2movies::movies %>% 75 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 76 | tidyr::gather(genre, value, -year) %>% 77 | group_by(year, genre) %>% 78 | tally(wt=value) -> dat 79 | 80 | streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>% 81 | sg_axis_x(20, "year", "%Y") %>% 82 | sg_fill_brewer("PuOr") 83 | ``` 84 | 85 | --------------- 86 | 87 | Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. 88 | -------------------------------------------------------------------------------- /example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/streamgraph/76f7173ec89d456ace5943a512e20b1f6810bbcb/example.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/colorbrewer/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache-Style Software License for ColorBrewer software and ColorBrewer Color 2 | Schemes 3 | 4 | Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State 5 | University. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); you may not 8 | use this file except in compliance with the License. You may obtain a copy of 9 | the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | License for the specific language governing permissions and limitations under 17 | the License. 18 | 19 | Redistribution and use in source and binary forms, with or without 20 | modification, are permitted provided that the following conditions are met: 21 | 22 | 1. Redistributions as source code must retain the above copyright notice, this 23 | list of conditions and the following disclaimer. 24 | 25 | 2. The end-user documentation included with the redistribution, if any, must 26 | include the following acknowledgment: "This product includes color 27 | specifications and designs developed by Cynthia Brewer 28 | (http://colorbrewer.org/)." Alternately, this acknowledgment may appear in the 29 | software itself, if and wherever such third-party acknowledgments normally 30 | appear. 31 | 32 | 4. The name "ColorBrewer" must not be used to endorse or promote products 33 | derived from this software without prior written permission. For written 34 | permission, please contact Cynthia Brewer at cbrewer@psu.edu. 35 | 36 | 5. Products derived from this software may not be called "ColorBrewer", nor 37 | may "ColorBrewer" appear in their name, without prior written permission of 38 | Cynthia Brewer. 39 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/colorbrewer/colorbrewer.css: -------------------------------------------------------------------------------- 1 | /* This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). */ 2 | .YlGn .q0-3{fill:rgb(247,252,185)} 3 | .YlGn .q1-3{fill:rgb(173,221,142)} 4 | .YlGn .q2-3{fill:rgb(49,163,84)} 5 | .YlGn .q0-4{fill:rgb(255,255,204)} 6 | .YlGn .q1-4{fill:rgb(194,230,153)} 7 | .YlGn .q2-4{fill:rgb(120,198,121)} 8 | .YlGn .q3-4{fill:rgb(35,132,67)} 9 | .YlGn .q0-5{fill:rgb(255,255,204)} 10 | .YlGn .q1-5{fill:rgb(194,230,153)} 11 | .YlGn .q2-5{fill:rgb(120,198,121)} 12 | .YlGn .q3-5{fill:rgb(49,163,84)} 13 | .YlGn .q4-5{fill:rgb(0,104,55)} 14 | .YlGn .q0-6{fill:rgb(255,255,204)} 15 | .YlGn .q1-6{fill:rgb(217,240,163)} 16 | .YlGn .q2-6{fill:rgb(173,221,142)} 17 | .YlGn .q3-6{fill:rgb(120,198,121)} 18 | .YlGn .q4-6{fill:rgb(49,163,84)} 19 | .YlGn .q5-6{fill:rgb(0,104,55)} 20 | .YlGn .q0-7{fill:rgb(255,255,204)} 21 | .YlGn .q1-7{fill:rgb(217,240,163)} 22 | .YlGn .q2-7{fill:rgb(173,221,142)} 23 | .YlGn .q3-7{fill:rgb(120,198,121)} 24 | .YlGn .q4-7{fill:rgb(65,171,93)} 25 | .YlGn .q5-7{fill:rgb(35,132,67)} 26 | .YlGn .q6-7{fill:rgb(0,90,50)} 27 | .YlGn .q0-8{fill:rgb(255,255,229)} 28 | .YlGn .q1-8{fill:rgb(247,252,185)} 29 | .YlGn .q2-8{fill:rgb(217,240,163)} 30 | .YlGn .q3-8{fill:rgb(173,221,142)} 31 | .YlGn .q4-8{fill:rgb(120,198,121)} 32 | .YlGn .q5-8{fill:rgb(65,171,93)} 33 | .YlGn .q6-8{fill:rgb(35,132,67)} 34 | .YlGn .q7-8{fill:rgb(0,90,50)} 35 | .YlGn .q0-9{fill:rgb(255,255,229)} 36 | .YlGn .q1-9{fill:rgb(247,252,185)} 37 | .YlGn .q2-9{fill:rgb(217,240,163)} 38 | .YlGn .q3-9{fill:rgb(173,221,142)} 39 | .YlGn .q4-9{fill:rgb(120,198,121)} 40 | .YlGn .q5-9{fill:rgb(65,171,93)} 41 | .YlGn .q6-9{fill:rgb(35,132,67)} 42 | .YlGn .q7-9{fill:rgb(0,104,55)} 43 | .YlGn .q8-9{fill:rgb(0,69,41)} 44 | .YlGnBu .q0-3{fill:rgb(237,248,177)} 45 | .YlGnBu .q1-3{fill:rgb(127,205,187)} 46 | .YlGnBu .q2-3{fill:rgb(44,127,184)} 47 | .YlGnBu .q0-4{fill:rgb(255,255,204)} 48 | .YlGnBu .q1-4{fill:rgb(161,218,180)} 49 | .YlGnBu .q2-4{fill:rgb(65,182,196)} 50 | .YlGnBu .q3-4{fill:rgb(34,94,168)} 51 | .YlGnBu .q0-5{fill:rgb(255,255,204)} 52 | .YlGnBu .q1-5{fill:rgb(161,218,180)} 53 | .YlGnBu .q2-5{fill:rgb(65,182,196)} 54 | .YlGnBu .q3-5{fill:rgb(44,127,184)} 55 | .YlGnBu .q4-5{fill:rgb(37,52,148)} 56 | .YlGnBu .q0-6{fill:rgb(255,255,204)} 57 | .YlGnBu .q1-6{fill:rgb(199,233,180)} 58 | .YlGnBu .q2-6{fill:rgb(127,205,187)} 59 | .YlGnBu .q3-6{fill:rgb(65,182,196)} 60 | .YlGnBu .q4-6{fill:rgb(44,127,184)} 61 | .YlGnBu .q5-6{fill:rgb(37,52,148)} 62 | .YlGnBu .q0-7{fill:rgb(255,255,204)} 63 | .YlGnBu .q1-7{fill:rgb(199,233,180)} 64 | .YlGnBu .q2-7{fill:rgb(127,205,187)} 65 | .YlGnBu .q3-7{fill:rgb(65,182,196)} 66 | .YlGnBu .q4-7{fill:rgb(29,145,192)} 67 | .YlGnBu .q5-7{fill:rgb(34,94,168)} 68 | .YlGnBu .q6-7{fill:rgb(12,44,132)} 69 | .YlGnBu .q0-8{fill:rgb(255,255,217)} 70 | .YlGnBu .q1-8{fill:rgb(237,248,177)} 71 | .YlGnBu .q2-8{fill:rgb(199,233,180)} 72 | .YlGnBu .q3-8{fill:rgb(127,205,187)} 73 | .YlGnBu .q4-8{fill:rgb(65,182,196)} 74 | .YlGnBu .q5-8{fill:rgb(29,145,192)} 75 | .YlGnBu .q6-8{fill:rgb(34,94,168)} 76 | .YlGnBu .q7-8{fill:rgb(12,44,132)} 77 | .YlGnBu .q0-9{fill:rgb(255,255,217)} 78 | .YlGnBu .q1-9{fill:rgb(237,248,177)} 79 | .YlGnBu .q2-9{fill:rgb(199,233,180)} 80 | .YlGnBu .q3-9{fill:rgb(127,205,187)} 81 | .YlGnBu .q4-9{fill:rgb(65,182,196)} 82 | .YlGnBu .q5-9{fill:rgb(29,145,192)} 83 | .YlGnBu .q6-9{fill:rgb(34,94,168)} 84 | .YlGnBu .q7-9{fill:rgb(37,52,148)} 85 | .YlGnBu .q8-9{fill:rgb(8,29,88)} 86 | .GnBu .q0-3{fill:rgb(224,243,219)} 87 | .GnBu .q1-3{fill:rgb(168,221,181)} 88 | .GnBu .q2-3{fill:rgb(67,162,202)} 89 | .GnBu .q0-4{fill:rgb(240,249,232)} 90 | .GnBu .q1-4{fill:rgb(186,228,188)} 91 | .GnBu .q2-4{fill:rgb(123,204,196)} 92 | .GnBu .q3-4{fill:rgb(43,140,190)} 93 | .GnBu .q0-5{fill:rgb(240,249,232)} 94 | .GnBu .q1-5{fill:rgb(186,228,188)} 95 | .GnBu .q2-5{fill:rgb(123,204,196)} 96 | .GnBu .q3-5{fill:rgb(67,162,202)} 97 | .GnBu .q4-5{fill:rgb(8,104,172)} 98 | .GnBu .q0-6{fill:rgb(240,249,232)} 99 | .GnBu .q1-6{fill:rgb(204,235,197)} 100 | .GnBu .q2-6{fill:rgb(168,221,181)} 101 | .GnBu .q3-6{fill:rgb(123,204,196)} 102 | .GnBu .q4-6{fill:rgb(67,162,202)} 103 | .GnBu .q5-6{fill:rgb(8,104,172)} 104 | .GnBu .q0-7{fill:rgb(240,249,232)} 105 | .GnBu .q1-7{fill:rgb(204,235,197)} 106 | .GnBu .q2-7{fill:rgb(168,221,181)} 107 | .GnBu .q3-7{fill:rgb(123,204,196)} 108 | .GnBu .q4-7{fill:rgb(78,179,211)} 109 | .GnBu .q5-7{fill:rgb(43,140,190)} 110 | .GnBu .q6-7{fill:rgb(8,88,158)} 111 | .GnBu .q0-8{fill:rgb(247,252,240)} 112 | .GnBu .q1-8{fill:rgb(224,243,219)} 113 | .GnBu .q2-8{fill:rgb(204,235,197)} 114 | .GnBu .q3-8{fill:rgb(168,221,181)} 115 | .GnBu .q4-8{fill:rgb(123,204,196)} 116 | .GnBu .q5-8{fill:rgb(78,179,211)} 117 | .GnBu .q6-8{fill:rgb(43,140,190)} 118 | .GnBu .q7-8{fill:rgb(8,88,158)} 119 | .GnBu .q0-9{fill:rgb(247,252,240)} 120 | .GnBu .q1-9{fill:rgb(224,243,219)} 121 | .GnBu .q2-9{fill:rgb(204,235,197)} 122 | .GnBu .q3-9{fill:rgb(168,221,181)} 123 | .GnBu .q4-9{fill:rgb(123,204,196)} 124 | .GnBu .q5-9{fill:rgb(78,179,211)} 125 | .GnBu .q6-9{fill:rgb(43,140,190)} 126 | .GnBu .q7-9{fill:rgb(8,104,172)} 127 | .GnBu .q8-9{fill:rgb(8,64,129)} 128 | .BuGn .q0-3{fill:rgb(229,245,249)} 129 | .BuGn .q1-3{fill:rgb(153,216,201)} 130 | .BuGn .q2-3{fill:rgb(44,162,95)} 131 | .BuGn .q0-4{fill:rgb(237,248,251)} 132 | .BuGn .q1-4{fill:rgb(178,226,226)} 133 | .BuGn .q2-4{fill:rgb(102,194,164)} 134 | .BuGn .q3-4{fill:rgb(35,139,69)} 135 | .BuGn .q0-5{fill:rgb(237,248,251)} 136 | .BuGn .q1-5{fill:rgb(178,226,226)} 137 | .BuGn .q2-5{fill:rgb(102,194,164)} 138 | .BuGn .q3-5{fill:rgb(44,162,95)} 139 | .BuGn .q4-5{fill:rgb(0,109,44)} 140 | .BuGn .q0-6{fill:rgb(237,248,251)} 141 | .BuGn .q1-6{fill:rgb(204,236,230)} 142 | .BuGn .q2-6{fill:rgb(153,216,201)} 143 | .BuGn .q3-6{fill:rgb(102,194,164)} 144 | .BuGn .q4-6{fill:rgb(44,162,95)} 145 | .BuGn .q5-6{fill:rgb(0,109,44)} 146 | .BuGn .q0-7{fill:rgb(237,248,251)} 147 | .BuGn .q1-7{fill:rgb(204,236,230)} 148 | .BuGn .q2-7{fill:rgb(153,216,201)} 149 | .BuGn .q3-7{fill:rgb(102,194,164)} 150 | .BuGn .q4-7{fill:rgb(65,174,118)} 151 | .BuGn .q5-7{fill:rgb(35,139,69)} 152 | .BuGn .q6-7{fill:rgb(0,88,36)} 153 | .BuGn .q0-8{fill:rgb(247,252,253)} 154 | .BuGn .q1-8{fill:rgb(229,245,249)} 155 | .BuGn .q2-8{fill:rgb(204,236,230)} 156 | .BuGn .q3-8{fill:rgb(153,216,201)} 157 | .BuGn .q4-8{fill:rgb(102,194,164)} 158 | .BuGn .q5-8{fill:rgb(65,174,118)} 159 | .BuGn .q6-8{fill:rgb(35,139,69)} 160 | .BuGn .q7-8{fill:rgb(0,88,36)} 161 | .BuGn .q0-9{fill:rgb(247,252,253)} 162 | .BuGn .q1-9{fill:rgb(229,245,249)} 163 | .BuGn .q2-9{fill:rgb(204,236,230)} 164 | .BuGn .q3-9{fill:rgb(153,216,201)} 165 | .BuGn .q4-9{fill:rgb(102,194,164)} 166 | .BuGn .q5-9{fill:rgb(65,174,118)} 167 | .BuGn .q6-9{fill:rgb(35,139,69)} 168 | .BuGn .q7-9{fill:rgb(0,109,44)} 169 | .BuGn .q8-9{fill:rgb(0,68,27)} 170 | .PuBuGn .q0-3{fill:rgb(236,226,240)} 171 | .PuBuGn .q1-3{fill:rgb(166,189,219)} 172 | .PuBuGn .q2-3{fill:rgb(28,144,153)} 173 | .PuBuGn .q0-4{fill:rgb(246,239,247)} 174 | .PuBuGn .q1-4{fill:rgb(189,201,225)} 175 | .PuBuGn .q2-4{fill:rgb(103,169,207)} 176 | .PuBuGn .q3-4{fill:rgb(2,129,138)} 177 | .PuBuGn .q0-5{fill:rgb(246,239,247)} 178 | .PuBuGn .q1-5{fill:rgb(189,201,225)} 179 | .PuBuGn .q2-5{fill:rgb(103,169,207)} 180 | .PuBuGn .q3-5{fill:rgb(28,144,153)} 181 | .PuBuGn .q4-5{fill:rgb(1,108,89)} 182 | .PuBuGn .q0-6{fill:rgb(246,239,247)} 183 | .PuBuGn .q1-6{fill:rgb(208,209,230)} 184 | .PuBuGn .q2-6{fill:rgb(166,189,219)} 185 | .PuBuGn .q3-6{fill:rgb(103,169,207)} 186 | .PuBuGn .q4-6{fill:rgb(28,144,153)} 187 | .PuBuGn .q5-6{fill:rgb(1,108,89)} 188 | .PuBuGn .q0-7{fill:rgb(246,239,247)} 189 | .PuBuGn .q1-7{fill:rgb(208,209,230)} 190 | .PuBuGn .q2-7{fill:rgb(166,189,219)} 191 | .PuBuGn .q3-7{fill:rgb(103,169,207)} 192 | .PuBuGn .q4-7{fill:rgb(54,144,192)} 193 | .PuBuGn .q5-7{fill:rgb(2,129,138)} 194 | .PuBuGn .q6-7{fill:rgb(1,100,80)} 195 | .PuBuGn .q0-8{fill:rgb(255,247,251)} 196 | .PuBuGn .q1-8{fill:rgb(236,226,240)} 197 | .PuBuGn .q2-8{fill:rgb(208,209,230)} 198 | .PuBuGn .q3-8{fill:rgb(166,189,219)} 199 | .PuBuGn .q4-8{fill:rgb(103,169,207)} 200 | .PuBuGn .q5-8{fill:rgb(54,144,192)} 201 | .PuBuGn .q6-8{fill:rgb(2,129,138)} 202 | .PuBuGn .q7-8{fill:rgb(1,100,80)} 203 | .PuBuGn .q0-9{fill:rgb(255,247,251)} 204 | .PuBuGn .q1-9{fill:rgb(236,226,240)} 205 | .PuBuGn .q2-9{fill:rgb(208,209,230)} 206 | .PuBuGn .q3-9{fill:rgb(166,189,219)} 207 | .PuBuGn .q4-9{fill:rgb(103,169,207)} 208 | .PuBuGn .q5-9{fill:rgb(54,144,192)} 209 | .PuBuGn .q6-9{fill:rgb(2,129,138)} 210 | .PuBuGn .q7-9{fill:rgb(1,108,89)} 211 | .PuBuGn .q8-9{fill:rgb(1,70,54)} 212 | .PuBu .q0-3{fill:rgb(236,231,242)} 213 | .PuBu .q1-3{fill:rgb(166,189,219)} 214 | .PuBu .q2-3{fill:rgb(43,140,190)} 215 | .PuBu .q0-4{fill:rgb(241,238,246)} 216 | .PuBu .q1-4{fill:rgb(189,201,225)} 217 | .PuBu .q2-4{fill:rgb(116,169,207)} 218 | .PuBu .q3-4{fill:rgb(5,112,176)} 219 | .PuBu .q0-5{fill:rgb(241,238,246)} 220 | .PuBu .q1-5{fill:rgb(189,201,225)} 221 | .PuBu .q2-5{fill:rgb(116,169,207)} 222 | .PuBu .q3-5{fill:rgb(43,140,190)} 223 | .PuBu .q4-5{fill:rgb(4,90,141)} 224 | .PuBu .q0-6{fill:rgb(241,238,246)} 225 | .PuBu .q1-6{fill:rgb(208,209,230)} 226 | .PuBu .q2-6{fill:rgb(166,189,219)} 227 | .PuBu .q3-6{fill:rgb(116,169,207)} 228 | .PuBu .q4-6{fill:rgb(43,140,190)} 229 | .PuBu .q5-6{fill:rgb(4,90,141)} 230 | .PuBu .q0-7{fill:rgb(241,238,246)} 231 | .PuBu .q1-7{fill:rgb(208,209,230)} 232 | .PuBu .q2-7{fill:rgb(166,189,219)} 233 | .PuBu .q3-7{fill:rgb(116,169,207)} 234 | .PuBu .q4-7{fill:rgb(54,144,192)} 235 | .PuBu .q5-7{fill:rgb(5,112,176)} 236 | .PuBu .q6-7{fill:rgb(3,78,123)} 237 | .PuBu .q0-8{fill:rgb(255,247,251)} 238 | .PuBu .q1-8{fill:rgb(236,231,242)} 239 | .PuBu .q2-8{fill:rgb(208,209,230)} 240 | .PuBu .q3-8{fill:rgb(166,189,219)} 241 | .PuBu .q4-8{fill:rgb(116,169,207)} 242 | .PuBu .q5-8{fill:rgb(54,144,192)} 243 | .PuBu .q6-8{fill:rgb(5,112,176)} 244 | .PuBu .q7-8{fill:rgb(3,78,123)} 245 | .PuBu .q0-9{fill:rgb(255,247,251)} 246 | .PuBu .q1-9{fill:rgb(236,231,242)} 247 | .PuBu .q2-9{fill:rgb(208,209,230)} 248 | .PuBu .q3-9{fill:rgb(166,189,219)} 249 | .PuBu .q4-9{fill:rgb(116,169,207)} 250 | .PuBu .q5-9{fill:rgb(54,144,192)} 251 | .PuBu .q6-9{fill:rgb(5,112,176)} 252 | .PuBu .q7-9{fill:rgb(4,90,141)} 253 | .PuBu .q8-9{fill:rgb(2,56,88)} 254 | .BuPu .q0-3{fill:rgb(224,236,244)} 255 | .BuPu .q1-3{fill:rgb(158,188,218)} 256 | .BuPu .q2-3{fill:rgb(136,86,167)} 257 | .BuPu .q0-4{fill:rgb(237,248,251)} 258 | .BuPu .q1-4{fill:rgb(179,205,227)} 259 | .BuPu .q2-4{fill:rgb(140,150,198)} 260 | .BuPu .q3-4{fill:rgb(136,65,157)} 261 | .BuPu .q0-5{fill:rgb(237,248,251)} 262 | .BuPu .q1-5{fill:rgb(179,205,227)} 263 | .BuPu .q2-5{fill:rgb(140,150,198)} 264 | .BuPu .q3-5{fill:rgb(136,86,167)} 265 | .BuPu .q4-5{fill:rgb(129,15,124)} 266 | .BuPu .q0-6{fill:rgb(237,248,251)} 267 | .BuPu .q1-6{fill:rgb(191,211,230)} 268 | .BuPu .q2-6{fill:rgb(158,188,218)} 269 | .BuPu .q3-6{fill:rgb(140,150,198)} 270 | .BuPu .q4-6{fill:rgb(136,86,167)} 271 | .BuPu .q5-6{fill:rgb(129,15,124)} 272 | .BuPu .q0-7{fill:rgb(237,248,251)} 273 | .BuPu .q1-7{fill:rgb(191,211,230)} 274 | .BuPu .q2-7{fill:rgb(158,188,218)} 275 | .BuPu .q3-7{fill:rgb(140,150,198)} 276 | .BuPu .q4-7{fill:rgb(140,107,177)} 277 | .BuPu .q5-7{fill:rgb(136,65,157)} 278 | .BuPu .q6-7{fill:rgb(110,1,107)} 279 | .BuPu .q0-8{fill:rgb(247,252,253)} 280 | .BuPu .q1-8{fill:rgb(224,236,244)} 281 | .BuPu .q2-8{fill:rgb(191,211,230)} 282 | .BuPu .q3-8{fill:rgb(158,188,218)} 283 | .BuPu .q4-8{fill:rgb(140,150,198)} 284 | .BuPu .q5-8{fill:rgb(140,107,177)} 285 | .BuPu .q6-8{fill:rgb(136,65,157)} 286 | .BuPu .q7-8{fill:rgb(110,1,107)} 287 | .BuPu .q0-9{fill:rgb(247,252,253)} 288 | .BuPu .q1-9{fill:rgb(224,236,244)} 289 | .BuPu .q2-9{fill:rgb(191,211,230)} 290 | .BuPu .q3-9{fill:rgb(158,188,218)} 291 | .BuPu .q4-9{fill:rgb(140,150,198)} 292 | .BuPu .q5-9{fill:rgb(140,107,177)} 293 | .BuPu .q6-9{fill:rgb(136,65,157)} 294 | .BuPu .q7-9{fill:rgb(129,15,124)} 295 | .BuPu .q8-9{fill:rgb(77,0,75)} 296 | .RdPu .q0-3{fill:rgb(253,224,221)} 297 | .RdPu .q1-3{fill:rgb(250,159,181)} 298 | .RdPu .q2-3{fill:rgb(197,27,138)} 299 | .RdPu .q0-4{fill:rgb(254,235,226)} 300 | .RdPu .q1-4{fill:rgb(251,180,185)} 301 | .RdPu .q2-4{fill:rgb(247,104,161)} 302 | .RdPu .q3-4{fill:rgb(174,1,126)} 303 | .RdPu .q0-5{fill:rgb(254,235,226)} 304 | .RdPu .q1-5{fill:rgb(251,180,185)} 305 | .RdPu .q2-5{fill:rgb(247,104,161)} 306 | .RdPu .q3-5{fill:rgb(197,27,138)} 307 | .RdPu .q4-5{fill:rgb(122,1,119)} 308 | .RdPu .q0-6{fill:rgb(254,235,226)} 309 | .RdPu .q1-6{fill:rgb(252,197,192)} 310 | .RdPu .q2-6{fill:rgb(250,159,181)} 311 | .RdPu .q3-6{fill:rgb(247,104,161)} 312 | .RdPu .q4-6{fill:rgb(197,27,138)} 313 | .RdPu .q5-6{fill:rgb(122,1,119)} 314 | .RdPu .q0-7{fill:rgb(254,235,226)} 315 | .RdPu .q1-7{fill:rgb(252,197,192)} 316 | .RdPu .q2-7{fill:rgb(250,159,181)} 317 | .RdPu .q3-7{fill:rgb(247,104,161)} 318 | .RdPu .q4-7{fill:rgb(221,52,151)} 319 | .RdPu .q5-7{fill:rgb(174,1,126)} 320 | .RdPu .q6-7{fill:rgb(122,1,119)} 321 | .RdPu .q0-8{fill:rgb(255,247,243)} 322 | .RdPu .q1-8{fill:rgb(253,224,221)} 323 | .RdPu .q2-8{fill:rgb(252,197,192)} 324 | .RdPu .q3-8{fill:rgb(250,159,181)} 325 | .RdPu .q4-8{fill:rgb(247,104,161)} 326 | .RdPu .q5-8{fill:rgb(221,52,151)} 327 | .RdPu .q6-8{fill:rgb(174,1,126)} 328 | .RdPu .q7-8{fill:rgb(122,1,119)} 329 | .RdPu .q0-9{fill:rgb(255,247,243)} 330 | .RdPu .q1-9{fill:rgb(253,224,221)} 331 | .RdPu .q2-9{fill:rgb(252,197,192)} 332 | .RdPu .q3-9{fill:rgb(250,159,181)} 333 | .RdPu .q4-9{fill:rgb(247,104,161)} 334 | .RdPu .q5-9{fill:rgb(221,52,151)} 335 | .RdPu .q6-9{fill:rgb(174,1,126)} 336 | .RdPu .q7-9{fill:rgb(122,1,119)} 337 | .RdPu .q8-9{fill:rgb(73,0,106)} 338 | .PuRd .q0-3{fill:rgb(231,225,239)} 339 | .PuRd .q1-3{fill:rgb(201,148,199)} 340 | .PuRd .q2-3{fill:rgb(221,28,119)} 341 | .PuRd .q0-4{fill:rgb(241,238,246)} 342 | .PuRd .q1-4{fill:rgb(215,181,216)} 343 | .PuRd .q2-4{fill:rgb(223,101,176)} 344 | .PuRd .q3-4{fill:rgb(206,18,86)} 345 | .PuRd .q0-5{fill:rgb(241,238,246)} 346 | .PuRd .q1-5{fill:rgb(215,181,216)} 347 | .PuRd .q2-5{fill:rgb(223,101,176)} 348 | .PuRd .q3-5{fill:rgb(221,28,119)} 349 | .PuRd .q4-5{fill:rgb(152,0,67)} 350 | .PuRd .q0-6{fill:rgb(241,238,246)} 351 | .PuRd .q1-6{fill:rgb(212,185,218)} 352 | .PuRd .q2-6{fill:rgb(201,148,199)} 353 | .PuRd .q3-6{fill:rgb(223,101,176)} 354 | .PuRd .q4-6{fill:rgb(221,28,119)} 355 | .PuRd .q5-6{fill:rgb(152,0,67)} 356 | .PuRd .q0-7{fill:rgb(241,238,246)} 357 | .PuRd .q1-7{fill:rgb(212,185,218)} 358 | .PuRd .q2-7{fill:rgb(201,148,199)} 359 | .PuRd .q3-7{fill:rgb(223,101,176)} 360 | .PuRd .q4-7{fill:rgb(231,41,138)} 361 | .PuRd .q5-7{fill:rgb(206,18,86)} 362 | .PuRd .q6-7{fill:rgb(145,0,63)} 363 | .PuRd .q0-8{fill:rgb(247,244,249)} 364 | .PuRd .q1-8{fill:rgb(231,225,239)} 365 | .PuRd .q2-8{fill:rgb(212,185,218)} 366 | .PuRd .q3-8{fill:rgb(201,148,199)} 367 | .PuRd .q4-8{fill:rgb(223,101,176)} 368 | .PuRd .q5-8{fill:rgb(231,41,138)} 369 | .PuRd .q6-8{fill:rgb(206,18,86)} 370 | .PuRd .q7-8{fill:rgb(145,0,63)} 371 | .PuRd .q0-9{fill:rgb(247,244,249)} 372 | .PuRd .q1-9{fill:rgb(231,225,239)} 373 | .PuRd .q2-9{fill:rgb(212,185,218)} 374 | .PuRd .q3-9{fill:rgb(201,148,199)} 375 | .PuRd .q4-9{fill:rgb(223,101,176)} 376 | .PuRd .q5-9{fill:rgb(231,41,138)} 377 | .PuRd .q6-9{fill:rgb(206,18,86)} 378 | .PuRd .q7-9{fill:rgb(152,0,67)} 379 | .PuRd .q8-9{fill:rgb(103,0,31)} 380 | .OrRd .q0-3{fill:rgb(254,232,200)} 381 | .OrRd .q1-3{fill:rgb(253,187,132)} 382 | .OrRd .q2-3{fill:rgb(227,74,51)} 383 | .OrRd .q0-4{fill:rgb(254,240,217)} 384 | .OrRd .q1-4{fill:rgb(253,204,138)} 385 | .OrRd .q2-4{fill:rgb(252,141,89)} 386 | .OrRd .q3-4{fill:rgb(215,48,31)} 387 | .OrRd .q0-5{fill:rgb(254,240,217)} 388 | .OrRd .q1-5{fill:rgb(253,204,138)} 389 | .OrRd .q2-5{fill:rgb(252,141,89)} 390 | .OrRd .q3-5{fill:rgb(227,74,51)} 391 | .OrRd .q4-5{fill:rgb(179,0,0)} 392 | .OrRd .q0-6{fill:rgb(254,240,217)} 393 | .OrRd .q1-6{fill:rgb(253,212,158)} 394 | .OrRd .q2-6{fill:rgb(253,187,132)} 395 | .OrRd .q3-6{fill:rgb(252,141,89)} 396 | .OrRd .q4-6{fill:rgb(227,74,51)} 397 | .OrRd .q5-6{fill:rgb(179,0,0)} 398 | .OrRd .q0-7{fill:rgb(254,240,217)} 399 | .OrRd .q1-7{fill:rgb(253,212,158)} 400 | .OrRd .q2-7{fill:rgb(253,187,132)} 401 | .OrRd .q3-7{fill:rgb(252,141,89)} 402 | .OrRd .q4-7{fill:rgb(239,101,72)} 403 | .OrRd .q5-7{fill:rgb(215,48,31)} 404 | .OrRd .q6-7{fill:rgb(153,0,0)} 405 | .OrRd .q0-8{fill:rgb(255,247,236)} 406 | .OrRd .q1-8{fill:rgb(254,232,200)} 407 | .OrRd .q2-8{fill:rgb(253,212,158)} 408 | .OrRd .q3-8{fill:rgb(253,187,132)} 409 | .OrRd .q4-8{fill:rgb(252,141,89)} 410 | .OrRd .q5-8{fill:rgb(239,101,72)} 411 | .OrRd .q6-8{fill:rgb(215,48,31)} 412 | .OrRd .q7-8{fill:rgb(153,0,0)} 413 | .OrRd .q0-9{fill:rgb(255,247,236)} 414 | .OrRd .q1-9{fill:rgb(254,232,200)} 415 | .OrRd .q2-9{fill:rgb(253,212,158)} 416 | .OrRd .q3-9{fill:rgb(253,187,132)} 417 | .OrRd .q4-9{fill:rgb(252,141,89)} 418 | .OrRd .q5-9{fill:rgb(239,101,72)} 419 | .OrRd .q6-9{fill:rgb(215,48,31)} 420 | .OrRd .q7-9{fill:rgb(179,0,0)} 421 | .OrRd .q8-9{fill:rgb(127,0,0)} 422 | .YlOrRd .q0-3{fill:rgb(255,237,160)} 423 | .YlOrRd .q1-3{fill:rgb(254,178,76)} 424 | .YlOrRd .q2-3{fill:rgb(240,59,32)} 425 | .YlOrRd .q0-4{fill:rgb(255,255,178)} 426 | .YlOrRd .q1-4{fill:rgb(254,204,92)} 427 | .YlOrRd .q2-4{fill:rgb(253,141,60)} 428 | .YlOrRd .q3-4{fill:rgb(227,26,28)} 429 | .YlOrRd .q0-5{fill:rgb(255,255,178)} 430 | .YlOrRd .q1-5{fill:rgb(254,204,92)} 431 | .YlOrRd .q2-5{fill:rgb(253,141,60)} 432 | .YlOrRd .q3-5{fill:rgb(240,59,32)} 433 | .YlOrRd .q4-5{fill:rgb(189,0,38)} 434 | .YlOrRd .q0-6{fill:rgb(255,255,178)} 435 | .YlOrRd .q1-6{fill:rgb(254,217,118)} 436 | .YlOrRd .q2-6{fill:rgb(254,178,76)} 437 | .YlOrRd .q3-6{fill:rgb(253,141,60)} 438 | .YlOrRd .q4-6{fill:rgb(240,59,32)} 439 | .YlOrRd .q5-6{fill:rgb(189,0,38)} 440 | .YlOrRd .q0-7{fill:rgb(255,255,178)} 441 | .YlOrRd .q1-7{fill:rgb(254,217,118)} 442 | .YlOrRd .q2-7{fill:rgb(254,178,76)} 443 | .YlOrRd .q3-7{fill:rgb(253,141,60)} 444 | .YlOrRd .q4-7{fill:rgb(252,78,42)} 445 | .YlOrRd .q5-7{fill:rgb(227,26,28)} 446 | .YlOrRd .q6-7{fill:rgb(177,0,38)} 447 | .YlOrRd .q0-8{fill:rgb(255,255,204)} 448 | .YlOrRd .q1-8{fill:rgb(255,237,160)} 449 | .YlOrRd .q2-8{fill:rgb(254,217,118)} 450 | .YlOrRd .q3-8{fill:rgb(254,178,76)} 451 | .YlOrRd .q4-8{fill:rgb(253,141,60)} 452 | .YlOrRd .q5-8{fill:rgb(252,78,42)} 453 | .YlOrRd .q6-8{fill:rgb(227,26,28)} 454 | .YlOrRd .q7-8{fill:rgb(177,0,38)} 455 | .YlOrRd .q0-9{fill:rgb(255,255,204)} 456 | .YlOrRd .q1-9{fill:rgb(255,237,160)} 457 | .YlOrRd .q2-9{fill:rgb(254,217,118)} 458 | .YlOrRd .q3-9{fill:rgb(254,178,76)} 459 | .YlOrRd .q4-9{fill:rgb(253,141,60)} 460 | .YlOrRd .q5-9{fill:rgb(252,78,42)} 461 | .YlOrRd .q6-9{fill:rgb(227,26,28)} 462 | .YlOrRd .q7-9{fill:rgb(189,0,38)} 463 | .YlOrRd .q8-9{fill:rgb(128,0,38)} 464 | .YlOrBr .q0-3{fill:rgb(255,247,188)} 465 | .YlOrBr .q1-3{fill:rgb(254,196,79)} 466 | .YlOrBr .q2-3{fill:rgb(217,95,14)} 467 | .YlOrBr .q0-4{fill:rgb(255,255,212)} 468 | .YlOrBr .q1-4{fill:rgb(254,217,142)} 469 | .YlOrBr .q2-4{fill:rgb(254,153,41)} 470 | .YlOrBr .q3-4{fill:rgb(204,76,2)} 471 | .YlOrBr .q0-5{fill:rgb(255,255,212)} 472 | .YlOrBr .q1-5{fill:rgb(254,217,142)} 473 | .YlOrBr .q2-5{fill:rgb(254,153,41)} 474 | .YlOrBr .q3-5{fill:rgb(217,95,14)} 475 | .YlOrBr .q4-5{fill:rgb(153,52,4)} 476 | .YlOrBr .q0-6{fill:rgb(255,255,212)} 477 | .YlOrBr .q1-6{fill:rgb(254,227,145)} 478 | .YlOrBr .q2-6{fill:rgb(254,196,79)} 479 | .YlOrBr .q3-6{fill:rgb(254,153,41)} 480 | .YlOrBr .q4-6{fill:rgb(217,95,14)} 481 | .YlOrBr .q5-6{fill:rgb(153,52,4)} 482 | .YlOrBr .q0-7{fill:rgb(255,255,212)} 483 | .YlOrBr .q1-7{fill:rgb(254,227,145)} 484 | .YlOrBr .q2-7{fill:rgb(254,196,79)} 485 | .YlOrBr .q3-7{fill:rgb(254,153,41)} 486 | .YlOrBr .q4-7{fill:rgb(236,112,20)} 487 | .YlOrBr .q5-7{fill:rgb(204,76,2)} 488 | .YlOrBr .q6-7{fill:rgb(140,45,4)} 489 | .YlOrBr .q0-8{fill:rgb(255,255,229)} 490 | .YlOrBr .q1-8{fill:rgb(255,247,188)} 491 | .YlOrBr .q2-8{fill:rgb(254,227,145)} 492 | .YlOrBr .q3-8{fill:rgb(254,196,79)} 493 | .YlOrBr .q4-8{fill:rgb(254,153,41)} 494 | .YlOrBr .q5-8{fill:rgb(236,112,20)} 495 | .YlOrBr .q6-8{fill:rgb(204,76,2)} 496 | .YlOrBr .q7-8{fill:rgb(140,45,4)} 497 | .YlOrBr .q0-9{fill:rgb(255,255,229)} 498 | .YlOrBr .q1-9{fill:rgb(255,247,188)} 499 | .YlOrBr .q2-9{fill:rgb(254,227,145)} 500 | .YlOrBr .q3-9{fill:rgb(254,196,79)} 501 | .YlOrBr .q4-9{fill:rgb(254,153,41)} 502 | .YlOrBr .q5-9{fill:rgb(236,112,20)} 503 | .YlOrBr .q6-9{fill:rgb(204,76,2)} 504 | .YlOrBr .q7-9{fill:rgb(153,52,4)} 505 | .YlOrBr .q8-9{fill:rgb(102,37,6)} 506 | .Purples .q0-3{fill:rgb(239,237,245)} 507 | .Purples .q1-3{fill:rgb(188,189,220)} 508 | .Purples .q2-3{fill:rgb(117,107,177)} 509 | .Purples .q0-4{fill:rgb(242,240,247)} 510 | .Purples .q1-4{fill:rgb(203,201,226)} 511 | .Purples .q2-4{fill:rgb(158,154,200)} 512 | .Purples .q3-4{fill:rgb(106,81,163)} 513 | .Purples .q0-5{fill:rgb(242,240,247)} 514 | .Purples .q1-5{fill:rgb(203,201,226)} 515 | .Purples .q2-5{fill:rgb(158,154,200)} 516 | .Purples .q3-5{fill:rgb(117,107,177)} 517 | .Purples .q4-5{fill:rgb(84,39,143)} 518 | .Purples .q0-6{fill:rgb(242,240,247)} 519 | .Purples .q1-6{fill:rgb(218,218,235)} 520 | .Purples .q2-6{fill:rgb(188,189,220)} 521 | .Purples .q3-6{fill:rgb(158,154,200)} 522 | .Purples .q4-6{fill:rgb(117,107,177)} 523 | .Purples .q5-6{fill:rgb(84,39,143)} 524 | .Purples .q0-7{fill:rgb(242,240,247)} 525 | .Purples .q1-7{fill:rgb(218,218,235)} 526 | .Purples .q2-7{fill:rgb(188,189,220)} 527 | .Purples .q3-7{fill:rgb(158,154,200)} 528 | .Purples .q4-7{fill:rgb(128,125,186)} 529 | .Purples .q5-7{fill:rgb(106,81,163)} 530 | .Purples .q6-7{fill:rgb(74,20,134)} 531 | .Purples .q0-8{fill:rgb(252,251,253)} 532 | .Purples .q1-8{fill:rgb(239,237,245)} 533 | .Purples .q2-8{fill:rgb(218,218,235)} 534 | .Purples .q3-8{fill:rgb(188,189,220)} 535 | .Purples .q4-8{fill:rgb(158,154,200)} 536 | .Purples .q5-8{fill:rgb(128,125,186)} 537 | .Purples .q6-8{fill:rgb(106,81,163)} 538 | .Purples .q7-8{fill:rgb(74,20,134)} 539 | .Purples .q0-9{fill:rgb(252,251,253)} 540 | .Purples .q1-9{fill:rgb(239,237,245)} 541 | .Purples .q2-9{fill:rgb(218,218,235)} 542 | .Purples .q3-9{fill:rgb(188,189,220)} 543 | .Purples .q4-9{fill:rgb(158,154,200)} 544 | .Purples .q5-9{fill:rgb(128,125,186)} 545 | .Purples .q6-9{fill:rgb(106,81,163)} 546 | .Purples .q7-9{fill:rgb(84,39,143)} 547 | .Purples .q8-9{fill:rgb(63,0,125)} 548 | .Blues .q0-3{fill:rgb(222,235,247)} 549 | .Blues .q1-3{fill:rgb(158,202,225)} 550 | .Blues .q2-3{fill:rgb(49,130,189)} 551 | .Blues .q0-4{fill:rgb(239,243,255)} 552 | .Blues .q1-4{fill:rgb(189,215,231)} 553 | .Blues .q2-4{fill:rgb(107,174,214)} 554 | .Blues .q3-4{fill:rgb(33,113,181)} 555 | .Blues .q0-5{fill:rgb(239,243,255)} 556 | .Blues .q1-5{fill:rgb(189,215,231)} 557 | .Blues .q2-5{fill:rgb(107,174,214)} 558 | .Blues .q3-5{fill:rgb(49,130,189)} 559 | .Blues .q4-5{fill:rgb(8,81,156)} 560 | .Blues .q0-6{fill:rgb(239,243,255)} 561 | .Blues .q1-6{fill:rgb(198,219,239)} 562 | .Blues .q2-6{fill:rgb(158,202,225)} 563 | .Blues .q3-6{fill:rgb(107,174,214)} 564 | .Blues .q4-6{fill:rgb(49,130,189)} 565 | .Blues .q5-6{fill:rgb(8,81,156)} 566 | .Blues .q0-7{fill:rgb(239,243,255)} 567 | .Blues .q1-7{fill:rgb(198,219,239)} 568 | .Blues .q2-7{fill:rgb(158,202,225)} 569 | .Blues .q3-7{fill:rgb(107,174,214)} 570 | .Blues .q4-7{fill:rgb(66,146,198)} 571 | .Blues .q5-7{fill:rgb(33,113,181)} 572 | .Blues .q6-7{fill:rgb(8,69,148)} 573 | .Blues .q0-8{fill:rgb(247,251,255)} 574 | .Blues .q1-8{fill:rgb(222,235,247)} 575 | .Blues .q2-8{fill:rgb(198,219,239)} 576 | .Blues .q3-8{fill:rgb(158,202,225)} 577 | .Blues .q4-8{fill:rgb(107,174,214)} 578 | .Blues .q5-8{fill:rgb(66,146,198)} 579 | .Blues .q6-8{fill:rgb(33,113,181)} 580 | .Blues .q7-8{fill:rgb(8,69,148)} 581 | .Blues .q0-9{fill:rgb(247,251,255)} 582 | .Blues .q1-9{fill:rgb(222,235,247)} 583 | .Blues .q2-9{fill:rgb(198,219,239)} 584 | .Blues .q3-9{fill:rgb(158,202,225)} 585 | .Blues .q4-9{fill:rgb(107,174,214)} 586 | .Blues .q5-9{fill:rgb(66,146,198)} 587 | .Blues .q6-9{fill:rgb(33,113,181)} 588 | .Blues .q7-9{fill:rgb(8,81,156)} 589 | .Blues .q8-9{fill:rgb(8,48,107)} 590 | .Greens .q0-3{fill:rgb(229,245,224)} 591 | .Greens .q1-3{fill:rgb(161,217,155)} 592 | .Greens .q2-3{fill:rgb(49,163,84)} 593 | .Greens .q0-4{fill:rgb(237,248,233)} 594 | .Greens .q1-4{fill:rgb(186,228,179)} 595 | .Greens .q2-4{fill:rgb(116,196,118)} 596 | .Greens .q3-4{fill:rgb(35,139,69)} 597 | .Greens .q0-5{fill:rgb(237,248,233)} 598 | .Greens .q1-5{fill:rgb(186,228,179)} 599 | .Greens .q2-5{fill:rgb(116,196,118)} 600 | .Greens .q3-5{fill:rgb(49,163,84)} 601 | .Greens .q4-5{fill:rgb(0,109,44)} 602 | .Greens .q0-6{fill:rgb(237,248,233)} 603 | .Greens .q1-6{fill:rgb(199,233,192)} 604 | .Greens .q2-6{fill:rgb(161,217,155)} 605 | .Greens .q3-6{fill:rgb(116,196,118)} 606 | .Greens .q4-6{fill:rgb(49,163,84)} 607 | .Greens .q5-6{fill:rgb(0,109,44)} 608 | .Greens .q0-7{fill:rgb(237,248,233)} 609 | .Greens .q1-7{fill:rgb(199,233,192)} 610 | .Greens .q2-7{fill:rgb(161,217,155)} 611 | .Greens .q3-7{fill:rgb(116,196,118)} 612 | .Greens .q4-7{fill:rgb(65,171,93)} 613 | .Greens .q5-7{fill:rgb(35,139,69)} 614 | .Greens .q6-7{fill:rgb(0,90,50)} 615 | .Greens .q0-8{fill:rgb(247,252,245)} 616 | .Greens .q1-8{fill:rgb(229,245,224)} 617 | .Greens .q2-8{fill:rgb(199,233,192)} 618 | .Greens .q3-8{fill:rgb(161,217,155)} 619 | .Greens .q4-8{fill:rgb(116,196,118)} 620 | .Greens .q5-8{fill:rgb(65,171,93)} 621 | .Greens .q6-8{fill:rgb(35,139,69)} 622 | .Greens .q7-8{fill:rgb(0,90,50)} 623 | .Greens .q0-9{fill:rgb(247,252,245)} 624 | .Greens .q1-9{fill:rgb(229,245,224)} 625 | .Greens .q2-9{fill:rgb(199,233,192)} 626 | .Greens .q3-9{fill:rgb(161,217,155)} 627 | .Greens .q4-9{fill:rgb(116,196,118)} 628 | .Greens .q5-9{fill:rgb(65,171,93)} 629 | .Greens .q6-9{fill:rgb(35,139,69)} 630 | .Greens .q7-9{fill:rgb(0,109,44)} 631 | .Greens .q8-9{fill:rgb(0,68,27)} 632 | .Oranges .q0-3{fill:rgb(254,230,206)} 633 | .Oranges .q1-3{fill:rgb(253,174,107)} 634 | .Oranges .q2-3{fill:rgb(230,85,13)} 635 | .Oranges .q0-4{fill:rgb(254,237,222)} 636 | .Oranges .q1-4{fill:rgb(253,190,133)} 637 | .Oranges .q2-4{fill:rgb(253,141,60)} 638 | .Oranges .q3-4{fill:rgb(217,71,1)} 639 | .Oranges .q0-5{fill:rgb(254,237,222)} 640 | .Oranges .q1-5{fill:rgb(253,190,133)} 641 | .Oranges .q2-5{fill:rgb(253,141,60)} 642 | .Oranges .q3-5{fill:rgb(230,85,13)} 643 | .Oranges .q4-5{fill:rgb(166,54,3)} 644 | .Oranges .q0-6{fill:rgb(254,237,222)} 645 | .Oranges .q1-6{fill:rgb(253,208,162)} 646 | .Oranges .q2-6{fill:rgb(253,174,107)} 647 | .Oranges .q3-6{fill:rgb(253,141,60)} 648 | .Oranges .q4-6{fill:rgb(230,85,13)} 649 | .Oranges .q5-6{fill:rgb(166,54,3)} 650 | .Oranges .q0-7{fill:rgb(254,237,222)} 651 | .Oranges .q1-7{fill:rgb(253,208,162)} 652 | .Oranges .q2-7{fill:rgb(253,174,107)} 653 | .Oranges .q3-7{fill:rgb(253,141,60)} 654 | .Oranges .q4-7{fill:rgb(241,105,19)} 655 | .Oranges .q5-7{fill:rgb(217,72,1)} 656 | .Oranges .q6-7{fill:rgb(140,45,4)} 657 | .Oranges .q0-8{fill:rgb(255,245,235)} 658 | .Oranges .q1-8{fill:rgb(254,230,206)} 659 | .Oranges .q2-8{fill:rgb(253,208,162)} 660 | .Oranges .q3-8{fill:rgb(253,174,107)} 661 | .Oranges .q4-8{fill:rgb(253,141,60)} 662 | .Oranges .q5-8{fill:rgb(241,105,19)} 663 | .Oranges .q6-8{fill:rgb(217,72,1)} 664 | .Oranges .q7-8{fill:rgb(140,45,4)} 665 | .Oranges .q0-9{fill:rgb(255,245,235)} 666 | .Oranges .q1-9{fill:rgb(254,230,206)} 667 | .Oranges .q2-9{fill:rgb(253,208,162)} 668 | .Oranges .q3-9{fill:rgb(253,174,107)} 669 | .Oranges .q4-9{fill:rgb(253,141,60)} 670 | .Oranges .q5-9{fill:rgb(241,105,19)} 671 | .Oranges .q6-9{fill:rgb(217,72,1)} 672 | .Oranges .q7-9{fill:rgb(166,54,3)} 673 | .Oranges .q8-9{fill:rgb(127,39,4)} 674 | .Reds .q0-3{fill:rgb(254,224,210)} 675 | .Reds .q1-3{fill:rgb(252,146,114)} 676 | .Reds .q2-3{fill:rgb(222,45,38)} 677 | .Reds .q0-4{fill:rgb(254,229,217)} 678 | .Reds .q1-4{fill:rgb(252,174,145)} 679 | .Reds .q2-4{fill:rgb(251,106,74)} 680 | .Reds .q3-4{fill:rgb(203,24,29)} 681 | .Reds .q0-5{fill:rgb(254,229,217)} 682 | .Reds .q1-5{fill:rgb(252,174,145)} 683 | .Reds .q2-5{fill:rgb(251,106,74)} 684 | .Reds .q3-5{fill:rgb(222,45,38)} 685 | .Reds .q4-5{fill:rgb(165,15,21)} 686 | .Reds .q0-6{fill:rgb(254,229,217)} 687 | .Reds .q1-6{fill:rgb(252,187,161)} 688 | .Reds .q2-6{fill:rgb(252,146,114)} 689 | .Reds .q3-6{fill:rgb(251,106,74)} 690 | .Reds .q4-6{fill:rgb(222,45,38)} 691 | .Reds .q5-6{fill:rgb(165,15,21)} 692 | .Reds .q0-7{fill:rgb(254,229,217)} 693 | .Reds .q1-7{fill:rgb(252,187,161)} 694 | .Reds .q2-7{fill:rgb(252,146,114)} 695 | .Reds .q3-7{fill:rgb(251,106,74)} 696 | .Reds .q4-7{fill:rgb(239,59,44)} 697 | .Reds .q5-7{fill:rgb(203,24,29)} 698 | .Reds .q6-7{fill:rgb(153,0,13)} 699 | .Reds .q0-8{fill:rgb(255,245,240)} 700 | .Reds .q1-8{fill:rgb(254,224,210)} 701 | .Reds .q2-8{fill:rgb(252,187,161)} 702 | .Reds .q3-8{fill:rgb(252,146,114)} 703 | .Reds .q4-8{fill:rgb(251,106,74)} 704 | .Reds .q5-8{fill:rgb(239,59,44)} 705 | .Reds .q6-8{fill:rgb(203,24,29)} 706 | .Reds .q7-8{fill:rgb(153,0,13)} 707 | .Reds .q0-9{fill:rgb(255,245,240)} 708 | .Reds .q1-9{fill:rgb(254,224,210)} 709 | .Reds .q2-9{fill:rgb(252,187,161)} 710 | .Reds .q3-9{fill:rgb(252,146,114)} 711 | .Reds .q4-9{fill:rgb(251,106,74)} 712 | .Reds .q5-9{fill:rgb(239,59,44)} 713 | .Reds .q6-9{fill:rgb(203,24,29)} 714 | .Reds .q7-9{fill:rgb(165,15,21)} 715 | .Reds .q8-9{fill:rgb(103,0,13)} 716 | .Greys .q0-3{fill:rgb(240,240,240)} 717 | .Greys .q1-3{fill:rgb(189,189,189)} 718 | .Greys .q2-3{fill:rgb(99,99,99)} 719 | .Greys .q0-4{fill:rgb(247,247,247)} 720 | .Greys .q1-4{fill:rgb(204,204,204)} 721 | .Greys .q2-4{fill:rgb(150,150,150)} 722 | .Greys .q3-4{fill:rgb(82,82,82)} 723 | .Greys .q0-5{fill:rgb(247,247,247)} 724 | .Greys .q1-5{fill:rgb(204,204,204)} 725 | .Greys .q2-5{fill:rgb(150,150,150)} 726 | .Greys .q3-5{fill:rgb(99,99,99)} 727 | .Greys .q4-5{fill:rgb(37,37,37)} 728 | .Greys .q0-6{fill:rgb(247,247,247)} 729 | .Greys .q1-6{fill:rgb(217,217,217)} 730 | .Greys .q2-6{fill:rgb(189,189,189)} 731 | .Greys .q3-6{fill:rgb(150,150,150)} 732 | .Greys .q4-6{fill:rgb(99,99,99)} 733 | .Greys .q5-6{fill:rgb(37,37,37)} 734 | .Greys .q0-7{fill:rgb(247,247,247)} 735 | .Greys .q1-7{fill:rgb(217,217,217)} 736 | .Greys .q2-7{fill:rgb(189,189,189)} 737 | .Greys .q3-7{fill:rgb(150,150,150)} 738 | .Greys .q4-7{fill:rgb(115,115,115)} 739 | .Greys .q5-7{fill:rgb(82,82,82)} 740 | .Greys .q6-7{fill:rgb(37,37,37)} 741 | .Greys .q0-8{fill:rgb(255,255,255)} 742 | .Greys .q1-8{fill:rgb(240,240,240)} 743 | .Greys .q2-8{fill:rgb(217,217,217)} 744 | .Greys .q3-8{fill:rgb(189,189,189)} 745 | .Greys .q4-8{fill:rgb(150,150,150)} 746 | .Greys .q5-8{fill:rgb(115,115,115)} 747 | .Greys .q6-8{fill:rgb(82,82,82)} 748 | .Greys .q7-8{fill:rgb(37,37,37)} 749 | .Greys .q0-9{fill:rgb(255,255,255)} 750 | .Greys .q1-9{fill:rgb(240,240,240)} 751 | .Greys .q2-9{fill:rgb(217,217,217)} 752 | .Greys .q3-9{fill:rgb(189,189,189)} 753 | .Greys .q4-9{fill:rgb(150,150,150)} 754 | .Greys .q5-9{fill:rgb(115,115,115)} 755 | .Greys .q6-9{fill:rgb(82,82,82)} 756 | .Greys .q7-9{fill:rgb(37,37,37)} 757 | .Greys .q8-9{fill:rgb(0,0,0)} 758 | .PuOr .q0-3{fill:rgb(241,163,64)} 759 | .PuOr .q1-3{fill:rgb(247,247,247)} 760 | .PuOr .q2-3{fill:rgb(153,142,195)} 761 | .PuOr .q0-4{fill:rgb(230,97,1)} 762 | .PuOr .q1-4{fill:rgb(253,184,99)} 763 | .PuOr .q2-4{fill:rgb(178,171,210)} 764 | .PuOr .q3-4{fill:rgb(94,60,153)} 765 | .PuOr .q0-5{fill:rgb(230,97,1)} 766 | .PuOr .q1-5{fill:rgb(253,184,99)} 767 | .PuOr .q2-5{fill:rgb(247,247,247)} 768 | .PuOr .q3-5{fill:rgb(178,171,210)} 769 | .PuOr .q4-5{fill:rgb(94,60,153)} 770 | .PuOr .q0-6{fill:rgb(179,88,6)} 771 | .PuOr .q1-6{fill:rgb(241,163,64)} 772 | .PuOr .q2-6{fill:rgb(254,224,182)} 773 | .PuOr .q3-6{fill:rgb(216,218,235)} 774 | .PuOr .q4-6{fill:rgb(153,142,195)} 775 | .PuOr .q5-6{fill:rgb(84,39,136)} 776 | .PuOr .q0-7{fill:rgb(179,88,6)} 777 | .PuOr .q1-7{fill:rgb(241,163,64)} 778 | .PuOr .q2-7{fill:rgb(254,224,182)} 779 | .PuOr .q3-7{fill:rgb(247,247,247)} 780 | .PuOr .q4-7{fill:rgb(216,218,235)} 781 | .PuOr .q5-7{fill:rgb(153,142,195)} 782 | .PuOr .q6-7{fill:rgb(84,39,136)} 783 | .PuOr .q0-8{fill:rgb(179,88,6)} 784 | .PuOr .q1-8{fill:rgb(224,130,20)} 785 | .PuOr .q2-8{fill:rgb(253,184,99)} 786 | .PuOr .q3-8{fill:rgb(254,224,182)} 787 | .PuOr .q4-8{fill:rgb(216,218,235)} 788 | .PuOr .q5-8{fill:rgb(178,171,210)} 789 | .PuOr .q6-8{fill:rgb(128,115,172)} 790 | .PuOr .q7-8{fill:rgb(84,39,136)} 791 | .PuOr .q0-9{fill:rgb(179,88,6)} 792 | .PuOr .q1-9{fill:rgb(224,130,20)} 793 | .PuOr .q2-9{fill:rgb(253,184,99)} 794 | .PuOr .q3-9{fill:rgb(254,224,182)} 795 | .PuOr .q4-9{fill:rgb(247,247,247)} 796 | .PuOr .q5-9{fill:rgb(216,218,235)} 797 | .PuOr .q6-9{fill:rgb(178,171,210)} 798 | .PuOr .q7-9{fill:rgb(128,115,172)} 799 | .PuOr .q8-9{fill:rgb(84,39,136)} 800 | .PuOr .q0-10{fill:rgb(127,59,8)} 801 | .PuOr .q1-10{fill:rgb(179,88,6)} 802 | .PuOr .q2-10{fill:rgb(224,130,20)} 803 | .PuOr .q3-10{fill:rgb(253,184,99)} 804 | .PuOr .q4-10{fill:rgb(254,224,182)} 805 | .PuOr .q5-10{fill:rgb(216,218,235)} 806 | .PuOr .q6-10{fill:rgb(178,171,210)} 807 | .PuOr .q7-10{fill:rgb(128,115,172)} 808 | .PuOr .q8-10{fill:rgb(84,39,136)} 809 | .PuOr .q9-10{fill:rgb(45,0,75)} 810 | .PuOr .q0-11{fill:rgb(127,59,8)} 811 | .PuOr .q1-11{fill:rgb(179,88,6)} 812 | .PuOr .q2-11{fill:rgb(224,130,20)} 813 | .PuOr .q3-11{fill:rgb(253,184,99)} 814 | .PuOr .q4-11{fill:rgb(254,224,182)} 815 | .PuOr .q5-11{fill:rgb(247,247,247)} 816 | .PuOr .q6-11{fill:rgb(216,218,235)} 817 | .PuOr .q7-11{fill:rgb(178,171,210)} 818 | .PuOr .q8-11{fill:rgb(128,115,172)} 819 | .PuOr .q9-11{fill:rgb(84,39,136)} 820 | .PuOr .q10-11{fill:rgb(45,0,75)} 821 | .BrBG .q0-3{fill:rgb(216,179,101)} 822 | .BrBG .q1-3{fill:rgb(245,245,245)} 823 | .BrBG .q2-3{fill:rgb(90,180,172)} 824 | .BrBG .q0-4{fill:rgb(166,97,26)} 825 | .BrBG .q1-4{fill:rgb(223,194,125)} 826 | .BrBG .q2-4{fill:rgb(128,205,193)} 827 | .BrBG .q3-4{fill:rgb(1,133,113)} 828 | .BrBG .q0-5{fill:rgb(166,97,26)} 829 | .BrBG .q1-5{fill:rgb(223,194,125)} 830 | .BrBG .q2-5{fill:rgb(245,245,245)} 831 | .BrBG .q3-5{fill:rgb(128,205,193)} 832 | .BrBG .q4-5{fill:rgb(1,133,113)} 833 | .BrBG .q0-6{fill:rgb(140,81,10)} 834 | .BrBG .q1-6{fill:rgb(216,179,101)} 835 | .BrBG .q2-6{fill:rgb(246,232,195)} 836 | .BrBG .q3-6{fill:rgb(199,234,229)} 837 | .BrBG .q4-6{fill:rgb(90,180,172)} 838 | .BrBG .q5-6{fill:rgb(1,102,94)} 839 | .BrBG .q0-7{fill:rgb(140,81,10)} 840 | .BrBG .q1-7{fill:rgb(216,179,101)} 841 | .BrBG .q2-7{fill:rgb(246,232,195)} 842 | .BrBG .q3-7{fill:rgb(245,245,245)} 843 | .BrBG .q4-7{fill:rgb(199,234,229)} 844 | .BrBG .q5-7{fill:rgb(90,180,172)} 845 | .BrBG .q6-7{fill:rgb(1,102,94)} 846 | .BrBG .q0-8{fill:rgb(140,81,10)} 847 | .BrBG .q1-8{fill:rgb(191,129,45)} 848 | .BrBG .q2-8{fill:rgb(223,194,125)} 849 | .BrBG .q3-8{fill:rgb(246,232,195)} 850 | .BrBG .q4-8{fill:rgb(199,234,229)} 851 | .BrBG .q5-8{fill:rgb(128,205,193)} 852 | .BrBG .q6-8{fill:rgb(53,151,143)} 853 | .BrBG .q7-8{fill:rgb(1,102,94)} 854 | .BrBG .q0-9{fill:rgb(140,81,10)} 855 | .BrBG .q1-9{fill:rgb(191,129,45)} 856 | .BrBG .q2-9{fill:rgb(223,194,125)} 857 | .BrBG .q3-9{fill:rgb(246,232,195)} 858 | .BrBG .q4-9{fill:rgb(245,245,245)} 859 | .BrBG .q5-9{fill:rgb(199,234,229)} 860 | .BrBG .q6-9{fill:rgb(128,205,193)} 861 | .BrBG .q7-9{fill:rgb(53,151,143)} 862 | .BrBG .q8-9{fill:rgb(1,102,94)} 863 | .BrBG .q0-10{fill:rgb(84,48,5)} 864 | .BrBG .q1-10{fill:rgb(140,81,10)} 865 | .BrBG .q2-10{fill:rgb(191,129,45)} 866 | .BrBG .q3-10{fill:rgb(223,194,125)} 867 | .BrBG .q4-10{fill:rgb(246,232,195)} 868 | .BrBG .q5-10{fill:rgb(199,234,229)} 869 | .BrBG .q6-10{fill:rgb(128,205,193)} 870 | .BrBG .q7-10{fill:rgb(53,151,143)} 871 | .BrBG .q8-10{fill:rgb(1,102,94)} 872 | .BrBG .q9-10{fill:rgb(0,60,48)} 873 | .BrBG .q0-11{fill:rgb(84,48,5)} 874 | .BrBG .q1-11{fill:rgb(140,81,10)} 875 | .BrBG .q2-11{fill:rgb(191,129,45)} 876 | .BrBG .q3-11{fill:rgb(223,194,125)} 877 | .BrBG .q4-11{fill:rgb(246,232,195)} 878 | .BrBG .q5-11{fill:rgb(245,245,245)} 879 | .BrBG .q6-11{fill:rgb(199,234,229)} 880 | .BrBG .q7-11{fill:rgb(128,205,193)} 881 | .BrBG .q8-11{fill:rgb(53,151,143)} 882 | .BrBG .q9-11{fill:rgb(1,102,94)} 883 | .BrBG .q10-11{fill:rgb(0,60,48)} 884 | .PRGn .q0-3{fill:rgb(175,141,195)} 885 | .PRGn .q1-3{fill:rgb(247,247,247)} 886 | .PRGn .q2-3{fill:rgb(127,191,123)} 887 | .PRGn .q0-4{fill:rgb(123,50,148)} 888 | .PRGn .q1-4{fill:rgb(194,165,207)} 889 | .PRGn .q2-4{fill:rgb(166,219,160)} 890 | .PRGn .q3-4{fill:rgb(0,136,55)} 891 | .PRGn .q0-5{fill:rgb(123,50,148)} 892 | .PRGn .q1-5{fill:rgb(194,165,207)} 893 | .PRGn .q2-5{fill:rgb(247,247,247)} 894 | .PRGn .q3-5{fill:rgb(166,219,160)} 895 | .PRGn .q4-5{fill:rgb(0,136,55)} 896 | .PRGn .q0-6{fill:rgb(118,42,131)} 897 | .PRGn .q1-6{fill:rgb(175,141,195)} 898 | .PRGn .q2-6{fill:rgb(231,212,232)} 899 | .PRGn .q3-6{fill:rgb(217,240,211)} 900 | .PRGn .q4-6{fill:rgb(127,191,123)} 901 | .PRGn .q5-6{fill:rgb(27,120,55)} 902 | .PRGn .q0-7{fill:rgb(118,42,131)} 903 | .PRGn .q1-7{fill:rgb(175,141,195)} 904 | .PRGn .q2-7{fill:rgb(231,212,232)} 905 | .PRGn .q3-7{fill:rgb(247,247,247)} 906 | .PRGn .q4-7{fill:rgb(217,240,211)} 907 | .PRGn .q5-7{fill:rgb(127,191,123)} 908 | .PRGn .q6-7{fill:rgb(27,120,55)} 909 | .PRGn .q0-8{fill:rgb(118,42,131)} 910 | .PRGn .q1-8{fill:rgb(153,112,171)} 911 | .PRGn .q2-8{fill:rgb(194,165,207)} 912 | .PRGn .q3-8{fill:rgb(231,212,232)} 913 | .PRGn .q4-8{fill:rgb(217,240,211)} 914 | .PRGn .q5-8{fill:rgb(166,219,160)} 915 | .PRGn .q6-8{fill:rgb(90,174,97)} 916 | .PRGn .q7-8{fill:rgb(27,120,55)} 917 | .PRGn .q0-9{fill:rgb(118,42,131)} 918 | .PRGn .q1-9{fill:rgb(153,112,171)} 919 | .PRGn .q2-9{fill:rgb(194,165,207)} 920 | .PRGn .q3-9{fill:rgb(231,212,232)} 921 | .PRGn .q4-9{fill:rgb(247,247,247)} 922 | .PRGn .q5-9{fill:rgb(217,240,211)} 923 | .PRGn .q6-9{fill:rgb(166,219,160)} 924 | .PRGn .q7-9{fill:rgb(90,174,97)} 925 | .PRGn .q8-9{fill:rgb(27,120,55)} 926 | .PRGn .q0-10{fill:rgb(64,0,75)} 927 | .PRGn .q1-10{fill:rgb(118,42,131)} 928 | .PRGn .q2-10{fill:rgb(153,112,171)} 929 | .PRGn .q3-10{fill:rgb(194,165,207)} 930 | .PRGn .q4-10{fill:rgb(231,212,232)} 931 | .PRGn .q5-10{fill:rgb(217,240,211)} 932 | .PRGn .q6-10{fill:rgb(166,219,160)} 933 | .PRGn .q7-10{fill:rgb(90,174,97)} 934 | .PRGn .q8-10{fill:rgb(27,120,55)} 935 | .PRGn .q9-10{fill:rgb(0,68,27)} 936 | .PRGn .q0-11{fill:rgb(64,0,75)} 937 | .PRGn .q1-11{fill:rgb(118,42,131)} 938 | .PRGn .q2-11{fill:rgb(153,112,171)} 939 | .PRGn .q3-11{fill:rgb(194,165,207)} 940 | .PRGn .q4-11{fill:rgb(231,212,232)} 941 | .PRGn .q5-11{fill:rgb(247,247,247)} 942 | .PRGn .q6-11{fill:rgb(217,240,211)} 943 | .PRGn .q7-11{fill:rgb(166,219,160)} 944 | .PRGn .q8-11{fill:rgb(90,174,97)} 945 | .PRGn .q9-11{fill:rgb(27,120,55)} 946 | .PRGn .q10-11{fill:rgb(0,68,27)} 947 | .PiYG .q0-3{fill:rgb(233,163,201)} 948 | .PiYG .q1-3{fill:rgb(247,247,247)} 949 | .PiYG .q2-3{fill:rgb(161,215,106)} 950 | .PiYG .q0-4{fill:rgb(208,28,139)} 951 | .PiYG .q1-4{fill:rgb(241,182,218)} 952 | .PiYG .q2-4{fill:rgb(184,225,134)} 953 | .PiYG .q3-4{fill:rgb(77,172,38)} 954 | .PiYG .q0-5{fill:rgb(208,28,139)} 955 | .PiYG .q1-5{fill:rgb(241,182,218)} 956 | .PiYG .q2-5{fill:rgb(247,247,247)} 957 | .PiYG .q3-5{fill:rgb(184,225,134)} 958 | .PiYG .q4-5{fill:rgb(77,172,38)} 959 | .PiYG .q0-6{fill:rgb(197,27,125)} 960 | .PiYG .q1-6{fill:rgb(233,163,201)} 961 | .PiYG .q2-6{fill:rgb(253,224,239)} 962 | .PiYG .q3-6{fill:rgb(230,245,208)} 963 | .PiYG .q4-6{fill:rgb(161,215,106)} 964 | .PiYG .q5-6{fill:rgb(77,146,33)} 965 | .PiYG .q0-7{fill:rgb(197,27,125)} 966 | .PiYG .q1-7{fill:rgb(233,163,201)} 967 | .PiYG .q2-7{fill:rgb(253,224,239)} 968 | .PiYG .q3-7{fill:rgb(247,247,247)} 969 | .PiYG .q4-7{fill:rgb(230,245,208)} 970 | .PiYG .q5-7{fill:rgb(161,215,106)} 971 | .PiYG .q6-7{fill:rgb(77,146,33)} 972 | .PiYG .q0-8{fill:rgb(197,27,125)} 973 | .PiYG .q1-8{fill:rgb(222,119,174)} 974 | .PiYG .q2-8{fill:rgb(241,182,218)} 975 | .PiYG .q3-8{fill:rgb(253,224,239)} 976 | .PiYG .q4-8{fill:rgb(230,245,208)} 977 | .PiYG .q5-8{fill:rgb(184,225,134)} 978 | .PiYG .q6-8{fill:rgb(127,188,65)} 979 | .PiYG .q7-8{fill:rgb(77,146,33)} 980 | .PiYG .q0-9{fill:rgb(197,27,125)} 981 | .PiYG .q1-9{fill:rgb(222,119,174)} 982 | .PiYG .q2-9{fill:rgb(241,182,218)} 983 | .PiYG .q3-9{fill:rgb(253,224,239)} 984 | .PiYG .q4-9{fill:rgb(247,247,247)} 985 | .PiYG .q5-9{fill:rgb(230,245,208)} 986 | .PiYG .q6-9{fill:rgb(184,225,134)} 987 | .PiYG .q7-9{fill:rgb(127,188,65)} 988 | .PiYG .q8-9{fill:rgb(77,146,33)} 989 | .PiYG .q0-10{fill:rgb(142,1,82)} 990 | .PiYG .q1-10{fill:rgb(197,27,125)} 991 | .PiYG .q2-10{fill:rgb(222,119,174)} 992 | .PiYG .q3-10{fill:rgb(241,182,218)} 993 | .PiYG .q4-10{fill:rgb(253,224,239)} 994 | .PiYG .q5-10{fill:rgb(230,245,208)} 995 | .PiYG .q6-10{fill:rgb(184,225,134)} 996 | .PiYG .q7-10{fill:rgb(127,188,65)} 997 | .PiYG .q8-10{fill:rgb(77,146,33)} 998 | .PiYG .q9-10{fill:rgb(39,100,25)} 999 | .PiYG .q0-11{fill:rgb(142,1,82)} 1000 | .PiYG .q1-11{fill:rgb(197,27,125)} 1001 | .PiYG .q2-11{fill:rgb(222,119,174)} 1002 | .PiYG .q3-11{fill:rgb(241,182,218)} 1003 | .PiYG .q4-11{fill:rgb(253,224,239)} 1004 | .PiYG .q5-11{fill:rgb(247,247,247)} 1005 | .PiYG .q6-11{fill:rgb(230,245,208)} 1006 | .PiYG .q7-11{fill:rgb(184,225,134)} 1007 | .PiYG .q8-11{fill:rgb(127,188,65)} 1008 | .PiYG .q9-11{fill:rgb(77,146,33)} 1009 | .PiYG .q10-11{fill:rgb(39,100,25)} 1010 | .RdBu .q0-3{fill:rgb(239,138,98)} 1011 | .RdBu .q1-3{fill:rgb(247,247,247)} 1012 | .RdBu .q2-3{fill:rgb(103,169,207)} 1013 | .RdBu .q0-4{fill:rgb(202,0,32)} 1014 | .RdBu .q1-4{fill:rgb(244,165,130)} 1015 | .RdBu .q2-4{fill:rgb(146,197,222)} 1016 | .RdBu .q3-4{fill:rgb(5,113,176)} 1017 | .RdBu .q0-5{fill:rgb(202,0,32)} 1018 | .RdBu .q1-5{fill:rgb(244,165,130)} 1019 | .RdBu .q2-5{fill:rgb(247,247,247)} 1020 | .RdBu .q3-5{fill:rgb(146,197,222)} 1021 | .RdBu .q4-5{fill:rgb(5,113,176)} 1022 | .RdBu .q0-6{fill:rgb(178,24,43)} 1023 | .RdBu .q1-6{fill:rgb(239,138,98)} 1024 | .RdBu .q2-6{fill:rgb(253,219,199)} 1025 | .RdBu .q3-6{fill:rgb(209,229,240)} 1026 | .RdBu .q4-6{fill:rgb(103,169,207)} 1027 | .RdBu .q5-6{fill:rgb(33,102,172)} 1028 | .RdBu .q0-7{fill:rgb(178,24,43)} 1029 | .RdBu .q1-7{fill:rgb(239,138,98)} 1030 | .RdBu .q2-7{fill:rgb(253,219,199)} 1031 | .RdBu .q3-7{fill:rgb(247,247,247)} 1032 | .RdBu .q4-7{fill:rgb(209,229,240)} 1033 | .RdBu .q5-7{fill:rgb(103,169,207)} 1034 | .RdBu .q6-7{fill:rgb(33,102,172)} 1035 | .RdBu .q0-8{fill:rgb(178,24,43)} 1036 | .RdBu .q1-8{fill:rgb(214,96,77)} 1037 | .RdBu .q2-8{fill:rgb(244,165,130)} 1038 | .RdBu .q3-8{fill:rgb(253,219,199)} 1039 | .RdBu .q4-8{fill:rgb(209,229,240)} 1040 | .RdBu .q5-8{fill:rgb(146,197,222)} 1041 | .RdBu .q6-8{fill:rgb(67,147,195)} 1042 | .RdBu .q7-8{fill:rgb(33,102,172)} 1043 | .RdBu .q0-9{fill:rgb(178,24,43)} 1044 | .RdBu .q1-9{fill:rgb(214,96,77)} 1045 | .RdBu .q2-9{fill:rgb(244,165,130)} 1046 | .RdBu .q3-9{fill:rgb(253,219,199)} 1047 | .RdBu .q4-9{fill:rgb(247,247,247)} 1048 | .RdBu .q5-9{fill:rgb(209,229,240)} 1049 | .RdBu .q6-9{fill:rgb(146,197,222)} 1050 | .RdBu .q7-9{fill:rgb(67,147,195)} 1051 | .RdBu .q8-9{fill:rgb(33,102,172)} 1052 | .RdBu .q0-10{fill:rgb(103,0,31)} 1053 | .RdBu .q1-10{fill:rgb(178,24,43)} 1054 | .RdBu .q2-10{fill:rgb(214,96,77)} 1055 | .RdBu .q3-10{fill:rgb(244,165,130)} 1056 | .RdBu .q4-10{fill:rgb(253,219,199)} 1057 | .RdBu .q5-10{fill:rgb(209,229,240)} 1058 | .RdBu .q6-10{fill:rgb(146,197,222)} 1059 | .RdBu .q7-10{fill:rgb(67,147,195)} 1060 | .RdBu .q8-10{fill:rgb(33,102,172)} 1061 | .RdBu .q9-10{fill:rgb(5,48,97)} 1062 | .RdBu .q0-11{fill:rgb(103,0,31)} 1063 | .RdBu .q1-11{fill:rgb(178,24,43)} 1064 | .RdBu .q2-11{fill:rgb(214,96,77)} 1065 | .RdBu .q3-11{fill:rgb(244,165,130)} 1066 | .RdBu .q4-11{fill:rgb(253,219,199)} 1067 | .RdBu .q5-11{fill:rgb(247,247,247)} 1068 | .RdBu .q6-11{fill:rgb(209,229,240)} 1069 | .RdBu .q7-11{fill:rgb(146,197,222)} 1070 | .RdBu .q8-11{fill:rgb(67,147,195)} 1071 | .RdBu .q9-11{fill:rgb(33,102,172)} 1072 | .RdBu .q10-11{fill:rgb(5,48,97)} 1073 | .RdGy .q0-3{fill:rgb(239,138,98)} 1074 | .RdGy .q1-3{fill:rgb(255,255,255)} 1075 | .RdGy .q2-3{fill:rgb(153,153,153)} 1076 | .RdGy .q0-4{fill:rgb(202,0,32)} 1077 | .RdGy .q1-4{fill:rgb(244,165,130)} 1078 | .RdGy .q2-4{fill:rgb(186,186,186)} 1079 | .RdGy .q3-4{fill:rgb(64,64,64)} 1080 | .RdGy .q0-5{fill:rgb(202,0,32)} 1081 | .RdGy .q1-5{fill:rgb(244,165,130)} 1082 | .RdGy .q2-5{fill:rgb(255,255,255)} 1083 | .RdGy .q3-5{fill:rgb(186,186,186)} 1084 | .RdGy .q4-5{fill:rgb(64,64,64)} 1085 | .RdGy .q0-6{fill:rgb(178,24,43)} 1086 | .RdGy .q1-6{fill:rgb(239,138,98)} 1087 | .RdGy .q2-6{fill:rgb(253,219,199)} 1088 | .RdGy .q3-6{fill:rgb(224,224,224)} 1089 | .RdGy .q4-6{fill:rgb(153,153,153)} 1090 | .RdGy .q5-6{fill:rgb(77,77,77)} 1091 | .RdGy .q0-7{fill:rgb(178,24,43)} 1092 | .RdGy .q1-7{fill:rgb(239,138,98)} 1093 | .RdGy .q2-7{fill:rgb(253,219,199)} 1094 | .RdGy .q3-7{fill:rgb(255,255,255)} 1095 | .RdGy .q4-7{fill:rgb(224,224,224)} 1096 | .RdGy .q5-7{fill:rgb(153,153,153)} 1097 | .RdGy .q6-7{fill:rgb(77,77,77)} 1098 | .RdGy .q0-8{fill:rgb(178,24,43)} 1099 | .RdGy .q1-8{fill:rgb(214,96,77)} 1100 | .RdGy .q2-8{fill:rgb(244,165,130)} 1101 | .RdGy .q3-8{fill:rgb(253,219,199)} 1102 | .RdGy .q4-8{fill:rgb(224,224,224)} 1103 | .RdGy .q5-8{fill:rgb(186,186,186)} 1104 | .RdGy .q6-8{fill:rgb(135,135,135)} 1105 | .RdGy .q7-8{fill:rgb(77,77,77)} 1106 | .RdGy .q0-9{fill:rgb(178,24,43)} 1107 | .RdGy .q1-9{fill:rgb(214,96,77)} 1108 | .RdGy .q2-9{fill:rgb(244,165,130)} 1109 | .RdGy .q3-9{fill:rgb(253,219,199)} 1110 | .RdGy .q4-9{fill:rgb(255,255,255)} 1111 | .RdGy .q5-9{fill:rgb(224,224,224)} 1112 | .RdGy .q6-9{fill:rgb(186,186,186)} 1113 | .RdGy .q7-9{fill:rgb(135,135,135)} 1114 | .RdGy .q8-9{fill:rgb(77,77,77)} 1115 | .RdGy .q0-10{fill:rgb(103,0,31)} 1116 | .RdGy .q1-10{fill:rgb(178,24,43)} 1117 | .RdGy .q2-10{fill:rgb(214,96,77)} 1118 | .RdGy .q3-10{fill:rgb(244,165,130)} 1119 | .RdGy .q4-10{fill:rgb(253,219,199)} 1120 | .RdGy .q5-10{fill:rgb(224,224,224)} 1121 | .RdGy .q6-10{fill:rgb(186,186,186)} 1122 | .RdGy .q7-10{fill:rgb(135,135,135)} 1123 | .RdGy .q8-10{fill:rgb(77,77,77)} 1124 | .RdGy .q9-10{fill:rgb(26,26,26)} 1125 | .RdGy .q0-11{fill:rgb(103,0,31)} 1126 | .RdGy .q1-11{fill:rgb(178,24,43)} 1127 | .RdGy .q2-11{fill:rgb(214,96,77)} 1128 | .RdGy .q3-11{fill:rgb(244,165,130)} 1129 | .RdGy .q4-11{fill:rgb(253,219,199)} 1130 | .RdGy .q5-11{fill:rgb(255,255,255)} 1131 | .RdGy .q6-11{fill:rgb(224,224,224)} 1132 | .RdGy .q7-11{fill:rgb(186,186,186)} 1133 | .RdGy .q8-11{fill:rgb(135,135,135)} 1134 | .RdGy .q9-11{fill:rgb(77,77,77)} 1135 | .RdGy .q10-11{fill:rgb(26,26,26)} 1136 | .RdYlBu .q0-3{fill:rgb(252,141,89)} 1137 | .RdYlBu .q1-3{fill:rgb(255,255,191)} 1138 | .RdYlBu .q2-3{fill:rgb(145,191,219)} 1139 | .RdYlBu .q0-4{fill:rgb(215,25,28)} 1140 | .RdYlBu .q1-4{fill:rgb(253,174,97)} 1141 | .RdYlBu .q2-4{fill:rgb(171,217,233)} 1142 | .RdYlBu .q3-4{fill:rgb(44,123,182)} 1143 | .RdYlBu .q0-5{fill:rgb(215,25,28)} 1144 | .RdYlBu .q1-5{fill:rgb(253,174,97)} 1145 | .RdYlBu .q2-5{fill:rgb(255,255,191)} 1146 | .RdYlBu .q3-5{fill:rgb(171,217,233)} 1147 | .RdYlBu .q4-5{fill:rgb(44,123,182)} 1148 | .RdYlBu .q0-6{fill:rgb(215,48,39)} 1149 | .RdYlBu .q1-6{fill:rgb(252,141,89)} 1150 | .RdYlBu .q2-6{fill:rgb(254,224,144)} 1151 | .RdYlBu .q3-6{fill:rgb(224,243,248)} 1152 | .RdYlBu .q4-6{fill:rgb(145,191,219)} 1153 | .RdYlBu .q5-6{fill:rgb(69,117,180)} 1154 | .RdYlBu .q0-7{fill:rgb(215,48,39)} 1155 | .RdYlBu .q1-7{fill:rgb(252,141,89)} 1156 | .RdYlBu .q2-7{fill:rgb(254,224,144)} 1157 | .RdYlBu .q3-7{fill:rgb(255,255,191)} 1158 | .RdYlBu .q4-7{fill:rgb(224,243,248)} 1159 | .RdYlBu .q5-7{fill:rgb(145,191,219)} 1160 | .RdYlBu .q6-7{fill:rgb(69,117,180)} 1161 | .RdYlBu .q0-8{fill:rgb(215,48,39)} 1162 | .RdYlBu .q1-8{fill:rgb(244,109,67)} 1163 | .RdYlBu .q2-8{fill:rgb(253,174,97)} 1164 | .RdYlBu .q3-8{fill:rgb(254,224,144)} 1165 | .RdYlBu .q4-8{fill:rgb(224,243,248)} 1166 | .RdYlBu .q5-8{fill:rgb(171,217,233)} 1167 | .RdYlBu .q6-8{fill:rgb(116,173,209)} 1168 | .RdYlBu .q7-8{fill:rgb(69,117,180)} 1169 | .RdYlBu .q0-9{fill:rgb(215,48,39)} 1170 | .RdYlBu .q1-9{fill:rgb(244,109,67)} 1171 | .RdYlBu .q2-9{fill:rgb(253,174,97)} 1172 | .RdYlBu .q3-9{fill:rgb(254,224,144)} 1173 | .RdYlBu .q4-9{fill:rgb(255,255,191)} 1174 | .RdYlBu .q5-9{fill:rgb(224,243,248)} 1175 | .RdYlBu .q6-9{fill:rgb(171,217,233)} 1176 | .RdYlBu .q7-9{fill:rgb(116,173,209)} 1177 | .RdYlBu .q8-9{fill:rgb(69,117,180)} 1178 | .RdYlBu .q0-10{fill:rgb(165,0,38)} 1179 | .RdYlBu .q1-10{fill:rgb(215,48,39)} 1180 | .RdYlBu .q2-10{fill:rgb(244,109,67)} 1181 | .RdYlBu .q3-10{fill:rgb(253,174,97)} 1182 | .RdYlBu .q4-10{fill:rgb(254,224,144)} 1183 | .RdYlBu .q5-10{fill:rgb(224,243,248)} 1184 | .RdYlBu .q6-10{fill:rgb(171,217,233)} 1185 | .RdYlBu .q7-10{fill:rgb(116,173,209)} 1186 | .RdYlBu .q8-10{fill:rgb(69,117,180)} 1187 | .RdYlBu .q9-10{fill:rgb(49,54,149)} 1188 | .RdYlBu .q0-11{fill:rgb(165,0,38)} 1189 | .RdYlBu .q1-11{fill:rgb(215,48,39)} 1190 | .RdYlBu .q2-11{fill:rgb(244,109,67)} 1191 | .RdYlBu .q3-11{fill:rgb(253,174,97)} 1192 | .RdYlBu .q4-11{fill:rgb(254,224,144)} 1193 | .RdYlBu .q5-11{fill:rgb(255,255,191)} 1194 | .RdYlBu .q6-11{fill:rgb(224,243,248)} 1195 | .RdYlBu .q7-11{fill:rgb(171,217,233)} 1196 | .RdYlBu .q8-11{fill:rgb(116,173,209)} 1197 | .RdYlBu .q9-11{fill:rgb(69,117,180)} 1198 | .RdYlBu .q10-11{fill:rgb(49,54,149)} 1199 | .Spectral .q0-3{fill:rgb(252,141,89)} 1200 | .Spectral .q1-3{fill:rgb(255,255,191)} 1201 | .Spectral .q2-3{fill:rgb(153,213,148)} 1202 | .Spectral .q0-4{fill:rgb(215,25,28)} 1203 | .Spectral .q1-4{fill:rgb(253,174,97)} 1204 | .Spectral .q2-4{fill:rgb(171,221,164)} 1205 | .Spectral .q3-4{fill:rgb(43,131,186)} 1206 | .Spectral .q0-5{fill:rgb(215,25,28)} 1207 | .Spectral .q1-5{fill:rgb(253,174,97)} 1208 | .Spectral .q2-5{fill:rgb(255,255,191)} 1209 | .Spectral .q3-5{fill:rgb(171,221,164)} 1210 | .Spectral .q4-5{fill:rgb(43,131,186)} 1211 | .Spectral .q0-6{fill:rgb(213,62,79)} 1212 | .Spectral .q1-6{fill:rgb(252,141,89)} 1213 | .Spectral .q2-6{fill:rgb(254,224,139)} 1214 | .Spectral .q3-6{fill:rgb(230,245,152)} 1215 | .Spectral .q4-6{fill:rgb(153,213,148)} 1216 | .Spectral .q5-6{fill:rgb(50,136,189)} 1217 | .Spectral .q0-7{fill:rgb(213,62,79)} 1218 | .Spectral .q1-7{fill:rgb(252,141,89)} 1219 | .Spectral .q2-7{fill:rgb(254,224,139)} 1220 | .Spectral .q3-7{fill:rgb(255,255,191)} 1221 | .Spectral .q4-7{fill:rgb(230,245,152)} 1222 | .Spectral .q5-7{fill:rgb(153,213,148)} 1223 | .Spectral .q6-7{fill:rgb(50,136,189)} 1224 | .Spectral .q0-8{fill:rgb(213,62,79)} 1225 | .Spectral .q1-8{fill:rgb(244,109,67)} 1226 | .Spectral .q2-8{fill:rgb(253,174,97)} 1227 | .Spectral .q3-8{fill:rgb(254,224,139)} 1228 | .Spectral .q4-8{fill:rgb(230,245,152)} 1229 | .Spectral .q5-8{fill:rgb(171,221,164)} 1230 | .Spectral .q6-8{fill:rgb(102,194,165)} 1231 | .Spectral .q7-8{fill:rgb(50,136,189)} 1232 | .Spectral .q0-9{fill:rgb(213,62,79)} 1233 | .Spectral .q1-9{fill:rgb(244,109,67)} 1234 | .Spectral .q2-9{fill:rgb(253,174,97)} 1235 | .Spectral .q3-9{fill:rgb(254,224,139)} 1236 | .Spectral .q4-9{fill:rgb(255,255,191)} 1237 | .Spectral .q5-9{fill:rgb(230,245,152)} 1238 | .Spectral .q6-9{fill:rgb(171,221,164)} 1239 | .Spectral .q7-9{fill:rgb(102,194,165)} 1240 | .Spectral .q8-9{fill:rgb(50,136,189)} 1241 | .Spectral .q0-10{fill:rgb(158,1,66)} 1242 | .Spectral .q1-10{fill:rgb(213,62,79)} 1243 | .Spectral .q2-10{fill:rgb(244,109,67)} 1244 | .Spectral .q3-10{fill:rgb(253,174,97)} 1245 | .Spectral .q4-10{fill:rgb(254,224,139)} 1246 | .Spectral .q5-10{fill:rgb(230,245,152)} 1247 | .Spectral .q6-10{fill:rgb(171,221,164)} 1248 | .Spectral .q7-10{fill:rgb(102,194,165)} 1249 | .Spectral .q8-10{fill:rgb(50,136,189)} 1250 | .Spectral .q9-10{fill:rgb(94,79,162)} 1251 | .Spectral .q0-11{fill:rgb(158,1,66)} 1252 | .Spectral .q1-11{fill:rgb(213,62,79)} 1253 | .Spectral .q2-11{fill:rgb(244,109,67)} 1254 | .Spectral .q3-11{fill:rgb(253,174,97)} 1255 | .Spectral .q4-11{fill:rgb(254,224,139)} 1256 | .Spectral .q5-11{fill:rgb(255,255,191)} 1257 | .Spectral .q6-11{fill:rgb(230,245,152)} 1258 | .Spectral .q7-11{fill:rgb(171,221,164)} 1259 | .Spectral .q8-11{fill:rgb(102,194,165)} 1260 | .Spectral .q9-11{fill:rgb(50,136,189)} 1261 | .Spectral .q10-11{fill:rgb(94,79,162)} 1262 | .RdYlGn .q0-3{fill:rgb(252,141,89)} 1263 | .RdYlGn .q1-3{fill:rgb(255,255,191)} 1264 | .RdYlGn .q2-3{fill:rgb(145,207,96)} 1265 | .RdYlGn .q0-4{fill:rgb(215,25,28)} 1266 | .RdYlGn .q1-4{fill:rgb(253,174,97)} 1267 | .RdYlGn .q2-4{fill:rgb(166,217,106)} 1268 | .RdYlGn .q3-4{fill:rgb(26,150,65)} 1269 | .RdYlGn .q0-5{fill:rgb(215,25,28)} 1270 | .RdYlGn .q1-5{fill:rgb(253,174,97)} 1271 | .RdYlGn .q2-5{fill:rgb(255,255,191)} 1272 | .RdYlGn .q3-5{fill:rgb(166,217,106)} 1273 | .RdYlGn .q4-5{fill:rgb(26,150,65)} 1274 | .RdYlGn .q0-6{fill:rgb(215,48,39)} 1275 | .RdYlGn .q1-6{fill:rgb(252,141,89)} 1276 | .RdYlGn .q2-6{fill:rgb(254,224,139)} 1277 | .RdYlGn .q3-6{fill:rgb(217,239,139)} 1278 | .RdYlGn .q4-6{fill:rgb(145,207,96)} 1279 | .RdYlGn .q5-6{fill:rgb(26,152,80)} 1280 | .RdYlGn .q0-7{fill:rgb(215,48,39)} 1281 | .RdYlGn .q1-7{fill:rgb(252,141,89)} 1282 | .RdYlGn .q2-7{fill:rgb(254,224,139)} 1283 | .RdYlGn .q3-7{fill:rgb(255,255,191)} 1284 | .RdYlGn .q4-7{fill:rgb(217,239,139)} 1285 | .RdYlGn .q5-7{fill:rgb(145,207,96)} 1286 | .RdYlGn .q6-7{fill:rgb(26,152,80)} 1287 | .RdYlGn .q0-8{fill:rgb(215,48,39)} 1288 | .RdYlGn .q1-8{fill:rgb(244,109,67)} 1289 | .RdYlGn .q2-8{fill:rgb(253,174,97)} 1290 | .RdYlGn .q3-8{fill:rgb(254,224,139)} 1291 | .RdYlGn .q4-8{fill:rgb(217,239,139)} 1292 | .RdYlGn .q5-8{fill:rgb(166,217,106)} 1293 | .RdYlGn .q6-8{fill:rgb(102,189,99)} 1294 | .RdYlGn .q7-8{fill:rgb(26,152,80)} 1295 | .RdYlGn .q0-9{fill:rgb(215,48,39)} 1296 | .RdYlGn .q1-9{fill:rgb(244,109,67)} 1297 | .RdYlGn .q2-9{fill:rgb(253,174,97)} 1298 | .RdYlGn .q3-9{fill:rgb(254,224,139)} 1299 | .RdYlGn .q4-9{fill:rgb(255,255,191)} 1300 | .RdYlGn .q5-9{fill:rgb(217,239,139)} 1301 | .RdYlGn .q6-9{fill:rgb(166,217,106)} 1302 | .RdYlGn .q7-9{fill:rgb(102,189,99)} 1303 | .RdYlGn .q8-9{fill:rgb(26,152,80)} 1304 | .RdYlGn .q0-10{fill:rgb(165,0,38)} 1305 | .RdYlGn .q1-10{fill:rgb(215,48,39)} 1306 | .RdYlGn .q2-10{fill:rgb(244,109,67)} 1307 | .RdYlGn .q3-10{fill:rgb(253,174,97)} 1308 | .RdYlGn .q4-10{fill:rgb(254,224,139)} 1309 | .RdYlGn .q5-10{fill:rgb(217,239,139)} 1310 | .RdYlGn .q6-10{fill:rgb(166,217,106)} 1311 | .RdYlGn .q7-10{fill:rgb(102,189,99)} 1312 | .RdYlGn .q8-10{fill:rgb(26,152,80)} 1313 | .RdYlGn .q9-10{fill:rgb(0,104,55)} 1314 | .RdYlGn .q0-11{fill:rgb(165,0,38)} 1315 | .RdYlGn .q1-11{fill:rgb(215,48,39)} 1316 | .RdYlGn .q2-11{fill:rgb(244,109,67)} 1317 | .RdYlGn .q3-11{fill:rgb(253,174,97)} 1318 | .RdYlGn .q4-11{fill:rgb(254,224,139)} 1319 | .RdYlGn .q5-11{fill:rgb(255,255,191)} 1320 | .RdYlGn .q6-11{fill:rgb(217,239,139)} 1321 | .RdYlGn .q7-11{fill:rgb(166,217,106)} 1322 | .RdYlGn .q8-11{fill:rgb(102,189,99)} 1323 | .RdYlGn .q9-11{fill:rgb(26,152,80)} 1324 | .RdYlGn .q10-11{fill:rgb(0,104,55)} 1325 | .Accent .q0-3{fill:rgb(127,201,127)} 1326 | .Accent .q1-3{fill:rgb(190,174,212)} 1327 | .Accent .q2-3{fill:rgb(253,192,134)} 1328 | .Accent .q0-4{fill:rgb(127,201,127)} 1329 | .Accent .q1-4{fill:rgb(190,174,212)} 1330 | .Accent .q2-4{fill:rgb(253,192,134)} 1331 | .Accent .q3-4{fill:rgb(255,255,153)} 1332 | .Accent .q0-5{fill:rgb(127,201,127)} 1333 | .Accent .q1-5{fill:rgb(190,174,212)} 1334 | .Accent .q2-5{fill:rgb(253,192,134)} 1335 | .Accent .q3-5{fill:rgb(255,255,153)} 1336 | .Accent .q4-5{fill:rgb(56,108,176)} 1337 | .Accent .q0-6{fill:rgb(127,201,127)} 1338 | .Accent .q1-6{fill:rgb(190,174,212)} 1339 | .Accent .q2-6{fill:rgb(253,192,134)} 1340 | .Accent .q3-6{fill:rgb(255,255,153)} 1341 | .Accent .q4-6{fill:rgb(56,108,176)} 1342 | .Accent .q5-6{fill:rgb(240,2,127)} 1343 | .Accent .q0-7{fill:rgb(127,201,127)} 1344 | .Accent .q1-7{fill:rgb(190,174,212)} 1345 | .Accent .q2-7{fill:rgb(253,192,134)} 1346 | .Accent .q3-7{fill:rgb(255,255,153)} 1347 | .Accent .q4-7{fill:rgb(56,108,176)} 1348 | .Accent .q5-7{fill:rgb(240,2,127)} 1349 | .Accent .q6-7{fill:rgb(191,91,23)} 1350 | .Accent .q0-8{fill:rgb(127,201,127)} 1351 | .Accent .q1-8{fill:rgb(190,174,212)} 1352 | .Accent .q2-8{fill:rgb(253,192,134)} 1353 | .Accent .q3-8{fill:rgb(255,255,153)} 1354 | .Accent .q4-8{fill:rgb(56,108,176)} 1355 | .Accent .q5-8{fill:rgb(240,2,127)} 1356 | .Accent .q6-8{fill:rgb(191,91,23)} 1357 | .Accent .q7-8{fill:rgb(102,102,102)} 1358 | .Dark2 .q0-3{fill:rgb(27,158,119)} 1359 | .Dark2 .q1-3{fill:rgb(217,95,2)} 1360 | .Dark2 .q2-3{fill:rgb(117,112,179)} 1361 | .Dark2 .q0-4{fill:rgb(27,158,119)} 1362 | .Dark2 .q1-4{fill:rgb(217,95,2)} 1363 | .Dark2 .q2-4{fill:rgb(117,112,179)} 1364 | .Dark2 .q3-4{fill:rgb(231,41,138)} 1365 | .Dark2 .q0-5{fill:rgb(27,158,119)} 1366 | .Dark2 .q1-5{fill:rgb(217,95,2)} 1367 | .Dark2 .q2-5{fill:rgb(117,112,179)} 1368 | .Dark2 .q3-5{fill:rgb(231,41,138)} 1369 | .Dark2 .q4-5{fill:rgb(102,166,30)} 1370 | .Dark2 .q0-6{fill:rgb(27,158,119)} 1371 | .Dark2 .q1-6{fill:rgb(217,95,2)} 1372 | .Dark2 .q2-6{fill:rgb(117,112,179)} 1373 | .Dark2 .q3-6{fill:rgb(231,41,138)} 1374 | .Dark2 .q4-6{fill:rgb(102,166,30)} 1375 | .Dark2 .q5-6{fill:rgb(230,171,2)} 1376 | .Dark2 .q0-7{fill:rgb(27,158,119)} 1377 | .Dark2 .q1-7{fill:rgb(217,95,2)} 1378 | .Dark2 .q2-7{fill:rgb(117,112,179)} 1379 | .Dark2 .q3-7{fill:rgb(231,41,138)} 1380 | .Dark2 .q4-7{fill:rgb(102,166,30)} 1381 | .Dark2 .q5-7{fill:rgb(230,171,2)} 1382 | .Dark2 .q6-7{fill:rgb(166,118,29)} 1383 | .Dark2 .q0-8{fill:rgb(27,158,119)} 1384 | .Dark2 .q1-8{fill:rgb(217,95,2)} 1385 | .Dark2 .q2-8{fill:rgb(117,112,179)} 1386 | .Dark2 .q3-8{fill:rgb(231,41,138)} 1387 | .Dark2 .q4-8{fill:rgb(102,166,30)} 1388 | .Dark2 .q5-8{fill:rgb(230,171,2)} 1389 | .Dark2 .q6-8{fill:rgb(166,118,29)} 1390 | .Dark2 .q7-8{fill:rgb(102,102,102)} 1391 | .Paired .q0-3{fill:rgb(166,206,227)} 1392 | .Paired .q1-3{fill:rgb(31,120,180)} 1393 | .Paired .q2-3{fill:rgb(178,223,138)} 1394 | .Paired .q0-4{fill:rgb(166,206,227)} 1395 | .Paired .q1-4{fill:rgb(31,120,180)} 1396 | .Paired .q2-4{fill:rgb(178,223,138)} 1397 | .Paired .q3-4{fill:rgb(51,160,44)} 1398 | .Paired .q0-5{fill:rgb(166,206,227)} 1399 | .Paired .q1-5{fill:rgb(31,120,180)} 1400 | .Paired .q2-5{fill:rgb(178,223,138)} 1401 | .Paired .q3-5{fill:rgb(51,160,44)} 1402 | .Paired .q4-5{fill:rgb(251,154,153)} 1403 | .Paired .q0-6{fill:rgb(166,206,227)} 1404 | .Paired .q1-6{fill:rgb(31,120,180)} 1405 | .Paired .q2-6{fill:rgb(178,223,138)} 1406 | .Paired .q3-6{fill:rgb(51,160,44)} 1407 | .Paired .q4-6{fill:rgb(251,154,153)} 1408 | .Paired .q5-6{fill:rgb(227,26,28)} 1409 | .Paired .q0-7{fill:rgb(166,206,227)} 1410 | .Paired .q1-7{fill:rgb(31,120,180)} 1411 | .Paired .q2-7{fill:rgb(178,223,138)} 1412 | .Paired .q3-7{fill:rgb(51,160,44)} 1413 | .Paired .q4-7{fill:rgb(251,154,153)} 1414 | .Paired .q5-7{fill:rgb(227,26,28)} 1415 | .Paired .q6-7{fill:rgb(253,191,111)} 1416 | .Paired .q0-8{fill:rgb(166,206,227)} 1417 | .Paired .q1-8{fill:rgb(31,120,180)} 1418 | .Paired .q2-8{fill:rgb(178,223,138)} 1419 | .Paired .q3-8{fill:rgb(51,160,44)} 1420 | .Paired .q4-8{fill:rgb(251,154,153)} 1421 | .Paired .q5-8{fill:rgb(227,26,28)} 1422 | .Paired .q6-8{fill:rgb(253,191,111)} 1423 | .Paired .q7-8{fill:rgb(255,127,0)} 1424 | .Paired .q0-9{fill:rgb(166,206,227)} 1425 | .Paired .q1-9{fill:rgb(31,120,180)} 1426 | .Paired .q2-9{fill:rgb(178,223,138)} 1427 | .Paired .q3-9{fill:rgb(51,160,44)} 1428 | .Paired .q4-9{fill:rgb(251,154,153)} 1429 | .Paired .q5-9{fill:rgb(227,26,28)} 1430 | .Paired .q6-9{fill:rgb(253,191,111)} 1431 | .Paired .q7-9{fill:rgb(255,127,0)} 1432 | .Paired .q8-9{fill:rgb(202,178,214)} 1433 | .Paired .q0-10{fill:rgb(166,206,227)} 1434 | .Paired .q1-10{fill:rgb(31,120,180)} 1435 | .Paired .q2-10{fill:rgb(178,223,138)} 1436 | .Paired .q3-10{fill:rgb(51,160,44)} 1437 | .Paired .q4-10{fill:rgb(251,154,153)} 1438 | .Paired .q5-10{fill:rgb(227,26,28)} 1439 | .Paired .q6-10{fill:rgb(253,191,111)} 1440 | .Paired .q7-10{fill:rgb(255,127,0)} 1441 | .Paired .q8-10{fill:rgb(202,178,214)} 1442 | .Paired .q9-10{fill:rgb(106,61,154)} 1443 | .Paired .q0-11{fill:rgb(166,206,227)} 1444 | .Paired .q1-11{fill:rgb(31,120,180)} 1445 | .Paired .q2-11{fill:rgb(178,223,138)} 1446 | .Paired .q3-11{fill:rgb(51,160,44)} 1447 | .Paired .q4-11{fill:rgb(251,154,153)} 1448 | .Paired .q5-11{fill:rgb(227,26,28)} 1449 | .Paired .q6-11{fill:rgb(253,191,111)} 1450 | .Paired .q7-11{fill:rgb(255,127,0)} 1451 | .Paired .q8-11{fill:rgb(202,178,214)} 1452 | .Paired .q9-11{fill:rgb(106,61,154)} 1453 | .Paired .q10-11{fill:rgb(255,255,153)} 1454 | .Paired .q0-12{fill:rgb(166,206,227)} 1455 | .Paired .q1-12{fill:rgb(31,120,180)} 1456 | .Paired .q2-12{fill:rgb(178,223,138)} 1457 | .Paired .q3-12{fill:rgb(51,160,44)} 1458 | .Paired .q4-12{fill:rgb(251,154,153)} 1459 | .Paired .q5-12{fill:rgb(227,26,28)} 1460 | .Paired .q6-12{fill:rgb(253,191,111)} 1461 | .Paired .q7-12{fill:rgb(255,127,0)} 1462 | .Paired .q8-12{fill:rgb(202,178,214)} 1463 | .Paired .q9-12{fill:rgb(106,61,154)} 1464 | .Paired .q10-12{fill:rgb(255,255,153)} 1465 | .Paired .q11-12{fill:rgb(177,89,40)} 1466 | .Pastel1 .q0-3{fill:rgb(251,180,174)} 1467 | .Pastel1 .q1-3{fill:rgb(179,205,227)} 1468 | .Pastel1 .q2-3{fill:rgb(204,235,197)} 1469 | .Pastel1 .q0-4{fill:rgb(251,180,174)} 1470 | .Pastel1 .q1-4{fill:rgb(179,205,227)} 1471 | .Pastel1 .q2-4{fill:rgb(204,235,197)} 1472 | .Pastel1 .q3-4{fill:rgb(222,203,228)} 1473 | .Pastel1 .q0-5{fill:rgb(251,180,174)} 1474 | .Pastel1 .q1-5{fill:rgb(179,205,227)} 1475 | .Pastel1 .q2-5{fill:rgb(204,235,197)} 1476 | .Pastel1 .q3-5{fill:rgb(222,203,228)} 1477 | .Pastel1 .q4-5{fill:rgb(254,217,166)} 1478 | .Pastel1 .q0-6{fill:rgb(251,180,174)} 1479 | .Pastel1 .q1-6{fill:rgb(179,205,227)} 1480 | .Pastel1 .q2-6{fill:rgb(204,235,197)} 1481 | .Pastel1 .q3-6{fill:rgb(222,203,228)} 1482 | .Pastel1 .q4-6{fill:rgb(254,217,166)} 1483 | .Pastel1 .q5-6{fill:rgb(255,255,204)} 1484 | .Pastel1 .q0-7{fill:rgb(251,180,174)} 1485 | .Pastel1 .q1-7{fill:rgb(179,205,227)} 1486 | .Pastel1 .q2-7{fill:rgb(204,235,197)} 1487 | .Pastel1 .q3-7{fill:rgb(222,203,228)} 1488 | .Pastel1 .q4-7{fill:rgb(254,217,166)} 1489 | .Pastel1 .q5-7{fill:rgb(255,255,204)} 1490 | .Pastel1 .q6-7{fill:rgb(229,216,189)} 1491 | .Pastel1 .q0-8{fill:rgb(251,180,174)} 1492 | .Pastel1 .q1-8{fill:rgb(179,205,227)} 1493 | .Pastel1 .q2-8{fill:rgb(204,235,197)} 1494 | .Pastel1 .q3-8{fill:rgb(222,203,228)} 1495 | .Pastel1 .q4-8{fill:rgb(254,217,166)} 1496 | .Pastel1 .q5-8{fill:rgb(255,255,204)} 1497 | .Pastel1 .q6-8{fill:rgb(229,216,189)} 1498 | .Pastel1 .q7-8{fill:rgb(253,218,236)} 1499 | .Pastel1 .q0-9{fill:rgb(251,180,174)} 1500 | .Pastel1 .q1-9{fill:rgb(179,205,227)} 1501 | .Pastel1 .q2-9{fill:rgb(204,235,197)} 1502 | .Pastel1 .q3-9{fill:rgb(222,203,228)} 1503 | .Pastel1 .q4-9{fill:rgb(254,217,166)} 1504 | .Pastel1 .q5-9{fill:rgb(255,255,204)} 1505 | .Pastel1 .q6-9{fill:rgb(229,216,189)} 1506 | .Pastel1 .q7-9{fill:rgb(253,218,236)} 1507 | .Pastel1 .q8-9{fill:rgb(242,242,242)} 1508 | .Pastel2 .q0-3{fill:rgb(179,226,205)} 1509 | .Pastel2 .q1-3{fill:rgb(253,205,172)} 1510 | .Pastel2 .q2-3{fill:rgb(203,213,232)} 1511 | .Pastel2 .q0-4{fill:rgb(179,226,205)} 1512 | .Pastel2 .q1-4{fill:rgb(253,205,172)} 1513 | .Pastel2 .q2-4{fill:rgb(203,213,232)} 1514 | .Pastel2 .q3-4{fill:rgb(244,202,228)} 1515 | .Pastel2 .q0-5{fill:rgb(179,226,205)} 1516 | .Pastel2 .q1-5{fill:rgb(253,205,172)} 1517 | .Pastel2 .q2-5{fill:rgb(203,213,232)} 1518 | .Pastel2 .q3-5{fill:rgb(244,202,228)} 1519 | .Pastel2 .q4-5{fill:rgb(230,245,201)} 1520 | .Pastel2 .q0-6{fill:rgb(179,226,205)} 1521 | .Pastel2 .q1-6{fill:rgb(253,205,172)} 1522 | .Pastel2 .q2-6{fill:rgb(203,213,232)} 1523 | .Pastel2 .q3-6{fill:rgb(244,202,228)} 1524 | .Pastel2 .q4-6{fill:rgb(230,245,201)} 1525 | .Pastel2 .q5-6{fill:rgb(255,242,174)} 1526 | .Pastel2 .q0-7{fill:rgb(179,226,205)} 1527 | .Pastel2 .q1-7{fill:rgb(253,205,172)} 1528 | .Pastel2 .q2-7{fill:rgb(203,213,232)} 1529 | .Pastel2 .q3-7{fill:rgb(244,202,228)} 1530 | .Pastel2 .q4-7{fill:rgb(230,245,201)} 1531 | .Pastel2 .q5-7{fill:rgb(255,242,174)} 1532 | .Pastel2 .q6-7{fill:rgb(241,226,204)} 1533 | .Pastel2 .q0-8{fill:rgb(179,226,205)} 1534 | .Pastel2 .q1-8{fill:rgb(253,205,172)} 1535 | .Pastel2 .q2-8{fill:rgb(203,213,232)} 1536 | .Pastel2 .q3-8{fill:rgb(244,202,228)} 1537 | .Pastel2 .q4-8{fill:rgb(230,245,201)} 1538 | .Pastel2 .q5-8{fill:rgb(255,242,174)} 1539 | .Pastel2 .q6-8{fill:rgb(241,226,204)} 1540 | .Pastel2 .q7-8{fill:rgb(204,204,204)} 1541 | .Set1 .q0-3{fill:rgb(228,26,28)} 1542 | .Set1 .q1-3{fill:rgb(55,126,184)} 1543 | .Set1 .q2-3{fill:rgb(77,175,74)} 1544 | .Set1 .q0-4{fill:rgb(228,26,28)} 1545 | .Set1 .q1-4{fill:rgb(55,126,184)} 1546 | .Set1 .q2-4{fill:rgb(77,175,74)} 1547 | .Set1 .q3-4{fill:rgb(152,78,163)} 1548 | .Set1 .q0-5{fill:rgb(228,26,28)} 1549 | .Set1 .q1-5{fill:rgb(55,126,184)} 1550 | .Set1 .q2-5{fill:rgb(77,175,74)} 1551 | .Set1 .q3-5{fill:rgb(152,78,163)} 1552 | .Set1 .q4-5{fill:rgb(255,127,0)} 1553 | .Set1 .q0-6{fill:rgb(228,26,28)} 1554 | .Set1 .q1-6{fill:rgb(55,126,184)} 1555 | .Set1 .q2-6{fill:rgb(77,175,74)} 1556 | .Set1 .q3-6{fill:rgb(152,78,163)} 1557 | .Set1 .q4-6{fill:rgb(255,127,0)} 1558 | .Set1 .q5-6{fill:rgb(255,255,51)} 1559 | .Set1 .q0-7{fill:rgb(228,26,28)} 1560 | .Set1 .q1-7{fill:rgb(55,126,184)} 1561 | .Set1 .q2-7{fill:rgb(77,175,74)} 1562 | .Set1 .q3-7{fill:rgb(152,78,163)} 1563 | .Set1 .q4-7{fill:rgb(255,127,0)} 1564 | .Set1 .q5-7{fill:rgb(255,255,51)} 1565 | .Set1 .q6-7{fill:rgb(166,86,40)} 1566 | .Set1 .q0-8{fill:rgb(228,26,28)} 1567 | .Set1 .q1-8{fill:rgb(55,126,184)} 1568 | .Set1 .q2-8{fill:rgb(77,175,74)} 1569 | .Set1 .q3-8{fill:rgb(152,78,163)} 1570 | .Set1 .q4-8{fill:rgb(255,127,0)} 1571 | .Set1 .q5-8{fill:rgb(255,255,51)} 1572 | .Set1 .q6-8{fill:rgb(166,86,40)} 1573 | .Set1 .q7-8{fill:rgb(247,129,191)} 1574 | .Set1 .q0-9{fill:rgb(228,26,28)} 1575 | .Set1 .q1-9{fill:rgb(55,126,184)} 1576 | .Set1 .q2-9{fill:rgb(77,175,74)} 1577 | .Set1 .q3-9{fill:rgb(152,78,163)} 1578 | .Set1 .q4-9{fill:rgb(255,127,0)} 1579 | .Set1 .q5-9{fill:rgb(255,255,51)} 1580 | .Set1 .q6-9{fill:rgb(166,86,40)} 1581 | .Set1 .q7-9{fill:rgb(247,129,191)} 1582 | .Set1 .q8-9{fill:rgb(153,153,153)} 1583 | .Set2 .q0-3{fill:rgb(102,194,165)} 1584 | .Set2 .q1-3{fill:rgb(252,141,98)} 1585 | .Set2 .q2-3{fill:rgb(141,160,203)} 1586 | .Set2 .q0-4{fill:rgb(102,194,165)} 1587 | .Set2 .q1-4{fill:rgb(252,141,98)} 1588 | .Set2 .q2-4{fill:rgb(141,160,203)} 1589 | .Set2 .q3-4{fill:rgb(231,138,195)} 1590 | .Set2 .q0-5{fill:rgb(102,194,165)} 1591 | .Set2 .q1-5{fill:rgb(252,141,98)} 1592 | .Set2 .q2-5{fill:rgb(141,160,203)} 1593 | .Set2 .q3-5{fill:rgb(231,138,195)} 1594 | .Set2 .q4-5{fill:rgb(166,216,84)} 1595 | .Set2 .q0-6{fill:rgb(102,194,165)} 1596 | .Set2 .q1-6{fill:rgb(252,141,98)} 1597 | .Set2 .q2-6{fill:rgb(141,160,203)} 1598 | .Set2 .q3-6{fill:rgb(231,138,195)} 1599 | .Set2 .q4-6{fill:rgb(166,216,84)} 1600 | .Set2 .q5-6{fill:rgb(255,217,47)} 1601 | .Set2 .q0-7{fill:rgb(102,194,165)} 1602 | .Set2 .q1-7{fill:rgb(252,141,98)} 1603 | .Set2 .q2-7{fill:rgb(141,160,203)} 1604 | .Set2 .q3-7{fill:rgb(231,138,195)} 1605 | .Set2 .q4-7{fill:rgb(166,216,84)} 1606 | .Set2 .q5-7{fill:rgb(255,217,47)} 1607 | .Set2 .q6-7{fill:rgb(229,196,148)} 1608 | .Set2 .q0-8{fill:rgb(102,194,165)} 1609 | .Set2 .q1-8{fill:rgb(252,141,98)} 1610 | .Set2 .q2-8{fill:rgb(141,160,203)} 1611 | .Set2 .q3-8{fill:rgb(231,138,195)} 1612 | .Set2 .q4-8{fill:rgb(166,216,84)} 1613 | .Set2 .q5-8{fill:rgb(255,217,47)} 1614 | .Set2 .q6-8{fill:rgb(229,196,148)} 1615 | .Set2 .q7-8{fill:rgb(179,179,179)} 1616 | .Set3 .q0-3{fill:rgb(141,211,199)} 1617 | .Set3 .q1-3{fill:rgb(255,255,179)} 1618 | .Set3 .q2-3{fill:rgb(190,186,218)} 1619 | .Set3 .q0-4{fill:rgb(141,211,199)} 1620 | .Set3 .q1-4{fill:rgb(255,255,179)} 1621 | .Set3 .q2-4{fill:rgb(190,186,218)} 1622 | .Set3 .q3-4{fill:rgb(251,128,114)} 1623 | .Set3 .q0-5{fill:rgb(141,211,199)} 1624 | .Set3 .q1-5{fill:rgb(255,255,179)} 1625 | .Set3 .q2-5{fill:rgb(190,186,218)} 1626 | .Set3 .q3-5{fill:rgb(251,128,114)} 1627 | .Set3 .q4-5{fill:rgb(128,177,211)} 1628 | .Set3 .q0-6{fill:rgb(141,211,199)} 1629 | .Set3 .q1-6{fill:rgb(255,255,179)} 1630 | .Set3 .q2-6{fill:rgb(190,186,218)} 1631 | .Set3 .q3-6{fill:rgb(251,128,114)} 1632 | .Set3 .q4-6{fill:rgb(128,177,211)} 1633 | .Set3 .q5-6{fill:rgb(253,180,98)} 1634 | .Set3 .q0-7{fill:rgb(141,211,199)} 1635 | .Set3 .q1-7{fill:rgb(255,255,179)} 1636 | .Set3 .q2-7{fill:rgb(190,186,218)} 1637 | .Set3 .q3-7{fill:rgb(251,128,114)} 1638 | .Set3 .q4-7{fill:rgb(128,177,211)} 1639 | .Set3 .q5-7{fill:rgb(253,180,98)} 1640 | .Set3 .q6-7{fill:rgb(179,222,105)} 1641 | .Set3 .q0-8{fill:rgb(141,211,199)} 1642 | .Set3 .q1-8{fill:rgb(255,255,179)} 1643 | .Set3 .q2-8{fill:rgb(190,186,218)} 1644 | .Set3 .q3-8{fill:rgb(251,128,114)} 1645 | .Set3 .q4-8{fill:rgb(128,177,211)} 1646 | .Set3 .q5-8{fill:rgb(253,180,98)} 1647 | .Set3 .q6-8{fill:rgb(179,222,105)} 1648 | .Set3 .q7-8{fill:rgb(252,205,229)} 1649 | .Set3 .q0-9{fill:rgb(141,211,199)} 1650 | .Set3 .q1-9{fill:rgb(255,255,179)} 1651 | .Set3 .q2-9{fill:rgb(190,186,218)} 1652 | .Set3 .q3-9{fill:rgb(251,128,114)} 1653 | .Set3 .q4-9{fill:rgb(128,177,211)} 1654 | .Set3 .q5-9{fill:rgb(253,180,98)} 1655 | .Set3 .q6-9{fill:rgb(179,222,105)} 1656 | .Set3 .q7-9{fill:rgb(252,205,229)} 1657 | .Set3 .q8-9{fill:rgb(217,217,217)} 1658 | .Set3 .q0-10{fill:rgb(141,211,199)} 1659 | .Set3 .q1-10{fill:rgb(255,255,179)} 1660 | .Set3 .q2-10{fill:rgb(190,186,218)} 1661 | .Set3 .q3-10{fill:rgb(251,128,114)} 1662 | .Set3 .q4-10{fill:rgb(128,177,211)} 1663 | .Set3 .q5-10{fill:rgb(253,180,98)} 1664 | .Set3 .q6-10{fill:rgb(179,222,105)} 1665 | .Set3 .q7-10{fill:rgb(252,205,229)} 1666 | .Set3 .q8-10{fill:rgb(217,217,217)} 1667 | .Set3 .q9-10{fill:rgb(188,128,189)} 1668 | .Set3 .q0-11{fill:rgb(141,211,199)} 1669 | .Set3 .q1-11{fill:rgb(255,255,179)} 1670 | .Set3 .q2-11{fill:rgb(190,186,218)} 1671 | .Set3 .q3-11{fill:rgb(251,128,114)} 1672 | .Set3 .q4-11{fill:rgb(128,177,211)} 1673 | .Set3 .q5-11{fill:rgb(253,180,98)} 1674 | .Set3 .q6-11{fill:rgb(179,222,105)} 1675 | .Set3 .q7-11{fill:rgb(252,205,229)} 1676 | .Set3 .q8-11{fill:rgb(217,217,217)} 1677 | .Set3 .q9-11{fill:rgb(188,128,189)} 1678 | .Set3 .q10-11{fill:rgb(204,235,197)} 1679 | .Set3 .q0-12{fill:rgb(141,211,199)} 1680 | .Set3 .q1-12{fill:rgb(255,255,179)} 1681 | .Set3 .q2-12{fill:rgb(190,186,218)} 1682 | .Set3 .q3-12{fill:rgb(251,128,114)} 1683 | .Set3 .q4-12{fill:rgb(128,177,211)} 1684 | .Set3 .q5-12{fill:rgb(253,180,98)} 1685 | .Set3 .q6-12{fill:rgb(179,222,105)} 1686 | .Set3 .q7-12{fill:rgb(252,205,229)} 1687 | .Set3 .q8-12{fill:rgb(217,217,217)} 1688 | .Set3 .q9-12{fill:rgb(188,128,189)} 1689 | .Set3 .q10-12{fill:rgb(204,235,197)} 1690 | .Set3 .q11-12{fill:rgb(255,237,111)} 1691 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/colorbrewer/colorbrewer.js: -------------------------------------------------------------------------------- 1 | // This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). 2 | var colorbrewer = {YlGn: { 3 | 3: ["#f7fcb9","#addd8e","#31a354"], 4 | 4: ["#ffffcc","#c2e699","#78c679","#238443"], 5 | 5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"], 6 | 6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"], 7 | 7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"], 8 | 8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"], 9 | 9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"] 10 | },YlGnBu: { 11 | 3: ["#edf8b1","#7fcdbb","#2c7fb8"], 12 | 4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"], 13 | 5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"], 14 | 6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"], 15 | 7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"], 16 | 8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"], 17 | 9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"] 18 | },GnBu: { 19 | 3: ["#e0f3db","#a8ddb5","#43a2ca"], 20 | 4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"], 21 | 5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"], 22 | 6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"], 23 | 7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"], 24 | 8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"], 25 | 9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"] 26 | },BuGn: { 27 | 3: ["#e5f5f9","#99d8c9","#2ca25f"], 28 | 4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"], 29 | 5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"], 30 | 6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"], 31 | 7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"], 32 | 8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"], 33 | 9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"] 34 | },PuBuGn: { 35 | 3: ["#ece2f0","#a6bddb","#1c9099"], 36 | 4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"], 37 | 5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"], 38 | 6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"], 39 | 7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"], 40 | 8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"], 41 | 9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"] 42 | },PuBu: { 43 | 3: ["#ece7f2","#a6bddb","#2b8cbe"], 44 | 4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"], 45 | 5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"], 46 | 6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"], 47 | 7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"], 48 | 8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"], 49 | 9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"] 50 | },BuPu: { 51 | 3: ["#e0ecf4","#9ebcda","#8856a7"], 52 | 4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"], 53 | 5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"], 54 | 6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"], 55 | 7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"], 56 | 8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"], 57 | 9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"] 58 | },RdPu: { 59 | 3: ["#fde0dd","#fa9fb5","#c51b8a"], 60 | 4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"], 61 | 5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"], 62 | 6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"], 63 | 7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"], 64 | 8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"], 65 | 9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"] 66 | },PuRd: { 67 | 3: ["#e7e1ef","#c994c7","#dd1c77"], 68 | 4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"], 69 | 5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"], 70 | 6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"], 71 | 7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"], 72 | 8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"], 73 | 9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"] 74 | },OrRd: { 75 | 3: ["#fee8c8","#fdbb84","#e34a33"], 76 | 4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"], 77 | 5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"], 78 | 6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"], 79 | 7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"], 80 | 8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"], 81 | 9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"] 82 | },YlOrRd: { 83 | 3: ["#ffeda0","#feb24c","#f03b20"], 84 | 4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"], 85 | 5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"], 86 | 6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"], 87 | 7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"], 88 | 8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"], 89 | 9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"] 90 | },YlOrBr: { 91 | 3: ["#fff7bc","#fec44f","#d95f0e"], 92 | 4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"], 93 | 5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"], 94 | 6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"], 95 | 7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"], 96 | 8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"], 97 | 9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"] 98 | },Purples: { 99 | 3: ["#efedf5","#bcbddc","#756bb1"], 100 | 4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"], 101 | 5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"], 102 | 6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"], 103 | 7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"], 104 | 8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"], 105 | 9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"] 106 | },Blues: { 107 | 3: ["#deebf7","#9ecae1","#3182bd"], 108 | 4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"], 109 | 5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"], 110 | 6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"], 111 | 7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"], 112 | 8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"], 113 | 9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"] 114 | },Greens: { 115 | 3: ["#e5f5e0","#a1d99b","#31a354"], 116 | 4: ["#edf8e9","#bae4b3","#74c476","#238b45"], 117 | 5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"], 118 | 6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"], 119 | 7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"], 120 | 8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"], 121 | 9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"] 122 | },Oranges: { 123 | 3: ["#fee6ce","#fdae6b","#e6550d"], 124 | 4: ["#feedde","#fdbe85","#fd8d3c","#d94701"], 125 | 5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"], 126 | 6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"], 127 | 7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"], 128 | 8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"], 129 | 9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"] 130 | },Reds: { 131 | 3: ["#fee0d2","#fc9272","#de2d26"], 132 | 4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"], 133 | 5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"], 134 | 6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"], 135 | 7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"], 136 | 8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"], 137 | 9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"] 138 | },Greys: { 139 | 3: ["#f0f0f0","#bdbdbd","#636363"], 140 | 4: ["#f7f7f7","#cccccc","#969696","#525252"], 141 | 5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"], 142 | 6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"], 143 | 7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"], 144 | 8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"], 145 | 9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"] 146 | },PuOr: { 147 | 3: ["#f1a340","#f7f7f7","#998ec3"], 148 | 4: ["#e66101","#fdb863","#b2abd2","#5e3c99"], 149 | 5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"], 150 | 6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"], 151 | 7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"], 152 | 8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"], 153 | 9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"], 154 | 10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"], 155 | 11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"] 156 | },BrBG: { 157 | 3: ["#d8b365","#f5f5f5","#5ab4ac"], 158 | 4: ["#a6611a","#dfc27d","#80cdc1","#018571"], 159 | 5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"], 160 | 6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"], 161 | 7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"], 162 | 8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"], 163 | 9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"], 164 | 10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"], 165 | 11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"] 166 | },PRGn: { 167 | 3: ["#af8dc3","#f7f7f7","#7fbf7b"], 168 | 4: ["#7b3294","#c2a5cf","#a6dba0","#008837"], 169 | 5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"], 170 | 6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"], 171 | 7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"], 172 | 8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"], 173 | 9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"], 174 | 10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"], 175 | 11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"] 176 | },PiYG: { 177 | 3: ["#e9a3c9","#f7f7f7","#a1d76a"], 178 | 4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"], 179 | 5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"], 180 | 6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"], 181 | 7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"], 182 | 8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"], 183 | 9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"], 184 | 10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"], 185 | 11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"] 186 | },RdBu: { 187 | 3: ["#ef8a62","#f7f7f7","#67a9cf"], 188 | 4: ["#ca0020","#f4a582","#92c5de","#0571b0"], 189 | 5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"], 190 | 6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"], 191 | 7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"], 192 | 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"], 193 | 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"], 194 | 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"], 195 | 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"] 196 | },RdGy: { 197 | 3: ["#ef8a62","#ffffff","#999999"], 198 | 4: ["#ca0020","#f4a582","#bababa","#404040"], 199 | 5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"], 200 | 6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"], 201 | 7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"], 202 | 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"], 203 | 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"], 204 | 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"], 205 | 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"] 206 | },RdYlBu: { 207 | 3: ["#fc8d59","#ffffbf","#91bfdb"], 208 | 4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"], 209 | 5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"], 210 | 6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"], 211 | 7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"], 212 | 8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"], 213 | 9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"], 214 | 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"], 215 | 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"] 216 | },Spectral: { 217 | 3: ["#fc8d59","#ffffbf","#99d594"], 218 | 4: ["#d7191c","#fdae61","#abdda4","#2b83ba"], 219 | 5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"], 220 | 6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"], 221 | 7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"], 222 | 8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"], 223 | 9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"], 224 | 10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"], 225 | 11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"] 226 | },RdYlGn: { 227 | 3: ["#fc8d59","#ffffbf","#91cf60"], 228 | 4: ["#d7191c","#fdae61","#a6d96a","#1a9641"], 229 | 5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"], 230 | 6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"], 231 | 7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"], 232 | 8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"], 233 | 9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"], 234 | 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"], 235 | 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"] 236 | },Accent: { 237 | 3: ["#7fc97f","#beaed4","#fdc086"], 238 | 4: ["#7fc97f","#beaed4","#fdc086","#ffff99"], 239 | 5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"], 240 | 6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"], 241 | 7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"], 242 | 8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"] 243 | },Dark2: { 244 | 3: ["#1b9e77","#d95f02","#7570b3"], 245 | 4: ["#1b9e77","#d95f02","#7570b3","#e7298a"], 246 | 5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"], 247 | 6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"], 248 | 7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"], 249 | 8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"] 250 | },Paired: { 251 | 3: ["#a6cee3","#1f78b4","#b2df8a"], 252 | 4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"], 253 | 5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"], 254 | 6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"], 255 | 7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"], 256 | 8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"], 257 | 9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"], 258 | 10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"], 259 | 11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"], 260 | 12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"] 261 | },Pastel1: { 262 | 3: ["#fbb4ae","#b3cde3","#ccebc5"], 263 | 4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"], 264 | 5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"], 265 | 6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"], 266 | 7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"], 267 | 8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"], 268 | 9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"] 269 | },Pastel2: { 270 | 3: ["#b3e2cd","#fdcdac","#cbd5e8"], 271 | 4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"], 272 | 5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"], 273 | 6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"], 274 | 7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"], 275 | 8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"] 276 | },Set1: { 277 | 3: ["#e41a1c","#377eb8","#4daf4a"], 278 | 4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"], 279 | 5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"], 280 | 6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"], 281 | 7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"], 282 | 8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"], 283 | 9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"] 284 | },Set2: { 285 | 3: ["#66c2a5","#fc8d62","#8da0cb"], 286 | 4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"], 287 | 5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"], 288 | 6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"], 289 | 7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"], 290 | 8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"] 291 | },Set3: { 292 | 3: ["#8dd3c7","#ffffb3","#bebada"], 293 | 4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"], 294 | 5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"], 295 | 6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"], 296 | 7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"], 297 | 8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"], 298 | 9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"], 299 | 10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"], 300 | 11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"], 301 | 12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"] 302 | }}; 303 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/d3/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | If you’re looking for ways to contribute, please [peruse open issues](https://github.com/mbostock/d3/issues?milestone=&page=1&state=open). The icebox is a good place to find ideas that are not currently in development. If you already have an idea, please check past issues to see whether your idea or a similar one was previously discussed. 4 | 5 | Before submitting a pull request, consider implementing a live example first, say using [bl.ocks.org](http://bl.ocks.org). Real-world use cases go a long way to demonstrating the usefulness of a proposed feature. The more complex a feature’s implementation, the more usefulness it should provide. Share your demo using the #d3js tag on Twitter or by sending it to the d3-js Google group. 6 | 7 | If your proposed feature does not involve changing core functionality, consider submitting it instead as a [D3 plugin](https://github.com/d3/d3-plugins). New core features should be for general use, whereas plugins are suitable for more specialized use cases. When in doubt, it’s easier to start with a plugin before “graduating” to core. 8 | 9 | To contribute new documentation or add examples to the gallery, just [edit the Wiki](https://github.com/mbostock/d3/wiki)! 10 | 11 | ## How to Submit a Pull Request 12 | 13 | 1. Click the “Fork” button to create your personal fork of the D3 repository. 14 | 15 | 2. After cloning your fork of the D3 repository in the terminal, run `npm install` to install D3’s dependencies. 16 | 17 | 3. Create a new branch for your new feature. For example: `git checkout -b my-awesome-feature`. A dedicated branch for your pull request means you can develop multiple features at the same time, and ensures that your pull request is stable even if you later decide to develop an unrelated feature. 18 | 19 | 4. The `d3.js` and `d3.min.js` files are built from source files in the `src` directory. _Do not edit `d3.js` directly._ Instead, edit the source files, and then run `make` to build the generated files. 20 | 21 | 5. Use `make test` to run tests and verify your changes. If you are adding a new feature, you should add new tests! If you are changing existing functionality, make sure the existing tests run, or update them as appropriate. 22 | 23 | 6. Sign D3’s [Individual Contributor License Agreement](https://docs.google.com/forms/d/1CzjdBKtDuA8WeuFJinadx956xLQ4Xriv7-oDvXnZMaI/viewform). Unless you are submitting a trivial patch (such as fixing a typo), this form is needed to verify that you are able to contribute. 24 | 25 | 7. Submit your pull request, and good luck! 26 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/d3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014, Michael Bostock 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * The name Michael Bostock may not be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 24 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/d3/README.md: -------------------------------------------------------------------------------- 1 | # Data-Driven Documents 2 | 3 | 4 | 5 | **D3.js** is a JavaScript library for manipulating documents based on data. **D3** helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation. 6 | 7 | Want to learn more? [See the wiki.](https://github.com/mbostock/d3/wiki) 8 | 9 | For examples, [see the gallery](https://github.com/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock). 10 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/d3/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "d3", 3 | "version": "3.5.3", 4 | "main": "d3.js", 5 | "scripts": [ 6 | "d3.js" 7 | ], 8 | "ignore": [ 9 | ".DS_Store", 10 | ".git", 11 | ".gitignore", 12 | ".npmignore", 13 | ".spmignore", 14 | ".travis.yml", 15 | "Makefile", 16 | "bin", 17 | "component.json", 18 | "composer.json", 19 | "index.js", 20 | "lib", 21 | "node_modules", 22 | "package.json", 23 | "src", 24 | "test" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/streamgraph/streamgraph.css: -------------------------------------------------------------------------------- 1 | .axis path, .axis line { 2 | fill: none; 3 | stroke: #ffffff; 4 | stroke-width: 2px; 5 | shape-rendering: crispEdges; 6 | } 7 | 8 | svg text { 9 | font: 10px "Gill Sans", "Helvetica", "sans-serif"; 10 | } 11 | 12 | select, option, label { 13 | font: 12px "Gill Sans", "Helvetica", "sans-serif"; 14 | } 15 | -------------------------------------------------------------------------------- /inst/htmlwidgets/streamgraph.js: -------------------------------------------------------------------------------- 1 | var dbg, dbg2, dbg3, dbgs, dbgy, dbgx; 2 | 3 | HTMLWidgets.widget({ 4 | 5 | name: 'streamgraph', 6 | 7 | type: 'output', 8 | 9 | initialize: function(el, width, height) { 10 | return { }; 11 | }, 12 | 13 | renderValue: function(el, params, instance) { 14 | instance.params = params; 15 | this.drawGraphic(el, params, el.offsetWidth, el.offsetHeight); 16 | }, 17 | 18 | drawGraphic: function(el, params, width, height) { 19 | 20 | // remove existing children 21 | while (el.firstChild) 22 | el.removeChild(el.firstChild); 23 | 24 | var format = d3.time.format("%Y-%m-%d"); 25 | 26 | dbg = params ; 27 | 28 | // reformat the data 29 | var data = HTMLWidgets.dataframeToD3(params.data) ; 30 | 31 | data.forEach(function(d) { 32 | if (params.x_scale == "date") { 33 | d.date = format.parse(d.date); 34 | } else { 35 | d.date = +d.date; 36 | } 37 | d.value = +d.value; 38 | }); 39 | 40 | dbg2 = data; 41 | 42 | // assign colors 43 | 44 | var colorrange = []; 45 | var tooltip ; 46 | var opacity = 0.33 ; 47 | 48 | var ncols = d3.map(data, function(d) { return(d.key) }).keys().length; 49 | if (ncols <= 2) { ncols = 3 ; } 50 | 51 | if (params.fill == "brewer") { 52 | if (ncols > 9) ncols = 9; 53 | colorrange = colorbrewer[params.palette][ncols]; 54 | console.log(colorrange); 55 | } else if (params.fill == "manual") { 56 | colorrange = params.palette; 57 | } 58 | strokecolor = colorrange[0]; 59 | 60 | // setup size, scales and axes 61 | 62 | var margin = { top: params.top, right: params.right, 63 | bottom: params.bottom, left: params.left }; 64 | width = width - margin.left - margin.right; 65 | height = height - margin.top - margin.bottom; 66 | 67 | var x = (params.x_scale == "date") ? d3.time.scale().range([0, width]) : d3.scale.linear().range([0, width]); 68 | 69 | var y = d3.scale.linear().range([height-10, 0]); 70 | 71 | var z = d3.scale.ordinal().range(colorrange); 72 | 73 | if (params.sort) { 74 | console.log("SORTING"); 75 | z = z.domain(d3.set(data.map(function(d) { return(d.key) })).values().sort()); 76 | } else { 77 | console.log("NOT SORTING"); 78 | z = z.domain(d3.set(data.map(function(d) { return(d.key) })).values()); 79 | } 80 | 81 | var bisectDate = d3.bisector(function(d) { return d.date; }).left; 82 | 83 | var xAxis = d3.svg.axis().scale(x) 84 | .orient("bottom") 85 | .tickPadding(8); 86 | 87 | if (params.x_scale == "continuous") { 88 | xAxis = xAxis.ticks(params.x_tick_interval) 89 | .tickFormat(d3.format(params.x_tick_format)); 90 | } else { 91 | xAxis = xAxis.ticks(d3.time[params.x_tick_units], params.x_tick_interval) 92 | .tickFormat(d3.time.format(params.x_tick_format)); 93 | } 94 | 95 | var yAxis = d3.svg.axis().scale(y) 96 | .ticks(params.y_tick_count) 97 | .tickFormat(d3.format(params.y_tick_format)) 98 | .orient("left"); 99 | 100 | // all the magic is here 101 | 102 | var stack = d3.layout.stack() 103 | .offset(params.offset) 104 | .order(params.order) 105 | .values(function(d) { return d.values; }) 106 | .x(function(d) { return d.date; }) 107 | .y(function(d) { return d.value; }); 108 | 109 | dbg_stack = stack ; 110 | 111 | var nest = d3.nest() 112 | .key(function(d) { return d.key; }); 113 | 114 | var area = d3.svg.area() 115 | .interpolate(params.interpolate) 116 | .x(function(d) { return x(d.date); }) 117 | .y0(function(d) { return y(d.y0); }) 118 | .y1(function(d) { return y(d.y0 + d.y); }); 119 | 120 | // build the final svg 121 | 122 | var svg = d3.select("#" + el.id).append("svg") 123 | .attr("width", width + margin.left + margin.right) 124 | .attr("height", height + margin.top + margin.bottom) 125 | .append("g") 126 | .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); 127 | 128 | dbgs = svg ; 129 | 130 | dbg_nest = nest.entries(data) ; 131 | 132 | var layers = stack(nest.entries(data)); 133 | 134 | x.domain(d3.extent(data, function(d) { return d.date; })); 135 | 136 | // experimental support for negative y axis 137 | 138 | var y_min = d3.min(data, function(d) { return d.y0 + d.y; }); 139 | if (y_min > 0) { y_min = 0; } 140 | y.domain([y_min, d3.max(data, function(d) { return d.y0 + d.y; })]); 141 | 142 | dbgx = x ; 143 | dbgy = y ; 144 | 145 | svg.selectAll(".layer") 146 | .data(layers) 147 | .enter().append("path") 148 | .attr("class", "layer") 149 | .attr("d", function(d) { return area(d.values); }) 150 | .style("fill", function(d, i) { return z(d.key); }); 151 | 152 | // TODO legends for non-interactive 153 | // TODO add tracker vertical line 154 | 155 | if (params.interactive) { 156 | 157 | tooltip = svg.append("g") 158 | .attr("transform", "translate(30,10)") 159 | .append("text"); 160 | 161 | svg.selectAll(".layer") 162 | .attr("opacity", 1) 163 | .on("mouseover", function(d, i) { 164 | svg.selectAll(".layer").transition() 165 | .duration(150) 166 | .attr("opacity", function(d, j) { 167 | return j != i ? opacity : 1; 168 | })}) 169 | 170 | // track mouse, figure out value, update tooltip 171 | 172 | .on("mousemove", function(dd, i) { 173 | 174 | d3.select("#" + el.id + "-select") 175 | .selectAll("option") 176 | .attr("selected", function(d, i) { if (i===0) { return("selected") } }); 177 | 178 | function iskey(key) { 179 | return(function(element) { 180 | return(element.key==key); 181 | }); 182 | } 183 | 184 | var subset = data.filter(iskey(dd.key)); 185 | 186 | var x0 = x.invert(d3.mouse(this)[0]), 187 | j = bisectDate(subset, x0, 1), 188 | d0 = subset[j - 1], 189 | d1 = subset[j], 190 | d = x0 - d0.date > d1.date - x0 ? d1 : d0; 191 | 192 | d3.select(this) 193 | .classed("hover", true) 194 | .attr("stroke", strokecolor) 195 | .attr("stroke-width", "0.5px"); 196 | 197 | tooltip.text(dd.key + ": " + d.value).attr("fill", params.tooltip); 198 | 199 | }) 200 | 201 | // restore opacity/clear tooltip/etc on mouseout 202 | 203 | .on("mouseout", function(d, i) { 204 | 205 | svg.selectAll(".layer") 206 | .transition() 207 | .duration(250) 208 | .attr("opacity", "1"); 209 | 210 | d3.select(this) 211 | .classed("hover", false) 212 | .attr("stroke-width", "0px"); 213 | 214 | tooltip.text(""); 215 | 216 | }); 217 | } 218 | 219 | svg.append("g") 220 | .attr("class", "x axis") 221 | .attr("transform", "translate(0," + height + ")") 222 | .attr("fill", params.text) 223 | .call(xAxis); 224 | 225 | svg.append("g") 226 | .attr("class", "y axis") 227 | .attr("fill", params.text) 228 | .call(yAxis); 229 | 230 | function onselchange() { 231 | 232 | var selected_value = d3.event.target.value; 233 | 234 | tooltip.text(""); 235 | 236 | if (selected_value == "--- Select ---") { 237 | 238 | d3.selectAll("#" + el.id + " .layer") 239 | .transition() 240 | .duration(250) 241 | .attr("opacity", "1") 242 | .classed("hover", false) 243 | .attr("stroke-width", "0px"); 244 | 245 | } else { 246 | 247 | d3.selectAll("#" + el.id + " .layer") 248 | .classed("hover", function(d) { 249 | return d.key != selected_value ? false : true; 250 | }) 251 | .transition() 252 | .duration(150) 253 | .attr("opacity", function(d) { 254 | return d.key != selected_value ? opacity : 1; 255 | }) 256 | .attr("stroke", strokecolor) 257 | .attr("stroke-width", function(d) { 258 | return d.key != selected_value ? "0px" : "0.5px"; 259 | }); 260 | } 261 | 262 | } 263 | 264 | if (params.legend && params.interactive) { 265 | 266 | if (params.legend_label !== "") { 267 | d3.select("#" + el.id + "-legend label") 268 | .text(params.legend_label) 269 | .style("color", params.label_col); 270 | } 271 | 272 | var select = d3.select("#" + el.id + "-select") 273 | .style("visibility", "visible") 274 | .on('change', onselchange); 275 | 276 | var selopts = d3.set(data.map(function(d) { return(d.key) })).values(); 277 | selopts.unshift("--- Select ---"); 278 | 279 | var options = d3.select("#" + el.id + "-select") 280 | .selectAll('option') 281 | .data(selopts).enter() 282 | .append('option') 283 | .text(function (d) { return d; }) 284 | .attr("value", function (d) { return d; }); 285 | } 286 | 287 | if (params.annotations !== null) { 288 | 289 | var ann = HTMLWidgets.dataframeToD3(params.annotations) ; 290 | 291 | ann.forEach(function(d) { 292 | if (params.x_scale == "date") { 293 | d.x = format.parse(d.x); 294 | } else { 295 | d.x = +d.x; 296 | } 297 | }); 298 | 299 | svg.selectAll(".annotation") 300 | .data(ann) 301 | .enter().append("text") 302 | .attr("x", function(d) { return(x(d.x)) ; }) 303 | .attr("y", function(d) { return(y(d.y)) ; }) 304 | .attr("fill", function(d) { return(d.color) ; }) 305 | .style("font-size", function(d) { return(d.size+"px") ; }) 306 | .text(function(d) { return(d.label) ;}); 307 | } 308 | 309 | if (params.markers !== null) { 310 | 311 | var mrk = HTMLWidgets.dataframeToD3(params.markers) ; 312 | 313 | mrk.forEach(function(d) { 314 | if (params.x_scale == "date") { 315 | d.x = format.parse(d.x); 316 | } else { 317 | d.x = +d.x; 318 | } 319 | }); 320 | 321 | dbg3 = mrk ; 322 | svg.selectAll(".marker") 323 | .data(mrk) 324 | .enter().append("line") 325 | .attr("x1", function(d) { return(x(d.x)) ; }) 326 | .attr("x2", function(d) { return(x(d.x)) ; }) 327 | .attr("y1", function(d) { return(y.range()[0]) ; }) 328 | .attr("y2", function(d) { return(y.range()[1]) ; }) 329 | .attr("stroke-width", function(d) { return(d.stroke_width); }) 330 | .attr("stroke", function(d) { return(d.stroke); }) 331 | .attr("stroke-dasharray", "1"); 332 | 333 | svg.selectAll(".markerlab") 334 | .data(mrk) 335 | .enter().append("text") 336 | .attr("x", function(d) { 337 | if (d.anchor=="end") { d.space = -d.space; } 338 | if (d.anchor=="middle") { d.space = 0; } 339 | return(x(d.x)+d.space) ; 340 | }) 341 | .attr("y", function(d) { return(y(d.y)) ; }) 342 | .attr("fill", function(d) { return(d.color) ; }) 343 | .style("font-size", function(d) { return(d.size+"px") ; }) 344 | .style("text-anchor", function(d) { return(d.anchor) ; }) 345 | .text(function(d) { return(d.label) ;}); 346 | 347 | } 348 | 349 | }, 350 | 351 | resize: function(el, width, height, instance) { 352 | if (instance.params) 353 | this.drawGraphic(el, instance.params, width, height); 354 | } 355 | 356 | }); 357 | -------------------------------------------------------------------------------- /inst/htmlwidgets/streamgraph.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: d3 3 | version: 3.5.3 4 | src: htmlwidgets/lib/d3 5 | script: d3.min.js 6 | - name: colorbrewer 7 | version: 1.0 8 | src: htmlwidgets/lib/colorbrewer 9 | script: colorbrewer.js 10 | stylesheet: colorbrewer.css 11 | - name: streamgraph 12 | version: 1.0 13 | src: htmlwidgets/lib/streamgraph 14 | stylesheet: streamgraph.css 15 | -------------------------------------------------------------------------------- /man/renderStreamgraph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/shiny.r 3 | \name{renderStreamgraph} 4 | \alias{renderStreamgraph} 5 | \title{Widget render function for use in Shiny} 6 | \usage{ 7 | renderStreamgraph(expr, env = parent.frame(), quoted = FALSE) 8 | } 9 | \arguments{ 10 | \item{expr}{expr} 11 | 12 | \item{env}{env} 13 | 14 | \item{quoted}{quoted} 15 | } 16 | \description{ 17 | Widget render function for use in Shiny 18 | } 19 | -------------------------------------------------------------------------------- /man/sg_add_marker.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/marker.r 3 | \name{sg_add_marker} 4 | \alias{sg_add_marker} 5 | \title{Add a vertical marker (with optional label) to streamgraph} 6 | \usage{ 7 | sg_add_marker(sg, x, label = "", stroke_width = 0.5, 8 | stroke = "#7f7f7f", space = 5, y = 0, color = "#7f7f7f", 9 | size = 12, anchor = "start") 10 | } 11 | \arguments{ 12 | \item{sg}{streamgraph object} 13 | 14 | \item{x}{horizontal position} 15 | 16 | \item{label}{text for the annotation} 17 | 18 | \item{stroke_width}{line width} 19 | 20 | \item{stroke}{line color} 21 | 22 | \item{space}{space (in points) from the marker to place the label} 23 | 24 | \item{y}{vertical position} 25 | 26 | \item{color}{color of the label} 27 | 28 | \item{size}{font size#' @export} 29 | 30 | \item{anchor}{how to justify the label (one of \code{start} [left], 31 | \code{middle} [center] or \code{end} [right])} 32 | } 33 | \description{ 34 | This is useful for marking/labeling notable events along the streams. 35 | } 36 | -------------------------------------------------------------------------------- /man/sg_annotate.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/annotate.r 3 | \name{sg_annotate} 4 | \alias{sg_annotate} 5 | \title{Add text annotation to streamgraph} 6 | \usage{ 7 | sg_annotate(sg, label, x, y, color = "black", size = 12) 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{label}{text for the annotation} 13 | 14 | \item{x}{horizontal position} 15 | 16 | \item{y}{vertical position} 17 | 18 | \item{color}{color of the label} 19 | 20 | \item{size}{font size} 21 | } 22 | \description{ 23 | Use this function to place text at any point on a streamgraph. This 24 | is especially useful for non-interactive streamgraphs (i.e. to label 25 | a particular stream). 26 | } 27 | -------------------------------------------------------------------------------- /man/sg_axis_x.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/sg_axis_x.r 3 | \name{sg_axis_x} 4 | \alias{sg_axis_x} 5 | \title{Modify streamgraph x axis formatting} 6 | \usage{ 7 | sg_axis_x(sg, tick_interval = NULL, tick_units = NULL, 8 | tick_format = NULL) 9 | } 10 | \arguments{ 11 | \item{sg}{streamgraph object} 12 | 13 | \item{tick_interval}{tick interval} 14 | 15 | \item{tick_units}{units for the ticks} 16 | 17 | \item{tick_format}{how to show the labels (subset of \code{strftime} 18 | formatters for \code{date} scale, otherwise \code{sprintf} formats for 19 | \code{continuous} scale) (defaults to \code{\%b} - must specify if \code{continuous}). 20 | See \href{D3 formatting}{https://github.com/mbostock/d3/wiki/Formatting} for more details.} 21 | } 22 | \value{ 23 | streamgraph object 24 | } 25 | \description{ 26 | Change the tick interval, units and label text display format for the 27 | streamgraph x axis. 28 | } 29 | \examples{ 30 | \dontrun{ 31 | library(dplyr) 32 | library(streamgraph) 33 | ggplot2movies::movies \%>\% 34 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 35 | tidyr::gather(genre, value, -year) \%>\% 36 | group_by(year, genre) \%>\% 37 | tally(wt=value) \%>\% 38 | ungroup \%>\% 39 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 40 | 41 | streamgraph(dat, "genre", "n", "year") \%>\% 42 | sg_axis_x(20, "year", "\%Y") 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /man/sg_axis_y.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/sg_axis_y.r 3 | \name{sg_axis_y} 4 | \alias{sg_axis_y} 5 | \title{Modify streamgraph y axis formatting} 6 | \usage{ 7 | sg_axis_y(sg, tick_count = 5, tick_format = ",g") 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{tick_count}{number of y axis ticks, not tick interval (defaults to \code{5}); 13 | make this \code{0} if you want to hide the y axis labels} 14 | 15 | \item{tick_format}{d3 \href{https://github.com/mbostock/d3/wiki/Formatting#d3_format}{tick format} string} 16 | } 17 | \value{ 18 | streamgraph object 19 | } 20 | \description{ 21 | Change the tick count & format 22 | } 23 | \examples{ 24 | \dontrun{ 25 | library(dplyr) 26 | library(streamgraph) 27 | ggplot2movies::movies \%>\% 28 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 29 | tidyr::gather(genre, value, -year) \%>\% 30 | group_by(year, genre) \%>\% 31 | tally(wt=value) \%>\% 32 | ungroup \%>\% 33 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 34 | 35 | streamgraph(dat, "genre", "n", "year") \%>\% 36 | sg_axis_x(20, "year", "\%Y") \%>\% 37 | sg_axis_y(0) 38 | }#' @export 39 | } 40 | -------------------------------------------------------------------------------- /man/sg_colors.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/color.r 3 | \name{sg_colors} 4 | \alias{sg_colors} 5 | \title{Modify streamgraph colors} 6 | \usage{ 7 | sg_colors(sg, palette = NULL, axis_color = "black", 8 | tooltip_color = "black", label_color = "black") 9 | } 10 | \arguments{ 11 | \item{sg}{streamgraph object} 12 | 13 | \item{palette}{UNUSED; being removed in next release; use \code{sg_fill_*} instead} 14 | 15 | \item{axis_color}{color of the axis text (defaults to "\code{black}")} 16 | 17 | \item{tooltip_color}{color of the tooltip text (defaults to "\code{black}")} 18 | 19 | \item{label_color}{color of the label text for the legend select menu (defaults to "\code{black}")} 20 | } 21 | \value{ 22 | streamgraph object 23 | } 24 | \description{ 25 | Change the ColorBrewer palette being used 26 | } 27 | \examples{ 28 | \dontrun{ 29 | library(dplyr) 30 | library(streamgraph) 31 | ggplot2movies::movies \%>\% 32 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 33 | tidyr::gather(genre, value, -year) \%>\% 34 | group_by(year, genre) \%>\% 35 | tally(wt=value) \%>\% 36 | ungroup \%>\% 37 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 38 | 39 | streamgraph(dat, "genre", "n", "year") \%>\% 40 | sg_colors("PuOr") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /man/sg_fill_brewer.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/color.r 3 | \name{sg_fill_brewer} 4 | \alias{sg_fill_brewer} 5 | \title{Use ColorBrewer palettes for streamgraph fill colors} 6 | \usage{ 7 | sg_fill_brewer(sg, palette = "Spectral") 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{palette}{ColorBrewer pallete atomic character value (defaults to \code{Spectral})} 13 | } 14 | \value{ 15 | streamgraph object 16 | } 17 | \description{ 18 | ColorBrewer provides sequential, diverging and qualitative colour schemes 19 | which are particularly suited and tested to display categorical values. 20 | } 21 | \examples{ 22 | \dontrun{ 23 | library(dplyr) 24 | library(streamgraph) 25 | ggplot2movies::movies \%>\% 26 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 27 | tidyr::gather(genre, value, -year) \%>\% 28 | group_by(year, genre) \%>\% 29 | tally(wt=value) \%>\% 30 | ungroup \%>\% 31 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 32 | 33 | streamgraph(dat, "genre", "n", "year") \%>\% 34 | sg_fill_brewer("PuOr") 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /man/sg_fill_manual.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/color.r 3 | \name{sg_fill_manual} 4 | \alias{sg_fill_manual} 5 | \title{Use manual colors for streamgraph fill colors} 6 | \usage{ 7 | sg_fill_manual(sg, values = NULL) 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{values}{character vector of} 13 | } 14 | \value{ 15 | streamgraph object 16 | } 17 | \description{ 18 | Specify a vector of colors (e.g. \code{c("red", "#00ff00", rgb(0,0,1))}) to 19 | use for the color scale. Note that \code{streamgraph} sorts the categorical values 20 | before assigning the mappings, which means you can use that as a determinstic way of 21 | assigning specific colors to categories. If the number of categories 22 | exceeds the number of colors in the palette, the colors will be reused in order. 23 | } 24 | \examples{ 25 | \dontrun{ 26 | library(dplyr) 27 | library(streamgraph) 28 | ggplot2movies::movies \%>\% 29 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 30 | tidyr::gather(genre, value, -year) \%>\% 31 | group_by(year, genre) \%>\% 32 | tally(wt=value) \%>\% 33 | ungroup \%>\% 34 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 35 | 36 | streamgraph(dat, "genre", "n", "year") \%>\% 37 | sg_fill_manual(c("black", "#ffa500", "blue", "white", "#00ff00", "red")) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /man/sg_fill_tableau.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/color.r 3 | \name{sg_fill_tableau} 4 | \alias{sg_fill_tableau} 5 | \title{Use Tableau discrete palettes for streamgraph fill colors} 6 | \usage{ 7 | sg_fill_tableau(sg, palette = "tableau20") 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{palette}{Tableau discrete pallete atomic character value (defaults to \code{tableau20}). Must be one of 13 | \code{c("tableau20", "tableau10medium", "gray5", "colorblind10", "trafficlight", "purplegray12", "bluered12", "greenorange12", "cyclic")}} 14 | } 15 | \value{ 16 | streamgraph object 17 | } 18 | \description{ 19 | Tableau discrete palettes provide colour schemes 20 | which are particularly suited and tested to display categorical values. 21 | } 22 | \examples{ 23 | \dontrun{ 24 | library(dplyr) 25 | library(streamgraph) 26 | ggplot2movies::movies \%>\% 27 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 28 | tidyr::gather(genre, value, -year) \%>\% 29 | group_by(year, genre) \%>\% 30 | tally(wt=value) \%>\% 31 | ungroup \%>\% 32 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 33 | 34 | streamgraph(dat, "genre", "n", "year") \%>\% 35 | sg_fill_tableau("purplegray12") 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /man/sg_legend.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/legend.r 3 | \name{sg_legend} 4 | \alias{sg_legend} 5 | \title{Modify streamgraph legend properties} 6 | \usage{ 7 | sg_legend(sg, show = FALSE, label = "") 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{show}{if this is \code{TRUE} and \code{interactive} is \code{TRUE} then a popup menu 13 | will be available that lists ll the keys in the data set. Selecting a key will 14 | perform the same action as hovering over the area with the mouse.} 15 | 16 | \item{label}{label for the legend (optional)} 17 | } 18 | \description{ 19 | If the \code{streamgraph} is interactive, a "legend" can be added 20 | that displays a select menu of all the stream categories. Selecting 21 | a category will highlight that stream in the graph. 22 | } 23 | \details{ 24 | TODO: legends for non-interactive streamgraphs 25 | } 26 | \examples{ 27 | \dontrun{ 28 | library(dplyr) 29 | library(streamgraph) 30 | ggplot2movies::movies \%>\% 31 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 32 | tidyr::gather(genre, value, -year) \%>\% 33 | group_by(year, genre) \%>\% 34 | tally(wt=value) \%>\% 35 | ungroup \%>\% 36 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 37 | 38 | streamgraph(dat, "genre", "n", "year") \%>\% 39 | sg_fill_brewer("PuOr") \%>\% 40 | sg_legend(TRUE, "Genre: ") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /man/sg_title.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/streamgraph.R 3 | \name{sg_title} 4 | \alias{sg_title} 5 | \title{Add a title to the streamgraph} 6 | \usage{ 7 | sg_title(sg, title = "") 8 | } 9 | \arguments{ 10 | \item{sg}{streamgraph object} 11 | 12 | \item{title}{title} 13 | } 14 | \value{ 15 | THIS DOES NOT RETURN AN \code{htmlwidget}!! It returns a \code{shiny.tag} 16 | class HTML (the widget is wrapped in a \code{
}). It should be the LAST 17 | call in a magrittr pipe chain or called to wrap a streamgraph object for 18 | output 19 | } 20 | \description{ 21 | Add a title to the streamgraph 22 | } 23 | -------------------------------------------------------------------------------- /man/streamgraph-exports.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/streamgraph-package.R 3 | \name{streamgraph-exports} 4 | \alias{streamgraph-exports} 5 | \alias{\%>\%} 6 | \title{streamgraph exported operators} 7 | \description{ 8 | The following functions are imported and then re-exported 9 | from the metricsgraphics package to enable use of the magrittr 10 | pipe operator with no additional library calls 11 | } 12 | -------------------------------------------------------------------------------- /man/streamgraph-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/streamgraph-package.R 3 | \docType{package} 4 | \name{streamgraph-package} 5 | \alias{streamgraph-package} 6 | \title{A package to make \href{http://www.leebyron.com/else/streamgraph/}{streamgraphs}} 7 | \description{ 8 | A package to make \href{http://www.leebyron.com/else/streamgraph/}{streamgraphs} 9 | } 10 | \author{ 11 | Bob Rudis (@hrbrmstr) 12 | } 13 | -------------------------------------------------------------------------------- /man/streamgraph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/streamgraph.R 3 | \name{streamgraph} 4 | \alias{streamgraph} 5 | \title{Create a new streamgraph} 6 | \usage{ 7 | streamgraph(data, key, value, date, width = NULL, height = NULL, 8 | offset = "silhouette", interpolate = "cardinal", 9 | interactive = TRUE, scale = "date", top = 20, right = 40, 10 | bottom = 30, left = 50, sort = TRUE, complete = TRUE, 11 | order = c("compat", "asis", "inside-out", "reverse")) 12 | } 13 | \arguments{ 14 | \item{data}{data frame} 15 | 16 | \item{key}{bare or quoted name of the category column (defaults to \code{key})} 17 | 18 | \item{value}{bare or quoted name of the value column (defaults to \code{value})} 19 | 20 | \item{date}{bare or quoted name of the date column (defaults to \code{date})} 21 | 22 | \item{width}{Width in pixels (optional, defaults to automatic sizing)} 23 | 24 | \item{height}{Height in pixels (optional, defaults to automatic sizing)} 25 | 26 | \item{offset}{see d3's \href{https://github.com/mbostock/d3/wiki/Stack-Layout#offset}{offset layout} for more details. 27 | The default is probably fine for most uses but can be one of \code{silhouette} (default), 28 | \code{wiggle}, \code{expand} or \code{zero}} 29 | 30 | \item{interpolate}{see d3's \href{https://github.com/mbostock/d3/wiki/SVG-Shapes#area_interpolate}{area interpolation} for more details. 31 | The default is probably fine fore most uses, but can be one of \code{cardinal} (default), 32 | \code{linear}, \code{step}, \code{step-before}, \code{step-after}, \code{basis}, \code{basis-open}, 33 | \code{cardinal-open}, \code{monotone}} 34 | 35 | \item{interactive}{set to \code{FALSE} if you do not want an interactive streamgraph} 36 | 37 | \item{scale}{axis scale (\code{date} [default] or \code{continuous})} 38 | 39 | \item{top}{top margin (default should be fine, this allows for fine-tuning plot space)} 40 | 41 | \item{right}{right margin (default should be fine, this allows for fine-tuning plot space)} 42 | 43 | \item{bottom}{bottom margin (default should be fine, this allows for fine-tuning plot space)} 44 | 45 | \item{left}{left margin (default should be fine, this allows for fine-tuning plot space)} 46 | 47 | \item{sort}{experimental} 48 | 49 | \item{complete}{experimental} 50 | 51 | \item{order}{streamgraph ribbon order. "`compat`" to match the orignial package behavior, 52 | "`asis`" to use the input order, "`inside-out`" to sort by index of maximum value, 53 | then use balanced weighting, or "`reverse`" to reverse the input layer order.} 54 | } 55 | \value{ 56 | streamgraph object 57 | } 58 | \description{ 59 | \code{streamgraph()} initializes the streamgraph html widget 60 | and takes a data frame in "long" format with columns for the 61 | category (by default, it looks for \code{key}) and its associated 62 | \code{date} and \code{value}. You can supply the names for those 63 | columns if they aren't named as such in your data.\cr 64 | \cr 65 | By default, interactivity is on, but you can disable that by setting 66 | the \code{interactive} parameter to \code{FALSE}. 67 | } 68 | \examples{ 69 | \dontrun{ 70 | library(dplyr) 71 | library(streamgraph) 72 | ggplot2movies::movies \%>\% 73 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% 74 | tidyr::gather(genre, value, -year) \%>\% 75 | group_by(year, genre) \%>\% 76 | tally(wt=value) \%>\% 77 | ungroup \%>\% 78 | mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat 79 | 80 | streamgraph(dat, "genre", "n", "year") 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /man/streamgraphOutput.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/shiny.r 3 | \name{streamgraphOutput} 4 | \alias{streamgraphOutput} 5 | \title{Widget output function for use in Shiny} 6 | \usage{ 7 | streamgraphOutput(outputId, width = "100\%", height = "400px") 8 | } 9 | \arguments{ 10 | \item{outputId}{outputId} 11 | 12 | \item{width}{width} 13 | 14 | \item{height}{height} 15 | } 16 | \description{ 17 | Widget output function for use in Shiny 18 | } 19 | -------------------------------------------------------------------------------- /man/widgetThumbnail.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/phantom.R 3 | \name{widgetThumbnail} 4 | \alias{widgetThumbnail} 5 | \title{Make a thumbnail for an htmlwidget panel} 6 | \usage{ 7 | widgetThumbnail(p, thumbPath) 8 | } 9 | \arguments{ 10 | \item{p}{htmlwidget object} 11 | 12 | \item{thumbPath}{where to save thumbnail file} 13 | } 14 | \description{ 15 | Make a thumbnail for an htmlwidget panel 16 | } 17 | -------------------------------------------------------------------------------- /streamgraph.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "streamgraph" 3 | output: 4 | html_document: 5 | keep_md: true 6 | md_document: 7 | variant: markdown_github 8 | --- 9 | 10 | [GitHub repo](http://github.com/hrbrmstr/streamgraph) 11 | 12 | ```{r movies, fig.width=10, message=FALSE} 13 | library(streamgraph) 14 | library(dplyr) 15 | library(babynames) 16 | library(DT) 17 | 18 | ggplot2movies::movies %>% 19 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 20 | tidyr::gather(genre, value, -year) %>% 21 | group_by(year, genre) %>% 22 | tally(wt=value) -> dat 23 | 24 | streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>% 25 | sg_axis_x(20, "year", "%Y") %>% 26 | sg_fill_brewer("PuOr") 27 | ``` 28 | 29 | ```{r WillTurman, fig.width=10} 30 | data <- read.csv("http://bl.ocks.org/WillTurman/raw/4631136/data.csv", stringsAsFactors=FALSE) 31 | data$date <- as.Date(data$date, format="%m/%d/%y") 32 | 33 | streamgraph(data, interactive=TRUE) %>% sg_colors("Reds") 34 | ``` 35 | 36 | ```{r fig.width=10} 37 | dat <- read.csv("http://asbcllc.com/blog/2015/february/cre_stream_graph_test/data/cre_transaction-data.csv") 38 | 39 | dat %>% 40 | streamgraph("asset_class", "volume_billions", "year", interpolate="cardinal") %>% 41 | sg_axis_x(1, "year", "%Y") %>% 42 | sg_fill_brewer("PuOr") 43 | ``` 44 | 45 | ```{r echo=FALSE} 46 | datatable(dat) 47 | ``` 48 | 49 | ```{r fig.width=10} 50 | dat %>% 51 | streamgraph("asset_class", "volume_billions", "year", offset="silhouette", interpolate="step") %>% 52 | sg_axis_x(1, "year", "%Y") %>% 53 | sg_fill_brewer("PuOr") 54 | ``` 55 | 56 | ```{r fig.width=10} 57 | dat %>% 58 | streamgraph("asset_class", "volume_billions", "year", offset="zero", interpolate="cardinal") %>% 59 | sg_axis_x(1, "year", "%Y") %>% 60 | sg_fill_brewer("PuOr") %>% 61 | sg_legend(TRUE, "Asset class: ") 62 | ``` 63 | 64 | Now, who let that stacked bar chart get in here `;-)` 65 | 66 | ```{r fig.width=10} 67 | dat %>% 68 | streamgraph("asset_class", "volume_billions", "year", offset="zero", interpolate="step") %>% 69 | sg_axis_x(1, "year", "%Y") %>% 70 | sg_fill_brewer("PuOr") 71 | ``` 72 | 73 | ```{r fig.width=10} 74 | # get top 10 names for each year by sex 75 | babynames %>% 76 | group_by(year, sex) %>% 77 | top_n(10, n) -> dat1 78 | 79 | # just look at female names and get the data for 80 | # the top n by all years to see how they "flow" 81 | babynames %>% 82 | filter(sex=="F", 83 | name %in% dat1$name) -> dat 84 | 85 | streamgraph(dat, "name", "n", "year") %>% 86 | sg_fill_tableau() %>% 87 | sg_axis_x(tick_units = "year", tick_interval = 10, tick_format = "%Y") %>% 88 | sg_legend(TRUE, "Name: ") 89 | ``` -------------------------------------------------------------------------------- /streamgraph.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | StripTrailingWhitespace: Yes 16 | 17 | BuildType: Package 18 | PackageUseDevtools: Yes 19 | PackageInstallArgs: --no-multiarch --with-keep.source 20 | PackageBuildArgs: --resave-data 21 | PackageRoxygenize: rd,collate,namespace 22 | -------------------------------------------------------------------------------- /tests/test-all.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | test_check("streamgraph") 3 | -------------------------------------------------------------------------------- /tests/testthat/ccasn.R: -------------------------------------------------------------------------------- 1 | library(streamgraph) 2 | library(pbapply) 3 | library(dplyr) 4 | library(data.table) 5 | 6 | logs <- list.files("/Users/bob/Development/tiq-test-Winter2015/data/enriched/public_inbound/", full.names=TRUE) 7 | 8 | dat <- pblapply(logs, function(x) { 9 | dat <- read.csv(x) 10 | }) 11 | 12 | dat2 <- bind_rows(dat) 13 | dat2 <- tbl_dt(dat2) 14 | 15 | save(dat2, file="~/Desktop/dat2.rda") 16 | 17 | # country view ------------------------------------------------------------ 18 | 19 | dat2 %>% 20 | group_by(date, country) %>% 21 | tally() %>% 22 | top_n(5, n) -> ccs 23 | 24 | streamgraph(ccs, "country", "n") %>% 25 | sg_axis_x(tick_interval=1, tick_units="weeks", tick_format="%m-%d") %>% 26 | sg_legend(TRUE, "Country: ") 27 | 28 | # asn view ---------------------------------------------------------------- 29 | 30 | dat2 %>% 31 | group_by(date, asnumber) %>% 32 | tally() %>% 33 | top_n(5, n) %>% 34 | mutate(asnum=sprintf("AS%d", asnumber)) -> asns 35 | 36 | streamgraph(asns, "asnum", "n") %>% 37 | sg_axis_x(tick_interval=1, tick_units="weeks", tick_format="%m-%d") %>% 38 | sg_legend(TRUE, "ASN: ") 39 | 40 | # ips --------------------------------------------------------------------- 41 | 42 | dat2 %>% 43 | group_by(date, entity) %>% 44 | tally() %>% 45 | top_n(5, n) -> ips 46 | 47 | streamgraph(ips, "entity", "n") %>% 48 | sg_axis_x(tick_interval=1, tick_units="weeks", tick_format="%m-%d") %>% 49 | sg_legend(TRUE, "IPv4: ") 50 | 51 | -------------------------------------------------------------------------------- /tests/testthat/sg.R: -------------------------------------------------------------------------------- 1 | library(streamgraph) 2 | library(rvest) 3 | library(magrittr) 4 | library(dplyr) 5 | 6 | dat <- read.csv("data/vicstream.csv", stringsAsFactors=FALSE) 7 | dat$week <- as.Date(dat$week, "%m-%d-%Y") 8 | sg <- streamgraph(dat, "victim", "value", "week", interactive=TRUE) 9 | 10 | sg %>% sg_axis_x(1) %>% sg_axis_y(0) %>% sg_colors("PuOr") 11 | 12 | ggplot2movies::movies %>% 13 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 14 | tidyr::gather(genre, value, -year) %>% 15 | group_by(year, genre) %>% 16 | tally(wt=value) -> dat 17 | 18 | streamgraph(dat, genre, n, year, interactive=TRUE) %>% 19 | sg_axis_x(20, "year", "%Y") %>% 20 | sg_colors(palette=NULL, "#1F77B4", "#1F77B4", "black") %>% 21 | sg_fill_tableau("tableau20") %>% 22 | # sg_fill_manual(c("red", "#00ff00", rgb(0,0,1))) %>% 23 | # sg_fill_brewer("Spectral") %>% 24 | sg_legend(TRUE, "Genre:") 25 | 26 | streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>% 27 | sg_axis_x(20, "year", "%Y") %>% 28 | sg_colors(palette=NULL, "#1F77B4", "#1F77B4", "black") %>% 29 | sg_fill_tableau("tableau20") %>% 30 | # sg_fill_manual(c("red", "#00ff00", rgb(0,0,1))) %>% 31 | # sg_fill_brewer("Spectral") %>% 32 | sg_legend(TRUE, "Genre:") 33 | 34 | str(ggplot2movies::movies) 35 | 36 | dat <- read.csv("http://bl.ocks.org/mbostock/raw/1134768/crimea.csv") 37 | dat %>% 38 | mutate(date=as.Date(sprintf("01/%s", dat$date), format="%d/%m/%Y")) %>% 39 | tidyr::gather(deaths, count, -date) -> dat 40 | 41 | streamgraph(dat, "deaths", "count", offset="zero") %>% 42 | sg_axis_x(tick_interval = 3, tick_format = "%b %y") 43 | 44 | 45 | ggplot2movies::movies %>% 46 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 47 | tidyr::gather(genre, value, -year) %>% 48 | group_by(year, genre) %>% 49 | tally(wt=value) %>% 50 | ungroup %>% 51 | mutate(year=as.Date(sprintf("%d-01-01", year))) -> dat 52 | 53 | streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>% 54 | sg_axis_x(20, "year", "%Y") %>% 55 | sg_axis_y(tick_format="b") %>% 56 | sg_colors("Spectral") 57 | 58 | library(streamgraph) 59 | library(rvest) 60 | library(magrittr) 61 | library(dplyr) 62 | library(babynames) 63 | library(tidyr) 64 | 65 | babynames %>% 66 | group_by(year, sex) %>% 67 | top_n(10, n) -> dat1 68 | 69 | babynames %>% 70 | filter(sex=="F", 71 | name %in% dat1$name) -> dat 72 | 73 | streamgraph(dat, "name", "n", "year") %>% 74 | sg_fill_tableau() %>% 75 | # sg_colors("Spectral") %>% 76 | sg_axis_x(tick_units = "year", tick_interval = 10, tick_format = "%Y") %>% 77 | sg_legend(TRUE, "Name: ") 78 | 79 | 80 | 81 | 82 | babynames[babynames$name %in% dat1$name,] 83 | 84 | 85 | dat <- read.table(text="week variable value 86 | 40 rev1 372.096 87 | 40 rev2 506.880 88 | 40 rev3 1411.200 89 | 40 rev4 198.528 90 | 40 rev5 60.800 91 | 43 rev1 342.912 92 | 43 rev2 501.120 93 | 43 rev3 132.352 94 | 43 rev4 267.712 95 | 43 rev5 82.368 96 | 44 rev1 357.504 97 | 44 rev2 466.560", header=TRUE) 98 | 99 | dat %>% 100 | streamgraph("variable","value","week", scale="continuous") %>% 101 | sg_axis_x(tick_format="d") %>% 102 | sg_fill_tableau() %>% 103 | # sg_annotate(label="annotation", x=40.05, y=200, color="white", size=16) %>% 104 | # sg_annotate(label="moar annotation", x=41, y=1500, color="black", size=24) %>% 105 | # sg_annotate(label="last one", x=42, y=900, color="white", size=18) %>% 106 | sg_add_marker(x=41, y=10, label="Hello There", stroke="#000000", color="#7f7f7f", size=16) %>% 107 | sg_add_marker(x=42, y=10, label="Hello There", stroke="#000000", color="#7f7f7f", size=16) %>% 108 | sg_add_marker(x=43, y=10, label="Hello There", stroke="#000000", color="#7f7f7f", size=16) 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /tests/testthat/space.R: -------------------------------------------------------------------------------- 1 | library(streamgraph) 2 | library(dplyr) 3 | 4 | dat <- read.table(text="date AllProperties Office oTotal Industrial oTotal Retail oTotal Apartment oTotal Hotel oTotal Land oTotal 5 | 2001 89.6 39.0 43.5% 16.0 17.8% 14.0 15.6% 20.7 23.1% NA NA NA NA 6 | 2002 106.1 40.1 37.8% 13.0 12.2% 28.5 26.9% 24.5 23.1% NA NA NA NA 7 | 2003 131.2 47.4 36.1% 15.6 11.9% 36.2 27.6% 32.0 24.4% NA NA NA NA 8 | 2004 213.3 74.4 34.9% 25.3 11.9% 61.1 28.6% 52.5 24.6% NA NA NA NA 9 | 2005 365.4 107.6 29.4% 51.8 14.2% 58.0 15.9% 98.8 27.0% 29.8 8.2% 19.5 5.3% 10 | 2006 426.8 144.3 33.8% 55.6 13.0% 63.8 15.0% 98.9 23.2% 43.2 10.1% 20.9 4.9% 11 | 2007 573.4 213.7 37.3% 61.5 10.7% 81.4 14.2% 105.1 18.3% 80.7 14.1% 31.0 5.4% 12 | 2008 174.9 59.3 33.9% 27.5 15.7% 25.4 14.5% 43.0 24.6% 11.6 6.6% 8.1 4.6% 13 | 2009 68.4 17.8 26.0% 10.8 15.8% 16.3 23.9% 17.9 26.1% 3.2 4.7% 2.4 3.5% 14 | 2010 146.5 46.8 31.9% 20.9 14.2% 23.1 15.8% 37.3 25.5% 14.4 9.8% 4.1 2.8% 15 | 2011 234.1 66.9 28.6% 36.3 15.5% 44.6 19.0% 58.6 25.0% 20.1 8.6% 7.6 3.3% 16 | 2012 297.5 79.4 26.7% 39.3 13.2% 57.0 19.2% 87.5 29.4% 20.6 6.9% 13.8 4.6% 17 | 2013 362.2 103.5 28.6% 47.9 13.2% 62.9 17.4% 102.8 28.4% 27.3 7.5% 17.8 4.9% 18 | 2014 423.9 118.8 28.0% 54.4 12.8% 82.6 19.5% 112.4 26.5% 34.6 8.2% 21.1 5.0%", stringsAsFactors=FALSE, header=TRUE) 19 | 20 | dat %>% 21 | select(date, Office, Industrial, Retail, Apartment, Hotel, Land) %>% 22 | tidyr::gather(key, value, -date) %>% 23 | mutate(value=ifelse(is.na(value), 0, value), 24 | date=as.Date(sprintf("%d-01-01", date))) -> sg_dat 25 | 26 | sg_dat %>% 27 | streamgraph() %>% 28 | sg_axis_x(1, "year", "%Y") %>% 29 | sg_colors("PuOr") 30 | 31 | dat <- read.csv("http://asbcllc.com/blog/2015/february/cre_stream_graph_test/data/cre_transaction-data.csv") 32 | 33 | dat %>% 34 | streamgraph("asset_class", "volume_billions", "year", interpolate="cardinal") %>% 35 | sg_axis_x(1, "year", "%Y") %>% 36 | sg_colors("PuOr") -------------------------------------------------------------------------------- /tests/testthat/test-streamgraph.R: -------------------------------------------------------------------------------- 1 | context("basic functionality") 2 | test_that("we can do something", { 3 | 4 | #expect_that(some_function(), is_a("data.frame")) 5 | 6 | }) 7 | -------------------------------------------------------------------------------- /vignettes/introduction.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Introduction to the streamgraph Package" 3 | date: "`r Sys.Date()`" 4 | output: 5 | rmarkdown::html_vignette: 6 | fig_caption: true 7 | vignette: > 8 | %\VignetteIndexEntry{Introduction to the streamgraph Package} 9 | %\VignetteEngine{knitr::rmarkdown} 10 | \usepackage[utf8]{inputenc} 11 | --- 12 | 13 | ```{r setup, echo = FALSE, message = FALSE} 14 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 15 | options(dplyr.print_min = 4L, dplyr.print_max = 4L) 16 | library(streamgraph) 17 | ``` 18 | 19 | The `streamgraph` pacakge is an `htmlwidget`^[http://www.htmlwidgets.org/] that is based on the `D3.js`^[http://d3js.org/] JavaScript library. 20 | 21 | >_"Streamgraphs are a generalization of stacked area graphs where the baseline is free. By shifting the baseline, it is possible to minimize the change in slope (or _wiggle_) in individual series, thereby making it easier to perceive the thickness of any given layer across the data. Byron & Wattenberg describe several streamgraph algorithms in 'Stacked Graphs—Geometry & Aesthetics^[http://www.leebyron.com/else/streamgraph/]'"_^[Bostock. http://bl.ocks.org/mbostock/4060954] 22 | 23 | Even though streamgraphs can be controversial^[Kirk. http://www.visualisingdata.com/index.php/2010/08/making-sense-of-streamgraphs/], they make for very compelling visualizations, especially when displaying very large datasets. They work even better when there is an interactive component involved that enables the following of each "flow" or allow filtering the view in some way. This makes R a great choice for streamgraph creation & exploration given that it excels at data manipulation and has libraries such as Shiny^[http://shiny.rstudio.com/] that reduce the complexity of the creation of interactive interfaces. 24 | 25 | ## Making a streamgraph 26 | 27 | The first example replicates the streamgraphs in the Name Voyager^[http://www.bewitched.com/namevoyager.html] project. We'll use the R `babynames` package^[Wickham. http://cran.r-project.org/package=babynames] as the data source and use the `streamgraph` package to see the ebb & flow of "`Kr-`" and "`I-`" names in the United States over the years (1880-2013). 28 | 29 | ```{r krbabies, message=FALSE, fig.width=7.5, fig.cap="'Kr-' names (1880-2013)"} 30 | library(dplyr) 31 | library(babynames) 32 | library(streamgraph) 33 | 34 | babynames %>% 35 | filter(grepl("^Kr", name)) %>% 36 | group_by(year, name) %>% 37 | tally(wt=n) %>% 38 | streamgraph("name", "n", "year") 39 | ``` 40 | 41 | You create streamgraphs with the `streamgraph` function. This first example uses the default values for the aesthetic properties of the streamgraph, but we have passed in "`name`", "`n`" and "`year`" for the `key`, `value` and `date` parameters. If your data already has column names in the expected format, you do not need to specify any values for those parameters. 42 | 43 | The current version of `streamgraph` requires a date-based x-axis, but is smart enough to notice if the values for the `date` column are years and automatically performs the necessary work under the covers to convert the data into the required format for the underlying D3 work. 44 | 45 | The default behavior of the `streamgraph` function is to have the graph centered in the y-axis, with smoothed "streams". 46 | 47 | ```{r ibabies, message=FALSE, fig.width=7.5, fig.cap="'I-' names (1880-2013)"} 48 | library(dplyr) 49 | library(babynames) 50 | library(streamgraph) 51 | 52 | babynames %>% 53 | filter(grepl("^I", name)) %>% 54 | group_by(year, name) %>% 55 | tally(wt=n) %>% 56 | streamgraph("name", "n", "year", offset="zero", interpolate="linear") 57 | ``` 58 | 59 | This example changes the baseline for the `streamgraph` to `0` and uses a linear interpolation (making the graph more "pointy"). 60 | 61 | ### Data Expectations 62 | 63 | The data to use for a `streamgraph` should be in "long format"^[http://blog.rstudio.org/2014/07/22/introducing-tidyr/]. The following example shows how to produce a `streamgraph` from the `ggplot2` `movies` data set. 64 | 65 | ```{r movies, message=FALSE, fig.width=7.5, fig.cap="Count of movie genres over time"} 66 | ggplot2movies::movies %>% 67 | select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>% 68 | tidyr::gather(genre, value, -year) %>% 69 | group_by(year, genre) %>% 70 | tally(wt=value) %>% 71 | ungroup %>% 72 | streamgraph("genre", "n", "year") %>% 73 | sg_axis_x(20) %>% 74 | sg_colors("PuOr") 75 | ``` 76 | 77 | We first select the columns we want to be in "streams", then gather them up and count them by year. We make one change to the aesthetics by using year ticks every 20 years. We also select a different ColorBrewer^[http://colorbrewer2.org/] palette for the graph. --------------------------------------------------------------------------------