Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelyportfolio/d3c478944fa7ccecf262 to your computer and use it in GitHub Desktop.
Save timelyportfolio/d3c478944fa7ccecf262 to your computer and use it in GitHub Desktop.
example for Stack Overflow post about nested d3.js json hierarchy in R

This gist is a live example for Stack Overflow question.

Converting JSON format to CSV to upload data table in R to produce D3 bubble chart

To reproduce, here is the code.

library(jsonlite)
library(dplyr)


flare_json <- rjson::fromJSON(  ## rjson just works better on these for me
    file = "http://bl.ocks.org/mbostock/raw/4063269/flare.json"
)

# let's have a look at the structure of flare.json
# listviewer htmlwidget might help us see what is happening
#   devtools::install_github("timelyportfolio/listviewer")
#   library(listviewer)
jsonedit(
  paste0(
    readLines("http://bl.ocks.org/mbostock/raw/4063269/flare.json")
    ,collapse=""
  )
)

# the interesting thing about Mike Bostock's Bubble Chart example
#   though is that the example removes the nested hierarchy
#    with a JavaScript function called classes
#// Returns a flattened hierarchy containing all leaf nodes under the root.
#function classes(root) {
#  var classes = [];
#  
#  function recurse(name, node) {
#    if (node.children) node.children.forEach(function(child) { recurse(node.name, child); });
#    else classes.push({packageName: name, className: node.name, value: node.size});
#  }
#  
#  recurse(null, root);
#  return {children: classes};
#}

# let's try to recreate this in R
classes <- function(root){
  classes <- data.frame()
  
  haschild <- function(node){
    (!is.null(node) && "children" %in% names(node))
  }
  
  recurse <- function(name,node){
    if(haschild(node)){
      lapply(
        1:length(node$children)
        ,function(n){
          recurse(node$name,node$children[[n]])
        }
      )
    } else {
      classes <<- bind_rows(
        classes,
        data.frame(
          "packageName"= name
          ,"className" = node[["name"]]
          ,"size" = node[["size"]]
          ,stringsAsFactors = F
        )
      )
    }
  }
  
  recurse(root$name,root)
  return(classes)
}
  
# now with a R flavor our class replica should work
flare_df <- classes(flare_json)


# so the example uses a data.frame with columns
#   packageName, className, size
# and feeds that to bubble.nodes where bubble = d3.layout.pack
# fortunately Joe Cheng has already made a htmlwidget called bubbles
#   https://github.com/jcheng5/bubbles
# that will produce a d3.layout.pack bubble chart

library(scales)

bubbles(
  flare_df$size
  ,flare_df$className
  ,color = col_factor(
    RColorBrewer::brewer.pal(9,"Set1")
    ,factor(flare_df$packageName)
  )(flare_df$packageName)
  ,height = 600
  ,width = 960
)

