User:Yurik/wordcloud

{ "name": "wordcloud", "width": 800, "height": 400, "padding": {"top":0, "bottom":0, "left":0, "right":0}, "data": [ {     "name": "table", "values": [ "Declarative visualization grammars can accelerate development, facilitate retargeting across platforms, and allow language-level optimizations. However, existing declarative visualization languages are primarily concerned with visual encoding, and rely on imperative event handlers for interactive behaviors. In response, we introduce a model of declarative interaction design for data visualizations. Adopting methods from reactive programming, we model low-level events as composable data streams from which we form higher-level semantic signals. Signals feed predicates and scale inversions, which allow us to generalize interactive selections at the level of item geometry (pixels) into interactive queries over the data domain. Production rules then use these queries to manipulate the visualization’s appearance. To facilitate reuse and sharing, these constructs can be encapsulated as named interactors: standalone, purely declarative specifications of interaction techniques. We assess our model’s feasibility and expressivity by instantiating it with extensions to the Vega visualization grammar. Through a diverse range of examples, we demonstrate coverage over an established taxonomy of visualization interaction techniques.",       "We present Reactive Vega, a system architecture that provides the first robust and comprehensive treatment of declarative visual and interaction design for data visualization. Starting from a single declarative specification, Reactive Vega constructs a dataflow graph in which input data, scene graph elements, and interaction events are all treated as first-class streaming data sources. To support expressive interactive visualizations that may involve time-varying scalar, relational, or hierarchical data, Reactive Vega’s dataflow graph can dynamically re-write itself at runtime by extending or pruning branches in a data-driven fashion. We discuss both compile- and run-time optimizations applied within Reactive Vega, and share the results of benchmark studies that indicate superior interactive performance to both D3 and the original, non-reactive Vega system."     ],      "transform": [        {          "type": "countpattern",          "field": "data",          "case": "upper",          "pattern": "[\\w']{3,}",          "stopwords": "(i|me|my|myself|we|us|our|ours|ourselves|you|your|yours|yourself|yourselves|he|him|his|himself|she|her|hers|herself|it|its|itself|they|them|their|theirs|themselves|what|which|who|whom|whose|this|that|these|those|am|is|are|was|were|be|been|being|have|has|had|having|do|does|did|doing|will|would|should|can|could|ought|i'm|you're|he's|she's|it's|we're|they're|i've|you've|we've|they've|i'd|you'd|he'd|she'd|we'd|they'd|i'll|you'll|he'll|she'll|we'll|they'll|isn't|aren't|wasn't|weren't|hasn't|haven't|hadn't|doesn't|don't|didn't|won't|wouldn't|shan't|shouldn't|can't|cannot|couldn't|mustn't|let's|that's|who's|what's|here's|there's|when's|where's|why's|how's|a|an|the|and|but|if|or|because|as|until|while|of|at|by|for|with|about|against|between|into|through|during|before|after|above|below|to|from|up|upon|down|in|out|on|off|over|under|again|further|then|once|here|there|when|where|why|how|all|any|both|each|few|more|most|other|some|such|no|nor|not|only|own|same|so|than|too|very|say|says|said|shall)" },       {          "type": "formula", "field": "angle", "expr": "[-45, 0, 45][(random * 3)]" },       {          "type": "formula", "field": "weight", "expr": "if(datum.text=='VEGA', 600, 300)" },       {          "type": "wordcloud", "size": [800, 400], "text": {"field": "text"}, "rotate": {"field": "angle"}, "font": {"value": "Helvetica Neue"}, "fontSize": {"field": "count"}, "fontWeight": {"field": "weight"}, "fontScale": [12, 56] }     ]    }  ],  "scales": [ {     "name": "color", "type": "ordinal", "range": ["#d5a928", "#652c90", "#939597"] } ],  "marks": [ {     "type": "text", "from": {"data": "table"}, "properties": { "enter": { "x": {"field": "layout_x"}, "y": {"field": "layout_y"}, "angle": {"field": "layout_rotate"}, "font": {"field": "layout_font"}, "fontSize": {"field": "layout_fontSize"}, "fontStyle": {"field": "layout_fontStyle"}, "fontWeight": {"field": "layout_fontWeight"}, "text": {"field": "text"}, "align": {"value": "center"}, "baseline": {"value": "alphabetic"}, "fill": {"scale": "color", "field": "text"} },       "update": { "fillOpacity": {"value": 1} },       "hover": { "fillOpacity": {"value": 0.5} }     }    }  ] }