# it's not perfect with things such as text sizing
#    but it's a start
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript,%28function%28%29%20%7B%0A%20%20%2F%2F%20If%20window%2EHTMLWidgets%20is%20already%20defined%2C%20then%20use%20it%3B%20otherwise%20create%20a%0A%20%20%2F%2F%20new%20object%2E%20This%20allows%20preceding%20code%20to%20set%20options%20that%20affect%20the%0A%20%20%2F%2F%20initialization%20process%20%28though%20none%20currently%20exist%29%2E%0A%20%20window%2EHTMLWidgets%20%3D%20window%2EHTMLWidgets%20%7C%7C%20%7B%7D%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20a%20viewer%20pane%2E%20If%20not%2C%20we%27re%20in%20a%20web%20browser%2E%0A%20%20var%20viewerMode%20%3D%20window%2EHTMLWidgets%2EviewerMode%20%3D%0A%20%20%20%20%20%20%2F%5Cbviewer%5Fpane%3D1%5Cb%2F%2Etest%28window%2Elocation%29%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20Shiny%20mode%2E%20If%20not%2C%20it%27s%20a%20static%20document%2E%0A%20%20%2F%2F%20Note%20that%20static%20widgets%20can%20appear%20in%20both%20Shiny%20and%20static%20modes%2C%20but%0A%20%20%2F%2F%20obviously%2C%20Shiny%20widgets%20can%20only%20appear%20in%20Shiny%20apps%2Fdocuments%2E%0A%20%20var%20shinyMode%20%3D%20window%2EHTMLWidgets%2EshinyMode%20%3D%0A%20%20%20%20%20%20typeof%28window%2EShiny%29%20%21%3D%3D%20%22undefined%22%20%26%26%20%21%21window%2EShiny%2EoutputBindings%3B%0A%0A%20%20%2F%2F%20We%20can%27t%20count%20on%20jQuery%20being%20available%2C%20so%20we%20implement%20our%20own%0A%20%20%2F%2F%20version%20if%20necessary%2E%0A%20%20function%20querySelectorAll%28scope%2C%20selector%29%20%7B%0A%20%20%20%20if%20%28typeof%28jQuery%29%20%21%3D%3D%20%22undefined%22%20%26%26%20scope%20instanceof%20jQuery%29%20%7B%0A%20%20%20%20%20%20return%20scope%2Efind%28selector%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28scope%2EquerySelectorAll%29%20%7B%0A%20%20%20%20%20%20return%20scope%2EquerySelectorAll%28selector%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20function%20asArray%28value%29%20%7B%0A%20%20%20%20if%20%28value%20%3D%3D%3D%20null%29%0A%20%20%20%20%20%20return%20%5B%5D%3B%0A%20%20%20%20if%20%28%24%2EisArray%28value%29%29%0A%20%20%20%20%20%20return%20value%3B%0A%20%20%20%20return%20%5Bvalue%5D%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Implement%20jQuery%27s%20extend%0A%20%20function%20extend%28target%20%2F%2A%2C%20%2E%2E%2E%20%2A%2F%29%20%7B%0A%20%20%20%20if%20%28arguments%2Elength%20%3D%3D%201%29%20%7B%0A%20%20%20%20%20%20return%20target%3B%0A%20%20%20%20%7D%0A%20%20%20%20for%20%28var%20i%20%3D%201%3B%20i%20%3C%20arguments%2Elength%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20var%20source%20%3D%20arguments%5Bi%5D%3B%0A%20%20%20%20%20%20for%20%28var%20prop%20in%20source%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28source%2EhasOwnProperty%28prop%29%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20target%5Bprop%5D%20%3D%20source%5Bprop%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20return%20target%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20IE8%20doesn%27t%20support%20Array%2EforEach%2E%0A%20%20function%20forEach%28values%2C%20callback%2C%20thisArg%29%20%7B%0A%20%20%20%20if%20%28values%2EforEach%29%20%7B%0A%20%20%20%20%20%20values%2EforEach%28callback%2C%20thisArg%29%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20values%2Elength%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20callback%2Ecall%28thisArg%2C%20values%5Bi%5D%2C%20i%2C%20values%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20Replaces%20the%20specified%20method%20with%20the%20return%20value%20of%20funcSource%2E%0A%20%20%2F%2F%0A%20%20%2F%2F%20Note%20that%20funcSource%20should%20not%20BE%20the%20new%20method%2C%20it%20should%20be%20a%20function%0A%20%20%2F%2F%20that%20RETURNS%20the%20new%20method%2E%20funcSource%20receives%20a%20single%20argument%20that%20is%0A%20%20%2F%2F%20the%20overridden%20method%2C%20it%20can%20be%20called%20from%20the%20new%20method%2E%20The%20overridden%0A%20%20%2F%2F%20method%20can%20be%20called%20like%20a%20regular%20function%2C%20it%20has%20the%20target%20permanently%0A%20%20%2F%2F%20bound%20to%20it%20so%20%22this%22%20will%20work%20correctly%2E%0A%20%20function%20overrideMethod%28target%2C%20methodName%2C%20funcSource%29%20%7B%0A%20%20%20%20var%20superFunc%20%3D%20target%5BmethodName%5D%20%7C%7C%20function%28%29%20%7B%7D%3B%0A%20%20%20%20var%20superFuncBound%20%3D%20function%28%29%20%7B%0A%20%20%20%20%20%20return%20superFunc%2Eapply%28target%2C%20arguments%29%3B%0A%20%20%20%20%7D%3B%0A%20%20%20%20target%5BmethodName%5D%20%3D%20funcSource%28superFuncBound%29%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Implement%20a%20vague%20facsimilie%20of%20jQuery%27s%20data%20method%0A%20%20function%20elementData%28el%2C%20name%2C%20value%29%20%7B%0A%20%20%20%20if%20%28arguments%2Elength%20%3D%3D%202%29%20%7B%0A%20%20%20%20%20%20return%20el%5B%22htmlwidget%5Fdata%5F%22%20%2B%20name%5D%3B%0A%20%20%20%20%7D%20else%20if%20%28arguments%2Elength%20%3D%3D%203%29%20%7B%0A%20%20%20%20%20%20el%5B%22htmlwidget%5Fdata%5F%22%20%2B%20name%5D%20%3D%20value%3B%0A%20%20%20%20%20%20return%20el%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Wrong%20number%20of%20arguments%20for%20elementData%3A%20%22%20%2B%0A%20%20%20%20%20%20%20%20arguments%2Elength%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20http%3A%2F%2Fstackoverflow%2Ecom%2Fquestions%2F3446170%2Fescape%2Dstring%2Dfor%2Duse%2Din%2Djavascript%2Dregex%0A%20%20function%20escapeRegExp%28str%29%20%7B%0A%20%20%20%20return%20str%2Ereplace%28%2F%5B%5C%2D%5C%5B%5C%5D%5C%2F%5C%7B%5C%7D%5C%28%5C%29%5C%2A%5C%2B%5C%3F%5C%2E%5C%5C%5C%5E%5C%24%5C%7C%5D%2Fg%2C%20%22%5C%5C%24%26%22%29%3B%0A%20%20%7D%0A%0A%20%20function%20hasClass%28el%2C%20className%29%20%7B%0A%20%20%20%20var%20re%20%3D%20new%20RegExp%28%22%5C%5Cb%22%20%2B%20escapeRegExp%28className%29%20%2B%20%22%5C%5Cb%22%29%3B%0A%20%20%20%20return%20re%2Etest%28el%2EclassName%29%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20elements%20%2D%20array%20%28or%20array%2Dlike%20object%29%20of%20HTML%20elements%0A%20%20%2F%2F%20className%20%2D%20class%20name%20to%20test%20for%0A%20%20%2F%2F%20include%20%2D%20if%20true%2C%20only%20return%20elements%20with%20given%20className%3B%0A%20%20%2F%2F%20%20%20if%20false%2C%20only%20return%20elements%20%2Awithout%2A%20given%20className%0A%20%20function%20filterByClass%28elements%2C%20className%2C%20include%29%20%7B%0A%20%20%20%20var%20results%20%3D%20%5B%5D%3B%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20elements%2Elength%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20if%20%28hasClass%28elements%5Bi%5D%2C%20className%29%20%3D%3D%20include%29%0A%20%20%20%20%20%20%20%20results%2Epush%28elements%5Bi%5D%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20results%3B%0A%20%20%7D%0A%0A%20%20function%20on%28obj%2C%20eventName%2C%20func%29%20%7B%0A%20%20%20%20if%20%28obj%2EaddEventListener%29%20%7B%0A%20%20%20%20%20%20obj%2EaddEventListener%28eventName%2C%20func%2C%20false%29%3B%0A%20%20%20%20%7D%20else%20if%20%28obj%2EattachEvent%29%20%7B%0A%20%20%20%20%20%20obj%2EattachEvent%28eventName%2C%20func%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20function%20off%28obj%2C%20eventName%2C%20func%29%20%7B%0A%20%20%20%20if%20%28obj%2EremoveEventListener%29%0A%20%20%20%20%20%20obj%2EremoveEventListener%28eventName%2C%20func%2C%20false%29%3B%0A%20%20%20%20else%20if%20%28obj%2EdetachEvent%29%20%7B%0A%20%20%20%20%20%20obj%2EdetachEvent%28eventName%2C%20func%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20Translate%20array%20of%20values%20to%20top%2Fright%2Fbottom%2Fleft%2C%20as%20usual%20with%0A%20%20%2F%2F%20the%20%22padding%22%20CSS%20property%0A%20%20%2F%2F%20https%3A%2F%2Fdeveloper%2Emozilla%2Eorg%2Fen%2DUS%2Fdocs%2FWeb%2FCSS%2Fpadding%0A%20%20function%20unpackPadding%28value%29%20%7B%0A%20%20%20%20if%20%28typeof%28value%29%20%3D%3D%3D%20%22number%22%29%0A%20%20%20%20%20%20value%20%3D%20%5Bvalue%5D%3B%0A%20%20%20%20if%20%28value%2Elength%20%3D%3D%3D%201%29%20%7B%0A%20%20%20%20%20%20return%20%7Btop%3A%20value%5B0%5D%2C%20right%3A%20value%5B0%5D%2C%20bottom%3A%20value%5B0%5D%2C%20left%3A%20value%5B0%5D%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28value%2Elength%20%3D%3D%3D%202%29%20%7B%0A%20%20%20%20%20%20return%20%7Btop%3A%20value%5B0%5D%2C%20right%3A%20value%5B1%5D%2C%20bottom%3A%20value%5B0%5D%2C%20left%3A%20value%5B1%5D%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28value%2Elength%20%3D%3D%3D%203%29%20%7B%0A%20%20%20%20%20%20return%20%7Btop%3A%20value%5B0%5D%2C%20right%3A%20value%5B1%5D%2C%20bottom%3A%20value%5B2%5D%2C%20left%3A%20value%5B1%5D%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28value%2Elength%20%3D%3D%3D%204%29%20%7B%0A%20%20%20%20%20%20return%20%7Btop%3A%20value%5B0%5D%2C%20right%3A%20value%5B1%5D%2C%20bottom%3A%20value%5B2%5D%2C%20left%3A%20value%5B3%5D%7D%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20Convert%20an%20unpacked%20padding%20object%20to%20a%20CSS%20value%0A%20%20function%20paddingToCss%28paddingObj%29%20%7B%0A%20%20%20%20return%20paddingObj%2Etop%20%2B%20%22px%20%22%20%2B%20paddingObj%2Eright%20%2B%20%22px%20%22%20%2B%20paddingObj%2Ebottom%20%2B%20%22px%20%22%20%2B%20paddingObj%2Eleft%20%2B%20%22px%22%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Makes%20a%20number%20suitable%20for%20CSS%0A%20%20function%20px%28x%29%20%7B%0A%20%20%20%20if%20%28typeof%28x%29%20%3D%3D%3D%20%22number%22%29%0A%20%20%20%20%20%20return%20x%20%2B%20%22px%22%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20return%20x%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Retrieves%20runtime%20widget%20sizing%20information%20for%20an%20element%2E%0A%20%20%2F%2F%20The%20return%20value%20is%20either%20null%2C%20or%20an%20object%20with%20fill%2C%20padding%2C%0A%20%20%2F%2F%20defaultWidth%2C%20defaultHeight%20fields%2E%0A%20%20function%20sizingPolicy%28el%29%20%7B%0A%20%20%20%20var%20sizingEl%20%3D%20document%2EquerySelector%28%22script%5Bdata%2Dfor%3D%27%22%20%2B%20el%2Eid%20%2B%20%22%27%5D%5Btype%3D%27application%2Fhtmlwidget%2Dsizing%27%5D%22%29%3B%0A%20%20%20%20if%20%28%21sizingEl%29%0A%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20var%20sp%20%3D%20JSON%2Eparse%28sizingEl%2EtextContent%20%7C%7C%20sizingEl%2Etext%20%7C%7C%20%22%7B%7D%22%29%3B%0A%20%20%20%20if%20%28viewerMode%29%20%7B%0A%20%20%20%20%20%20return%20sp%2Eviewer%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20return%20sp%2Ebrowser%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20function%20initSizing%28el%29%20%7B%0A%20%20%20%20var%20sizing%20%3D%20sizingPolicy%28el%29%3B%0A%20%20%20%20if%20%28%21sizing%29%0A%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20var%20cel%20%3D%20document%2EgetElementById%28%22htmlwidget%5Fcontainer%22%29%3B%0A%20%20%20%20if%20%28%21cel%29%0A%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20if%20%28typeof%28sizing%2Epadding%29%20%21%3D%3D%20%22undefined%22%29%20%7B%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Emargin%20%3D%20%220%22%3B%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Epadding%20%3D%20paddingToCss%28unpackPadding%28sizing%2Epadding%29%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28sizing%2Efill%29%20%7B%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Eoverflow%20%3D%20%22hidden%22%3B%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Ewidth%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Eheight%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20document%2EdocumentElement%2Estyle%2Ewidth%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20document%2EdocumentElement%2Estyle%2Eheight%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20if%20%28cel%29%20%7B%0A%20%20%20%20%20%20%20%20cel%2Estyle%2Eposition%20%3D%20%22absolute%22%3B%0A%20%20%20%20%20%20%20%20var%20pad%20%3D%20unpackPadding%28sizing%2Epadding%29%3B%0A%20%20%20%20%20%20%20%20cel%2Estyle%2Etop%20%3D%20pad%2Etop%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20%20%20cel%2Estyle%2Eright%20%3D%20pad%2Eright%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20%20%20cel%2Estyle%2Ebottom%20%3D%20pad%2Ebottom%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20%20%20cel%2Estyle%2Eleft%20%3D%20pad%2Eleft%20%2B%20%22px%22%3B%0A%20%20%20%20%20%20%20%20el%2Estyle%2Ewidth%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20%20%20el%2Estyle%2Eheight%20%3D%20%22100%25%22%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20getWidth%3A%20function%28%29%20%7B%20return%20cel%2EoffsetWidth%3B%20%7D%2C%0A%20%20%20%20%20%20%20%20getHeight%3A%20function%28%29%20%7B%20return%20cel%2EoffsetHeight%3B%20%7D%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20el%2Estyle%2Ewidth%20%3D%20px%28sizing%2Ewidth%29%3B%0A%20%20%20%20%20%20el%2Estyle%2Eheight%20%3D%20px%28sizing%2Eheight%29%3B%0A%0A%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20getWidth%3A%20function%28%29%20%7B%20return%20el%2EoffsetWidth%3B%20%7D%2C%0A%20%20%20%20%20%20%20%20getHeight%3A%20function%28%29%20%7B%20return%20el%2EoffsetHeight%3B%20%7D%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20Default%20implementations%20for%20methods%0A%20%20var%20defaults%20%3D%20%7B%0A%20%20%20%20find%3A%20function%28scope%29%20%7B%0A%20%20%20%20%20%20return%20querySelectorAll%28scope%2C%20%22%2E%22%20%2B%20this%2Ename%29%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20renderError%3A%20function%28el%2C%20err%29%20%7B%0A%20%20%20%20%20%20var%20%24el%20%3D%20%24%28el%29%3B%0A%0A%20%20%20%20%20%20this%2EclearError%28el%29%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Add%20all%20these%20error%20classes%2C%20as%20Shiny%20does%0A%20%20%20%20%20%20var%20errClass%20%3D%20%22shiny%2Doutput%2Derror%22%3B%0A%20%20%20%20%20%20if%20%28err%2Etype%20%21%3D%3D%20null%29%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20use%20the%20classes%20of%20the%20error%20condition%20as%20CSS%20class%20names%0A%20%20%20%20%20%20%20%20errClass%20%3D%20errClass%20%2B%20%22%20%22%20%2B%20%24%2Emap%28asArray%28err%2Etype%29%2C%20function%28type%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20errClass%20%2B%20%22%2D%22%20%2B%20type%3B%0A%20%20%20%20%20%20%20%20%7D%29%2Ejoin%28%22%20%22%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20errClass%20%3D%20errClass%20%2B%20%22%20htmlwidgets%2Derror%22%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Is%20el%20inline%20or%20block%3F%20If%20inline%20or%20inline%2Dblock%2C%20just%20display%3Anone%20it%0A%20%20%20%20%20%20%2F%2F%20and%20add%20an%20inline%20error%2E%0A%20%20%20%20%20%20var%20display%20%3D%20%24el%2Ecss%28%22display%22%29%3B%0A%20%20%20%20%20%20%24el%2Edata%28%22restore%2Ddisplay%2Dmode%22%2C%20display%29%3B%0A%0A%20%20%20%20%20%20if%20%28display%20%3D%3D%3D%20%22inline%22%20%7C%7C%20display%20%3D%3D%3D%20%22inline%2Dblock%22%29%20%7B%0A%20%20%20%20%20%20%20%20%24el%2Ehide%28%29%3B%0A%20%20%20%20%20%20%20%20if%20%28err%2Emessage%20%21%3D%3D%20%22%22%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20errorSpan%20%3D%20%24%28%22%3Cspan%3E%22%29%2EaddClass%28errClass%29%3B%0A%20%20%20%20%20%20%20%20%20%20errorSpan%2Etext%28err%2Emessage%29%3B%0A%20%20%20%20%20%20%20%20%20%20%24el%2Eafter%28errorSpan%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20if%20%28display%20%3D%3D%3D%20%22block%22%29%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20block%2C%20add%20an%20error%20just%20after%20the%20el%2C%20set%20visibility%3Anone%20on%20the%0A%20%20%20%20%20%20%20%20%2F%2F%20el%2C%20and%20position%20the%20error%20to%20be%20on%20top%20of%20the%20el%2E%0A%20%20%20%20%20%20%20%20%2F%2F%20Mark%20it%20with%20a%20unique%20ID%20and%20CSS%20class%20so%20we%20can%20remove%20it%20later%2E%0A%20%20%20%20%20%20%20%20%24el%2Ecss%28%22visibility%22%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20if%20%28err%2Emessage%20%21%3D%3D%20%22%22%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20errorDiv%20%3D%20%24%28%22%3Cdiv%3E%22%29%2EaddClass%28errClass%29%2Ecss%28%22position%22%2C%20%22absolute%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22top%22%2C%20el%2EoffsetTop%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22left%22%2C%20el%2EoffsetLeft%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20setting%20width%20can%20push%20out%20the%20page%20size%2C%20forcing%20otherwise%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20unnecessary%20scrollbars%20to%20appear%20and%20making%20it%20impossible%20for%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20the%20element%20to%20shrink%3B%20so%20use%20max%2Dwidth%20instead%0A%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22maxWidth%22%2C%20el%2EoffsetWidth%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22height%22%2C%20el%2EoffsetHeight%29%3B%0A%20%20%20%20%20%20%20%20%20%20errorDiv%2Etext%28err%2Emessage%29%3B%0A%20%20%20%20%20%20%20%20%20%20%24el%2Eafter%28errorDiv%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Really%20dumb%20way%20to%20keep%20the%20size%2Fposition%20of%20the%20error%20in%20sync%20with%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20the%20parent%20element%20as%20the%20window%20is%20resized%20or%20whatever%2E%0A%20%20%20%20%20%20%20%20%20%20var%20intId%20%3D%20setInterval%28function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21errorDiv%5B0%5D%2EparentElement%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20clearInterval%28intId%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20errorDiv%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22top%22%2C%20el%2EoffsetTop%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22left%22%2C%20el%2EoffsetLeft%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22maxWidth%22%2C%20el%2EoffsetWidth%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Ecss%28%22height%22%2C%20el%2EoffsetHeight%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%20500%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20clearError%3A%20function%28el%29%20%7B%0A%20%20%20%20%20%20var%20%24el%20%3D%20%24%28el%29%3B%0A%20%20%20%20%20%20var%20display%20%3D%20%24el%2Edata%28%22restore%2Ddisplay%2Dmode%22%29%3B%0A%20%20%20%20%20%20%24el%2Edata%28%22restore%2Ddisplay%2Dmode%22%2C%20null%29%3B%0A%0A%20%20%20%20%20%20if%20%28display%20%3D%3D%3D%20%22inline%22%20%7C%7C%20display%20%3D%3D%3D%20%22inline%2Dblock%22%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28display%29%0A%20%20%20%20%20%20%20%20%20%20%24el%2Ecss%28%22display%22%2C%20display%29%3B%0A%20%20%20%20%20%20%20%20%24%28el%2EnextSibling%29%2Efilter%28%22%2Ehtmlwidgets%2Derror%22%29%2Eremove%28%29%3B%0A%20%20%20%20%20%20%7D%20else%20if%20%28display%20%3D%3D%3D%20%22block%22%29%7B%0A%20%20%20%20%20%20%20%20%24el%2Ecss%28%22visibility%22%2C%20%22inherit%22%29%3B%0A%20%20%20%20%20%20%20%20%24%28el%2EnextSibling%29%2Efilter%28%22%2Ehtmlwidgets%2Derror%22%29%2Eremove%28%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20sizing%3A%20%7B%7D%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Called%20by%20widget%20bindings%20to%20register%20a%20new%20type%20of%20widget%2E%20The%20definition%0A%20%20%2F%2F%20object%20can%20contain%20the%20following%20properties%3A%0A%20%20%2F%2F%20%2D%20name%20%28required%29%20%2D%20A%20string%20indicating%20the%20binding%20name%2C%20which%20will%20be%0A%20%20%2F%2F%20%20%20used%20by%20default%20as%20the%20CSS%20classname%20to%20look%20for%2E%0A%20%20%2F%2F%20%2D%20initialize%20%28optional%29%20%2D%20A%20function%28el%29%20that%20will%20be%20called%20once%20per%0A%20%20%2F%2F%20%20%20widget%20element%3B%20if%20a%20value%20is%20returned%2C%20it%20will%20be%20passed%20as%20the%20third%0A%20%20%2F%2F%20%20%20value%20to%20renderValue%2E%0A%20%20%2F%2F%20%2D%20renderValue%20%28required%29%20%2D%20A%20function%28el%2C%20data%2C%20initValue%29%20that%20will%20be%0A%20%20%2F%2F%20%20%20called%20with%20data%2E%20Static%20contexts%20will%20cause%20this%20to%20be%20called%20once%20per%0A%20%20%2F%2F%20%20%20element%3B%20Shiny%20apps%20will%20cause%20this%20to%20be%20called%20multiple%20times%20per%0A%20%20%2F%2F%20%20%20element%2C%20as%20the%20data%20changes%2E%0A%20%20window%2EHTMLWidgets%2Ewidget%20%3D%20function%28definition%29%20%7B%0A%20%20%20%20if%20%28%21definition%2Ename%29%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Widget%20must%20have%20a%20name%22%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28%21definition%2Etype%29%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Widget%20must%20have%20a%20type%22%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20%2F%2F%20Currently%20we%20only%20support%20output%20widgets%0A%20%20%20%20if%20%28definition%2Etype%20%21%3D%3D%20%22output%22%29%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Unrecognized%20widget%20type%20%27%22%20%2B%20definition%2Etype%20%2B%20%22%27%22%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20%2F%2F%20TODO%3A%20Verify%20that%20%2Ename%20is%20a%20valid%20CSS%20classname%0A%20%20%20%20if%20%28%21definition%2ErenderValue%29%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Widget%20must%20have%20a%20renderValue%20function%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20For%20static%20rendering%20%28non%2DShiny%29%2C%20use%20a%20simple%20widget%20registration%0A%20%20%20%20%2F%2F%20scheme%2E%20We%20also%20use%20this%20scheme%20for%20Shiny%20apps%2Fdocuments%20that%20also%0A%20%20%20%20%2F%2F%20contain%20static%20widgets%2E%0A%20%20%20%20window%2EHTMLWidgets%2Ewidgets%20%3D%20window%2EHTMLWidgets%2Ewidgets%20%7C%7C%20%5B%5D%3B%0A%20%20%20%20%2F%2F%20Merge%20defaults%20into%20the%20definition%3B%20don%27t%20mutate%20the%20original%20definition%2E%0A%20%20%20%20var%20staticBinding%20%3D%20extend%28%7B%7D%2C%20defaults%2C%20definition%29%3B%0A%20%20%20%20overrideMethod%28staticBinding%2C%20%22find%22%2C%20function%28superfunc%29%20%7B%0A%20%20%20%20%20%20return%20function%28scope%29%20%7B%0A%20%20%20%20%20%20%20%20var%20results%20%3D%20superfunc%28scope%29%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20Filter%20out%20Shiny%20outputs%2C%20we%20only%20want%20the%20static%20kind%0A%20%20%20%20%20%20%20%20return%20filterByClass%28results%2C%20%22html%2Dwidget%2Doutput%22%2C%20false%29%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20window%2EHTMLWidgets%2Ewidgets%2Epush%28staticBinding%29%3B%0A%0A%20%20%20%20if%20%28shinyMode%29%20%7B%0A%20%20%20%20%20%20%2F%2F%20Shiny%20is%20running%2E%20Register%20the%20definition%20as%20an%20output%20binding%2E%0A%0A%20%20%20%20%20%20%2F%2F%20Merge%20defaults%20into%20the%20definition%3B%20don%27t%20mutate%20the%20original%20definition%2E%0A%20%20%20%20%20%20%2F%2F%20The%20base%20object%20is%20a%20Shiny%20output%20binding%20if%20we%27re%20running%20in%20Shiny%20mode%2C%0A%20%20%20%20%20%20%2F%2F%20or%20an%20empty%20object%20if%20we%27re%20not%2E%0A%20%20%20%20%20%20var%20shinyBinding%20%3D%20extend%28new%20Shiny%2EOutputBinding%28%29%2C%20defaults%2C%20definition%29%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Wrap%20renderValue%20to%20handle%20initialization%2C%20which%20unfortunately%20isn%27t%0A%20%20%20%20%20%20%2F%2F%20supported%20natively%20by%20Shiny%20at%20the%20time%20of%20this%20writing%2E%0A%0A%20%20%20%20%20%20%2F%2F%20NB%3A%20shinyBinding%2Einitialize%20may%20be%20undefined%2C%20as%20it%27s%20optional%2E%0A%0A%20%20%20%20%20%20%2F%2F%20Rename%20initialize%20to%20make%20sure%20it%20isn%27t%20called%20by%20a%20future%20version%0A%20%20%20%20%20%20%2F%2F%20of%20Shiny%20that%20does%20support%20initialize%20directly%2E%0A%20%20%20%20%20%20shinyBinding%2E%5Fhtmlwidgets%5Finitialize%20%3D%20shinyBinding%2Einitialize%3B%0A%20%20%20%20%20%20delete%20shinyBinding%2Einitialize%3B%0A%0A%20%20%20%20%20%20overrideMethod%28shinyBinding%2C%20%22find%22%2C%20function%28superfunc%29%20%7B%0A%20%20%20%20%20%20%20%20return%20function%28scope%29%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20var%20results%20%3D%20superfunc%28scope%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Only%20return%20elements%20that%20are%20Shiny%20outputs%2C%20not%20static%20ones%0A%20%20%20%20%20%20%20%20%20%20var%20dynamicResults%20%3D%20results%2Efilter%28%22%2Ehtml%2Dwidget%2Doutput%22%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20It%27s%20possible%20that%20whatever%20caused%20Shiny%20to%20think%20there%20might%20be%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20new%20dynamic%20outputs%2C%20also%20caused%20there%20to%20be%20new%20static%20outputs%2E%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Since%20there%20might%20be%20lots%20of%20different%20htmlwidgets%20bindings%2C%20we%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20schedule%20execution%20for%20later%2D%2Dno%20need%20to%20staticRender%20multiple%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20times%2E%0A%20%20%20%20%20%20%20%20%20%20if%20%28results%2Elength%20%21%3D%3D%20dynamicResults%2Elength%29%0A%20%20%20%20%20%20%20%20%20%20%20%20scheduleStaticRender%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20dynamicResults%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20%20%20overrideMethod%28shinyBinding%2C%20%22renderValue%22%2C%20function%28superfunc%29%20%7B%0A%20%20%20%20%20%20%20%20return%20function%28el%2C%20data%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Resolve%20strings%20marked%20as%20javascript%20literals%20to%20objects%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21%28data%2Eevals%20instanceof%20Array%29%29%20data%2Eevals%20%3D%20%5Bdata%2Eevals%5D%3B%0A%20%20%20%20%20%20%20%20%20%20for%20%28var%20i%20%3D%200%3B%20data%2Eevals%20%26%26%20i%20%3C%20data%2Eevals%2Elength%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20window%2EHTMLWidgets%2EevaluateStringMember%28data%2Ex%2C%20data%2Eevals%5Bi%5D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21this%2ErenderOnNullValue%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28data%2Ex%20%3D%3D%3D%20null%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20el%2Estyle%2Evisibility%20%3D%20%22hidden%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20el%2Estyle%2Evisibility%20%3D%20%22inherit%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21elementData%28el%2C%20%22initialized%22%29%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20initSizing%28el%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20elementData%28el%2C%20%22initialized%22%2C%20true%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28this%2E%5Fhtmlwidgets%5Finitialize%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20result%20%3D%20this%2E%5Fhtmlwidgets%5Finitialize%28el%2C%20el%2EoffsetWidth%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20el%2EoffsetHeight%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20elementData%28el%2C%20%22init%5Fresult%22%2C%20result%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20Shiny%2ErenderDependencies%28data%2Edeps%29%3B%0A%20%20%20%20%20%20%20%20%20%20superfunc%28el%2C%20data%2Ex%2C%20elementData%28el%2C%20%22init%5Fresult%22%29%29%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20%20%20overrideMethod%28shinyBinding%2C%20%22resize%22%2C%20function%28superfunc%29%20%7B%0A%20%20%20%20%20%20%20%20return%20function%28el%2C%20width%2C%20height%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Shiny%20can%20call%20resize%20before%20initialize%2FrenderValue%20have%20been%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20called%2C%20which%20doesn%27t%20make%20sense%20for%20widgets%2E%0A%20%20%20%20%20%20%20%20%20%20if%20%28elementData%28el%2C%20%22initialized%22%29%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20superfunc%28el%2C%20width%2C%20height%2C%20elementData%28el%2C%20%22init%5Fresult%22%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20%20%20Shiny%2EoutputBindings%2Eregister%28shinyBinding%2C%20shinyBinding%2Ename%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20scheduleStaticRenderTimerId%20%3D%20null%3B%0A%20%20function%20scheduleStaticRender%28%29%20%7B%0A%20%20%20%20if%20%28%21scheduleStaticRenderTimerId%29%20%7B%0A%20%20%20%20%20%20scheduleStaticRenderTimerId%20%3D%20setTimeout%28function%28%29%20%7B%0A%20%20%20%20%20%20%20%20scheduleStaticRenderTimerId%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20window%2EHTMLWidgets%2EstaticRender%28%29%3B%0A%20%20%20%20%20%20%7D%2C%201%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20Render%20static%20widgets%20after%20the%20document%20finishes%20loading%0A%20%20%2F%2F%20Statically%20render%20all%20elements%20that%20are%20of%20this%20widget%27s%20class%0A%20%20window%2EHTMLWidgets%2EstaticRender%20%3D%20function%28%29%20%7B%0A%20%20%20%20var%20bindings%20%3D%20window%2EHTMLWidgets%2Ewidgets%20%7C%7C%20%5B%5D%3B%0A%20%20%20%20forEach%28bindings%2C%20function%28binding%29%20%7B%0A%20%20%20%20%20%20var%20matches%20%3D%20binding%2Efind%28document%2EdocumentElement%29%3B%0A%20%20%20%20%20%20forEach%28matches%2C%20function%28el%29%20%7B%0A%20%20%20%20%20%20%20%20var%20sizeObj%20%3D%20initSizing%28el%2C%20binding%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28hasClass%28el%2C%20%22html%2Dwidget%2Dstatic%2Dbound%22%29%29%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20el%2EclassName%20%3D%20el%2EclassName%20%2B%20%22%20html%2Dwidget%2Dstatic%2Dbound%22%3B%0A%0A%20%20%20%20%20%20%20%20var%20initResult%3B%0A%20%20%20%20%20%20%20%20if%20%28binding%2Einitialize%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20initResult%20%3D%20binding%2Einitialize%28el%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20sizeObj%20%3F%20sizeObj%2EgetWidth%28%29%20%3A%20el%2EoffsetWidth%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20sizeObj%20%3F%20sizeObj%2EgetHeight%28%29%20%3A%20el%2EoffsetHeight%0A%20%20%20%20%20%20%20%20%20%20%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20%28binding%2Eresize%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20lastSize%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%20%20var%20resizeHandler%20%3D%20function%28e%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20size%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20w%3A%20sizeObj%20%3F%20sizeObj%2EgetWidth%28%29%20%3A%20el%2EoffsetWidth%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20h%3A%20sizeObj%20%3F%20sizeObj%2EgetHeight%28%29%20%3A%20el%2EoffsetHeight%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28size%2Ew%20%3D%3D%3D%200%20%26%26%20size%2Eh%20%3D%3D%3D%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28size%2Ew%20%3D%3D%3D%20lastSize%2Ew%20%26%26%20size%2Eh%20%3D%3D%3D%20lastSize%2Eh%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20lastSize%20%3D%20size%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20binding%2Eresize%28el%2C%20size%2Ew%2C%20size%2Eh%2C%20initResult%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20on%28window%2C%20%22resize%22%2C%20resizeHandler%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20This%20is%20needed%20for%20cases%20where%20we%27re%20running%20in%20a%20Shiny%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20app%2C%20but%20the%20widget%20itself%20is%20not%20a%20Shiny%20output%2C%20but%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20rather%20a%20simple%20static%20widget%2E%20One%20example%20of%20this%20is%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20an%20rmarkdown%20document%20that%20has%20runtime%3Ashiny%20and%20widget%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20that%20isn%27t%20in%20a%20render%20function%2E%20Shiny%20only%20knows%20to%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20call%20resize%20handlers%20for%20Shiny%20outputs%2C%20not%20for%20static%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20widgets%2C%20so%20we%20do%20it%20ourselves%2E%0A%20%20%20%20%20%20%20%20%20%20if%20%28window%2EjQuery%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20window%2EjQuery%28document%29%2Eon%28%22shown%22%2C%20resizeHandler%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20window%2EjQuery%28document%29%2Eon%28%22hidden%22%2C%20resizeHandler%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20This%20is%20needed%20for%20the%20specific%20case%20of%20ioslides%2C%20which%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20flips%20slides%20between%20display%3Anone%20and%20display%3Ablock%2E%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Ideally%20we%20would%20not%20have%20to%20have%20ioslide%2Dspecific%20code%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20here%2C%20but%20rather%20have%20ioslides%20raise%20a%20generic%20event%2C%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20but%20the%20rmarkdown%20package%20just%20went%20to%20CRAN%20so%20the%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20window%20to%20getting%20that%20fixed%20may%20be%20long%2E%0A%20%20%20%20%20%20%20%20%20%20if%20%28window%2EaddEventListener%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20It%27s%20OK%20to%20limit%20this%20to%20window%2EaddEventListener%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20browsers%20because%20ioslides%20itself%20only%20supports%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20such%20browsers%2E%0A%20%20%20%20%20%20%20%20%20%20%20%20on%28document%2C%20%22slideenter%22%2C%20resizeHandler%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20on%28document%2C%20%22slideleave%22%2C%20resizeHandler%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20var%20scriptData%20%3D%20document%2EquerySelector%28%22script%5Bdata%2Dfor%3D%27%22%20%2B%20el%2Eid%20%2B%20%22%27%5D%5Btype%3D%27application%2Fjson%27%5D%22%29%3B%0A%20%20%20%20%20%20%20%20if%20%28scriptData%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20data%20%3D%20JSON%2Eparse%28scriptData%2EtextContent%20%7C%7C%20scriptData%2Etext%29%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Resolve%20strings%20marked%20as%20javascript%20literals%20to%20objects%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21%28data%2Eevals%20instanceof%20Array%29%29%20data%2Eevals%20%3D%20%5Bdata%2Eevals%5D%3B%0A%20%20%20%20%20%20%20%20%20%20for%20%28var%20k%20%3D%200%3B%20data%2Eevals%20%26%26%20k%20%3C%20data%2Eevals%2Elength%3B%20k%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20window%2EHTMLWidgets%2EevaluateStringMember%28data%2Ex%2C%20data%2Eevals%5Bk%5D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20binding%2ErenderValue%28el%2C%20data%2Ex%2C%20initResult%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%7D%29%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Wait%20until%20after%20the%20document%20has%20loaded%20to%20render%20the%20widgets%2E%0A%20%20if%20%28document%2EaddEventListener%29%20%7B%0A%20%20%20%20document%2EaddEventListener%28%22DOMContentLoaded%22%2C%20function%28%29%20%7B%0A%20%20%20%20%20%20document%2EremoveEventListener%28%22DOMContentLoaded%22%2C%20arguments%2Ecallee%2C%20false%29%3B%0A%20%20%20%20%20%20window%2EHTMLWidgets%2EstaticRender%28%29%3B%0A%20%20%20%20%7D%2C%20false%29%3B%0A%20%20%7D%20else%20if%20%28document%2EattachEvent%29%20%7B%0A%20%20%20%20document%2EattachEvent%28%22onreadystatechange%22%2C%20function%28%29%20%7B%0A%20%20%20%20%20%20if%20%28document%2EreadyState%20%3D%3D%3D%20%22complete%22%29%20%7B%0A%20%20%20%20%20%20%20%20document%2EdetachEvent%28%22onreadystatechange%22%2C%20arguments%2Ecallee%29%3B%0A%20%20%20%20%20%20%20%20window%2EHTMLWidgets%2EstaticRender%28%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%29%3B%0A%20%20%7D%0A%0A%0A%20%20window%2EHTMLWidgets%2EgetAttachmentUrl%20%3D%20function%28depname%2C%20key%29%20%7B%0A%20%20%20%20%2F%2F%20If%20no%20key%2C%20default%20to%20the%20first%20item%0A%20%20%20%20if%20%28typeof%28key%29%20%3D%3D%3D%20%22undefined%22%29%0A%20%20%20%20%20%20key%20%3D%201%3B%0A%0A%20%20%20%20var%20link%20%3D%20document%2EgetElementById%28depname%20%2B%20%22%2D%22%20%2B%20key%20%2B%20%22%2Dattachment%22%29%3B%0A%20%20%20%20if%20%28%21link%29%20%7B%0A%20%20%20%20%20%20throw%20new%20Error%28%22Attachment%20%22%20%2B%20depname%20%2B%20%22%2F%22%20%2B%20key%20%2B%20%22%20not%20found%20in%20document%22%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20link%2EgetAttribute%28%22href%22%29%3B%0A%20%20%7D%3B%0A%0A%20%20window%2EHTMLWidgets%2EdataframeToD3%20%3D%20function%28df%29%20%7B%0A%20%20%20%20var%20names%20%3D%20%5B%5D%3B%0A%20%20%20%20var%20length%3B%0A%20%20%20%20for%20%28var%20name%20in%20df%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28df%2EhasOwnProperty%28name%29%29%0A%20%20%20%20%20%20%20%20%20%20%20%20names%2Epush%28name%29%3B%0A%20%20%20%20%20%20%20%20if%20%28typeof%28df%5Bname%5D%29%20%21%3D%3D%20%22object%22%20%7C%7C%20typeof%28df%5Bname%5D%2Elength%29%20%3D%3D%3D%20%22undefined%22%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20Error%28%22All%20fields%20must%20be%20arrays%22%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20%28typeof%28length%29%20%21%3D%3D%20%22undefined%22%20%26%26%20length%20%21%3D%3D%20df%5Bname%5D%2Elength%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20Error%28%22All%20fields%20must%20be%20arrays%20of%20the%20same%20length%22%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20length%20%3D%20df%5Bname%5D%2Elength%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20results%20%3D%20%5B%5D%3B%0A%20%20%20%20var%20item%3B%0A%20%20%20%20for%20%28var%20row%20%3D%200%3B%20row%20%3C%20length%3B%20row%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20item%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20for%20%28var%20col%20%3D%200%3B%20col%20%3C%20names%2Elength%3B%20col%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20item%5Bnames%5Bcol%5D%5D%20%3D%20df%5Bnames%5Bcol%5D%5D%5Brow%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20results%2Epush%28item%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20results%3B%0A%20%20%7D%3B%0A%0A%20%20window%2EHTMLWidgets%2EtransposeArray2D%20%3D%20function%28array%29%20%7B%0A%20%20%20%20%20%20var%20newArray%20%3D%20array%5B0%5D%2Emap%28function%28col%2C%20i%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20array%2Emap%28function%28row%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20row%5Bi%5D%0A%20%20%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20return%20newArray%3B%0A%20%20%7D%3B%0A%20%20%2F%2F%20Split%20value%20at%20splitChar%2C%20but%20allow%20splitChar%20to%20be%20escaped%0A%20%20%2F%2F%20using%20escapeChar%2E%20Any%20other%20characters%20escaped%20by%20escapeChar%0A%20%20%2F%2F%20will%20be%20included%20as%20usual%20%28including%20escapeChar%20itself%29%2E%0A%20%20function%20splitWithEscape%28value%2C%20splitChar%2C%20escapeChar%29%20%7B%0A%20%20%20%20var%20results%20%3D%20%5B%5D%3B%0A%20%20%20%20var%20escapeMode%20%3D%20false%3B%0A%20%20%20%20var%20currentResult%20%3D%20%22%22%3B%0A%20%20%20%20for%20%28var%20pos%20%3D%200%3B%20pos%20%3C%20value%2Elength%3B%20pos%2B%2B%29%20%7B%0A%20%20%20%20%20%20if%20%28%21escapeMode%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28value%5Bpos%5D%20%3D%3D%3D%20splitChar%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20results%2Epush%28currentResult%29%3B%0A%20%20%20%20%20%20%20%20%20%20currentResult%20%3D%20%22%22%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20%28value%5Bpos%5D%20%3D%3D%3D%20escapeChar%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20escapeMode%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20currentResult%20%2B%3D%20value%5Bpos%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20currentResult%20%2B%3D%20value%5Bpos%5D%3B%0A%20%20%20%20%20%20%20%20escapeMode%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28currentResult%20%21%3D%3D%20%22%22%29%20%7B%0A%20%20%20%20%20%20results%2Epush%28currentResult%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20results%3B%0A%20%20%7D%0A%20%20%2F%2F%20Function%20authored%20by%20Yihui%2FJJ%20Allaire%0A%20%20window%2EHTMLWidgets%2EevaluateStringMember%20%3D%20function%28o%2C%20member%29%20%7B%0A%20%20%20%20var%20parts%20%3D%20splitWithEscape%28member%2C%20%27%2E%27%2C%20%27%5C%5C%27%29%3B%0A%20%20%20%20for%20%28var%20i%20%3D%200%2C%20l%20%3D%20parts%2Elength%3B%20i%20%3C%20l%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20var%20part%20%3D%20parts%5Bi%5D%3B%0A%20%20%20%20%20%20%2F%2F%20part%20may%20be%20a%20character%20or%20%27numeric%27%20member%20name%0A%20%20%20%20%20%20if%20%28o%20%21%3D%3D%20null%20%26%26%20typeof%20o%20%3D%3D%3D%20%22object%22%20%26%26%20part%20in%20o%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28i%20%3D%3D%20%28l%20%2D%201%29%29%20%7B%20%2F%2F%20if%20we%20are%20at%20the%20end%20of%20the%20line%20then%20evalulate%0A%20%20%20%20%20%20%20%20%20%20if%20%28typeof%20o%5Bpart%5D%20%3D%3D%3D%20%22string%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20o%5Bpart%5D%20%3D%20eval%28%22%28%22%20%2B%20o%5Bpart%5D%20%2B%20%22%29%22%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%20%2F%2F%20otherwise%20continue%20to%20next%20embedded%20object%0A%20%20%20%20%20%20%20%20%20%20o%20%3D%20o%5Bpart%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%7D%29%28%29%3B%0A%0A"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="data:application/x-javascript,HTMLWidgets%2Ewidget%28%7B%0A%0A%20%20name%3A%20%27bubbles%27%2C%0A%0A%20%20type%3A%20%27output%27%2C%0A%20%20%0A%20%20renderOnNullValue%3A%20true%2C%0A%0A%20%20initialize%3A%20function%28el%2C%20width%2C%20height%29%20%7B%0A%0A%20%20%20%20var%20bubble%20%3D%20d3%2Elayout%2Epack%28%29%0A%20%20%20%20%20%20%20%20%2Esort%28null%29%0A%20%20%20%20%20%20%20%20%2Epadding%281%2E5%29%3B%0A%20%20%20%20%0A%20%20%20%20var%20svg%20%3D%20d3%2Eselect%28el%29%2Eappend%28%22svg%22%29%0A%20%20%20%20%20%20%20%20%2Eattr%28%22class%22%2C%20%22bubble%22%29%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20return%20%7B%0A%20%20%20%20%20%20svg%3A%20svg%2C%0A%20%20%20%20%20%20bubble%3A%20bubble%0A%20%20%20%20%7D%0A%0A%20%20%7D%2C%0A%0A%20%20renderValue%3A%20function%28el%2C%20x%2C%20instance%29%20%7B%0A%0A%20%20%20%20%2F%2F%20Store%20the%20current%20value%20so%20we%20can%20easily%20call%20renderValue%0A%20%20%20%20%2F%2F%20from%20the%20resize%20method%20below%2C%20which%20doesn%27t%20give%20us%20an%20x%0A%20%20%20%20%2F%2F%20value%0A%20%20%20%20instance%2ElastValue%20%3D%20x%3B%0A%0A%20%20%20%20%2F%2F%20Retrieve%20our%20svg%20and%20bubble%20objects%20that%20were%20created%20in%0A%20%20%20%20%2F%2F%20the%20initialize%20method%20above%0A%20%20%20%20var%20svg%20%3D%20instance%2Esvg%3B%0A%20%20%20%20var%20bubble%20%3D%20instance%2Ebubble%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20Resize%20our%20svg%20element%20and%20bubble%20layout%20according%20to%20the%0A%20%20%20%20%2F%2F%20size%20of%20the%20actual%20DOM%20element%0A%20%20%20%20var%20width%20%3D%20el%2EoffsetWidth%3B%0A%20%20%20%20var%20height%20%3D%20el%2EoffsetHeight%3B%0A%20%20%20%20svg%2Eattr%28%22width%22%2C%20width%29%2Eattr%28%22height%22%2C%20height%29%3B%0A%20%20%20%20bubble%2Esize%28%5Bwidth%2C%20height%5D%29%3B%0A%0A%20%20%20%20var%20df%20%3D%20HTMLWidgets%2EdataframeToD3%28x%29%3B%0A%0A%20%20%20%20%2F%2F%20Set%20up%20our%20main%20selection%0A%20%20%20%20var%20node%20%3D%20svg%2EselectAll%28%22%2Enode%22%29%0A%20%20%20%20%20%20%20%20%2Edata%28bubble%2Enodes%28%7Bchildren%3A%20df%2C%20color%3A%20%22transparent%22%7D%29%2C%0A%20%20%20%20%20%20%20%20%20%20%28%21x%20%7C%7C%20%21x%2Ekey%29%20%3F%20null%20%3A%20function%28d%29%20%7B%20return%20d%2Ekey%3B%20%7D%0A%20%20%20%20%20%20%20%20%29%3B%0A%0A%20%20%20%20%2F%2F%20Create%20new%20nodes%2C%20and%20set%20their%20starting%20state%20so%20they%20look%0A%20%20%20%20%2F%2F%20good%20when%20they%20transition%20to%20their%20new%20state%0A%20%20%20%20var%20newNode%20%3D%20node%2Eenter%28%29%0A%20%20%20%20%20%20%20%20%2Eappend%28%22g%22%29%2Eattr%28%22class%22%2C%20%22node%22%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22opacity%22%2C%200%29%0A%20%20%20%20%20%20%20%20%2Eattr%28%22transform%22%2C%20function%28d%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%22translate%28%22%20%2B%20width%2F2%20%2B%20%22%2C%22%20%2B%20height%2F2%20%2B%20%22%29%22%3B%0A%20%20%20%20%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20newNode%2Eappend%28%22title%22%29%3B%0A%20%20%20%20newNode%2Eappend%28%22circle%22%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22fill%22%2C%20%22%23FFFFFF%22%29%3B%0A%20%20%20%20newNode%2Eappend%28%22text%22%29%0A%20%20%20%20%20%20%20%20%2Eattr%28%22dy%22%2C%20%22%2E3em%22%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22text%2Danchor%22%2C%20%22middle%22%29%3B%0A%0A%20%20%20%20%2F%2F%20Remove%20old%20nodes%0A%20%20%20%20node%2Eexit%28%29%2Etransition%28%29%0A%20%20%20%20%20%20%20%20%2Eremove%28%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22opacity%22%2C%200%29%3B%0A%0A%20%20%20%20%2F%2F%20Update%20all%20new%20and%20remaining%20nodes%0A%0A%20%20%20%20node%2Etransition%28%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22opacity%22%2C%201%29%0A%20%20%20%20%20%20%20%20%2Eattr%28%22transform%22%2C%20function%28d%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%22translate%28%22%20%2B%20d%2Ex%20%2B%20%22%2C%22%20%2B%20d%2Ey%20%2B%20%22%29%22%3B%0A%20%20%20%20%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20node%2Eselect%28%22title%22%29%0A%20%20%20%20%20%20%20%20%2Etext%28function%28d%29%20%7B%20return%20d%2Etooltip%3B%20%7D%29%3B%0A%0A%20%20%20%20node%2Eselect%28%22circle%22%29%2Etransition%28%29%0A%20%20%20%20%20%20%20%20%2Eattr%28%22r%22%2C%20function%28d%29%20%7B%20return%20d%2Er%3B%20%7D%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22fill%22%2C%20function%28d%29%20%7B%20return%20d%2Ecolor%3B%20%7D%29%3B%0A%0A%20%20%20%20node%2Eselect%28%22text%22%29%0A%20%20%20%20%20%20%20%20%2Etext%28function%28d%29%20%7B%20return%20d%2Elabel%3B%20%7D%29%0A%20%20%20%20%20%20%20%20%2Estyle%28%22fill%22%2C%20function%28d%29%20%7B%20return%20d%2EtextColor%3B%20%7D%29%3B%0A%20%20%7D%2C%0A%0A%20%20resize%3A%20function%28el%2C%20width%2C%20height%2C%20instance%29%20%7B%0A%20%20%20%20%2F%2F%20Re%2Drender%20the%20previous%20value%2C%20if%20any%0A%20%20%20%20if%20%28instance%2ElastValue%29%20%7B%0A%20%20%20%20%20%20this%2ErenderValue%28el%2C%20instance%2ElastValue%2C%20instance%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%7D%29%3B%0A"></script>
</head>
<body style="background-color:white;">
<div id="htmlwidget_container">
<div id="htmlwidget-3889" style="width:960px;height:600px;" class="bubbles"></div>
</div>
<script type="application/json" data-for="htmlwidget-3889">{"x":{"value":[3938,3812,6714,743,3534,5731,7840,5914,3416,7074,17010,5842,1983,2047,1375,8746,2202,1382,1629,1675,2042,1041,5176,449,5593,5534,9201,19975,1116,6006,721,4294,9800,1314,2220,1759,2165,586,3331,772,3322,8833,1732,3623,10066,4116,1082,1336,319,10498,2822,9983,2213,1681,1616,1027,3891,891,2893,5103,3677,781,4141,933,5130,3617,3240,2732,2039,1214,3748,843,593,330,287,277,292,595,594,460,603,625,748,461,597,619,283,283,591,603,599,386,323,307,772,296,363,600,280,307,335,299,354,264,843,1554,970,13896,1594,4130,791,1124,1876,1101,2105,1316,3151,3770,2435,4839,1756,4268,1821,5833,8258,10001,8217,12555,2324,10993,9354,1233,335,383,874,3165,2815,3366,17705,1486,6367,1229,2059,2291,5559,19118,6887,6557,22026,1302,24593,652,636,6703,2138,3824,1353,4665,2649,2832,4896,763,5222,7862,8435,20544,19788,10349,3301,19382,698,5569,353,2247,11275,7147,9930,2313,1880,1701,1117,20859,4614,10530,4461,6314,3444,3179,4060,4138,1690,1830,5219,3165,3509,1286,9956,3899,3202,6725,3727,9317,12003,4853,8411,4864,3174,7881,12870,2728,12348,870,9121,9191,2490,5248,4190,2581,2023,16540],"label":["AgglomerativeCluster","CommunityStructure","HierarchicalCluster","MergeEdge","BetweennessCentrality","LinkDistance","MaxFlowMinCut","ShortestPaths","SpanningTree","AspectRatioBanker","Easing","FunctionSequence","ArrayInterpolator","ColorInterpolator","DateInterpolator","Interpolator","MatrixInterpolator","NumberInterpolator","ObjectInterpolator","PointInterpolator","RectangleInterpolator","ISchedulable","Parallel","Pause","Scheduler","Sequence","Transition","Transitioner","TransitionEvent","Tween","Converters","DelimitedTextConverter","GraphMLConverter","IDataConverter","JSONConverter","DataField","DataSchema","DataSet","DataSource","DataTable","DataUtil","DirtySprite","LineSprite","RectSprite","TextSprite","FlareVis","DragForce","GravityForce","IForce","NBodyForce","Particle","Simulation","Spring","SpringForce","AggregateExpression","And","Arithmetic","Average","BinaryExpression","Comparison","CompositeExpression","Count","DateUtil","Distinct","Expression","ExpressionIterator","Fn","If","IsA","Literal","Match","Maximum","add","and","average","count","distinct","div","eq","fn","gt","gte","iff","isa","lt","lte","max","min","mod","mul","neq","not","or","orderby","range","select","stddev","sub","sum","update","variance","where","xor","_","Minimum","Not","Or","Query","Range","StringUtil","Sum","Variable","Variance","Xor","IScaleMap","LinearScale","LogScale","OrdinalScale","QuantileScale","QuantitativeScale","RootScale","Scale","ScaleType","TimeScale","Arrays","Colors","Dates","Displays","Filter","Geometry","FibonacciHeap","HeapNode","IEvaluable","IPredicate","IValueProxy","DenseMatrix","IMatrix","SparseMatrix","Maths","Orientation","ColorPalette","Palette","ShapePalette","SizePalette","Property","Shapes","Sort","Stats","Strings","Axes","Axis","AxisGridLine","AxisLabel","CartesianAxes","AnchorControl","ClickControl","Control","ControlList","DragControl","ExpandControl","HoverControl","IControl","PanZoomControl","SelectionControl","TooltipControl","Data","DataList","DataSprite","EdgeSprite","NodeSprite","ArrowType","EdgeRenderer","IRenderer","ShapeRenderer","ScaleBinding","Tree","TreeBuilder","DataEvent","SelectionEvent","TooltipEvent","VisualizationEvent","Legend","LegendItem","LegendRange","BifocalDistortion","Distortion","FisheyeDistortion","ColorEncoder","Encoder","PropertyEncoder","ShapeEncoder","SizeEncoder","FisheyeTreeFilter","GraphDistanceFilter","VisibilityFilter","IOperator","Labeler","RadialLabeler","StackedAreaLabeler","AxisLayout","BundledEdgeRouter","CircleLayout","CirclePackingLayout","DendrogramLayout","ForceDirectedLayout","IcicleTreeLayout","IndentedTreeLayout","Layout","NodeLinkTreeLayout","PieLayout","RadialTreeLayout","RandomLayout","StackedAreaLayout","TreeMapLayout","Operator","OperatorList","OperatorSequence","OperatorSwitch","SortOperator","Visualization"],"tooltip":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"color":["#A56475","#A56475","#A56475","#A56475","#CC616F","#CC616F","#CC616F","#CC616F","#CC616F","#A65628","#E41A1C","#E41A1C","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#FF7F00","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#E41A1C","#4485A9","#4485A9","#4485A9","#4485A9","#4485A9","#51938C","#51938C","#51938C","#51938C","#51938C","#51938C","#53A16D","#53A16D","#53A16D","#53A16D","#AC5492","#D66E7D","#D66E7D","#D66E7D","#D66E7D","#D66E7D","#D66E7D","#D66E7D","#D66E7D","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#DBB531","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#EC7AA9","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#D08EAF","#B594A4","#B594A4","#B594A4","#B594A4","#B594A4","#B594A4","#E76F48","#E76F48","#B594A4","#B594A4","#B594A4","#F3E633","#F3E633","#F3E633","#B594A4","#B594A4","#BF6253","#BF6253","#BF6253","#BF6253","#B594A4","#B594A4","#B594A4","#B594A4","#B594A4","#C84B4A","#C84B4A","#C84B4A","#C84B4A","#C84B4A","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#6E76A1","#51938C","#51938C","#51938C","#51938C","#51938C","#EA86BA","#EA86BA","#EA86BA","#EA86BA","#51938C","#51938C","#51938C","#867D80","#867D80","#867D80","#867D80","#FFEE2C","#FFEE2C","#FFEE2C","#4DAF4A","#4DAF4A","#4DAF4A","#719767","#719767","#719767","#719767","#719767","#936098","#936098","#936098","#C1862D","#FFA60F","#FFA60F","#FFA60F","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#FFCA1E","#C1862D","#C1862D","#C1862D","#C1862D","#C1862D","#999999"],"textColor":["#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333","#333333"]},"evals":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-3889">{"viewer":{"width":960,"height":600,"padding":15,"fill":false},"browser":{"width":960,"height":600,"padding":40,"fill":false}}</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment