[{"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/seattle-weather.csv"}, "encoding": {"color": {"field": "weather", "legend": {"title": "Weather type"}, "scale": {"domain": ["sun", "fog", "drizzle", "rain", "snow"], "range": ["#e7ba52", "#c7c7c7", "#aec7e8", "#1f77b4", "#9467bd"]}, "type": "nominal"}, "x": {"axis": {"title": "Month of the year"}, "field": "date", "timeUnit": "month", "type": "ordinal"}, "y": {"aggregate": "count", "type": "quantitative"}}, "mark": "bar"}, "count": 546, "id": "90b0bc2"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/barley.json"}, "encoding": {"color": {"field": "site", "type": "nominal"}, "x": {"aggregate": "sum", "field": "yield", "type": "quantitative"}, "y": {"field": "variety", "type": "nominal"}}, "mark": "bar"}, "count": 557, "id": "b3b5625"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "description": "Shows the relationship between horsepower and the numbver of cylinders using tick marks.", "encoding": {"x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Cylinders", "type": "ordinal"}}, "mark": "tick"}, "count": 554, "id": "6305442"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/unemployment-across-industries.json"}, "encoding": {"color": {"field": "series", "scale": {"scheme": "category20b"}, "type": "nominal"}, "x": {"axis": {"domain": false, "format": "%Y", "tickSize": 0}, "field": "date", "timeUnit": "yearmonth", "type": "temporal"}, "y": {"aggregate": "sum", "axis": null, "field": "count", "stack": "center", "type": "quantitative"}}, "height": 200, "mark": "area", "width": 300}, "count": 572, "id": "dea374d"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Stock prices of 5 Tech Companies over Time.", "encoding": {"color": {"field": "symbol", "type": "nominal"}, "x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": "line"}, "count": 461, "id": "ec048c6"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/disasters.csv"}, "encoding": {"color": {"field": "Entity", "legend": null, "type": "nominal"}, "size": {"field": "Deaths", "legend": {"clipHeight": 30, "title": "Annual Global Deaths"}, "scale": {"range": [0, 5000]}, "type": "quantitative"}, "x": {"axis": {"labelAngle": 0}, "field": "Year", "type": "ordinal"}, "y": {"axis": {"title": ""}, "field": "Entity", "type": "nominal"}}, "height": 400, "mark": {"opacity": 0.8, "stroke": "black", "strokeWidth": 1, "type": "circle"}, "transform": [{"filter": "datum.Entity !== 'All natural disasters'"}], "width": 600}, "count": 112, "id": "a488d0d"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"x": 1, "y": 10}, {"x": 2, "y": 30}, {"x": 3, "y": null}, {"x": 4, "y": 15}, {"x": 5, "y": null}, {"x": 6, "y": 40}, {"x": 7, "y": 20}]}, "description": "A simple bar chart with embedded data.", "encoding": {"x": {"field": "x", "type": "quantitative"}, "y": {"field": "y", "type": "quantitative"}}, "mark": {"point": true, "type": "line"}}, "count": 529, "id": "72ce9a1"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "encoding": {"x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}}, "mark": "circle"}, "count": 553, "id": "16ece3e"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Google's stock price over time.", "encoding": {"x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": "line", "transform": [{"filter": "datum.symbol==='GOOG'"}]}, "count": 607, "id": "6a9d7bb"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/barley.json"}, "description": "Slope graph showing the change in yield for different barley sites. It shows the error in the year labels for the Morris site.", "encoding": {"color": {"field": "site", "type": "nominal"}, "x": {"field": "year", "scale": {"padding": 0.5, "rangeStep": 50}, "type": "ordinal"}, "y": {"aggregate": "median", "field": "yield", "type": "quantitative"}}, "mark": "line"}, "count": 544, "id": "4470d50"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Stock prices of 5 Tech Companies over Time.", "encoding": {"color": {"field": "symbol", "type": "nominal"}, "size": {"field": "price", "type": "quantitative"}, "x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": "trail"}, "count": 473, "id": "4649832"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/population.json"}, "encoding": {"color": {"field": "gender", "scale": {"range": ["#EA98D2", "#659CCA"]}, "type": "nominal"}, "x": {"field": "age", "scale": {"rangeStep": 17}, "type": "ordinal"}, "y": {"aggregate": "sum", "axis": {"title": "population"}, "field": "people", "stack": "normalize", "type": "quantitative"}}, "mark": "bar", "transform": [{"filter": "datum.year == 2000"}, {"as": "gender", "calculate": "datum.sex == 2 ? 'Female' : 'Male'"}]}, "count": 560, "id": "fe14392"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/driving.json"}, "encoding": {"order": {"field": "year", "type": "temporal"}, "x": {"field": "miles", "scale": {"zero": false}, "type": "quantitative"}, "y": {"field": "gas", "scale": {"zero": false}, "type": "quantitative"}}, "mark": {"point": true, "type": "line"}}, "count": 553, "id": "e139878"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"axis": {"domainWidth": 1}, "view": {"stroke": "transparent"}}, "data": {"format": {"type": "json"}, "url": "data/population.json"}, "encoding": {"color": {"field": "gender", "scale": {"range": ["#EA98D2", "#659CCA"]}, "type": "nominal"}, "column": {"field": "age", "type": "ordinal"}, "x": {"axis": {"title": ""}, "field": "gender", "scale": {"rangeStep": 12}, "type": "nominal"}, "y": {"aggregate": "sum", "axis": {"grid": false, "title": "population"}, "field": "people", "type": "quantitative"}}, "mark": "bar", "transform": [{"filter": "datum.year == 2000"}, {"as": "gender", "calculate": "datum.sex == 2 ? 'Female' : 'Male'"}]}, "count": 456, "id": "12dc617"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "description": "A scatterplot showing horsepower and miles per gallons for various cars.", "encoding": {"x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}}, "mark": "point"}, "count": 515, "id": "2308650"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/gapminder-health-income.csv"}, "description": "A bubble plot showing the correlation between health and income for 187 countries in the world (modified from an example in Lisa Charlotte Rost's blog post 'One Chart, Twelve Charting Libraries' --http://lisacharlotterost.github.io/2016/05/17/one-chart-code/).", "encoding": {"color": {"value": "#000"}, "size": {"field": "population", "type": "quantitative"}, "x": {"field": "income", "scale": {"type": "log"}, "type": "quantitative"}, "y": {"field": "health", "scale": {"zero": false}, "type": "quantitative"}}, "height": 300, "mark": "circle", "selection": {"view": {"bind": "scales", "encodings": ["x", "y"], "mark": {"fill": "#333", "fillOpacity": 0.125, "stroke": "white"}, "on": "[mousedown, window:mouseup] > window:mousemove!", "resolve": "global", "translate": "[mousedown, window:mouseup] > window:mousemove!", "type": "interval", "zoom": "wheel!"}}, "width": 500}, "count": 182, "id": "ac51bad"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"b": 28, "color": "red"}, {"b": 55, "color": "green"}, {"b": 43, "color": "blue"}]}, "description": "A bar chart that directly encodes color names in the data.", "encoding": {"color": {"field": "color", "scale": null, "type": "nominal"}, "x": {"field": "color", "type": "nominal"}, "y": {"field": "b", "type": "quantitative"}}, "mark": "bar"}, "count": 547, "id": "9314298"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "encoding": {"color": {"field": "Origin", "type": "nominal"}, "text": {"field": "OriginInitial", "type": "nominal"}, "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}}, "mark": "text", "transform": [{"as": "OriginInitial", "calculate": "datum.Origin[0]"}]}, "count": 576, "id": "a959e3b"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"end": 3, "start": 1, "task": "A"}, {"end": 8, "start": 3, "task": "B"}, {"end": 10, "start": 8, "task": "C"}]}, "description": "A simple bar chart with ranged data (aka Gantt Chart).", "encoding": {"x": {"field": "start", "type": "quantitative"}, "x2": {"field": "end", "type": "quantitative"}, "y": {"field": "task", "type": "ordinal"}}, "mark": "bar"}, "count": 472, "id": "c113e5c"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"invalidValues": null}, "data": {"format": {"type": "json"}, "url": "data/movies.json"}, "encoding": {"color": {"condition": {"test": "datum.IMDB_Rating === null || datum.Rotten_Tomatoes_Rating === null", "value": "#aaa"}}, "x": {"field": "IMDB_Rating", "type": "quantitative"}, "y": {"field": "Rotten_Tomatoes_Rating", "type": "quantitative"}}, "mark": "point"}, "count": 465, "id": "ae4e69e"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/unemployment-across-industries.json"}, "encoding": {"x": {"axis": {"format": "%Y"}, "field": "date", "timeUnit": "yearmonth", "type": "temporal"}, "y": {"aggregate": "sum", "axis": {"title": "count"}, "field": "count", "type": "quantitative"}}, "height": 200, "mark": "area", "width": 300}, "count": 625, "id": "5e20bdc"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/seattle-weather.csv"}, "encoding": {"x": {"field": "precipitation", "type": "quantitative"}}, "mark": "tick"}, "count": 534, "id": "2193592"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/unemployment-across-industries.json"}, "encoding": {"color": {"field": "series", "scale": {"scheme": "category20b"}, "type": "nominal"}, "x": {"axis": {"domain": false, "format": "%Y"}, "field": "date", "timeUnit": "yearmonth", "type": "temporal"}, "y": {"aggregate": "sum", "axis": null, "field": "count", "stack": "normalize", "type": "quantitative"}}, "height": 200, "mark": "area", "width": 300}, "count": 551, "id": "9b11ba7"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"axis": {"domain": false, "grid": false, "labels": false, "ticks": false}, "view": {"stroke": ""}}, "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "resolve": {"scale": {"color": "shared", "opacity": "shared", "x": "shared", "y": "independent"}}, "transform": [{"aggregate": [{"as": "count_*", "op": "count"}], "groupby": ["Origin", "Cylinders"]}, {"as": ["stack_count_Origin1", "stack_count_Origin2"], "groupby": [], "offset": "normalize", "sort": [{"field": "Origin", "order": "ascending"}], "stack": "count_*"}, {"frame": [null, null], "groupby": ["Origin"], "sort": [{"field": "Cylinders", "order": "ascending"}], "window": [{"as": "x", "field": "stack_count_Origin1", "op": "min"}, {"as": "x2", "field": "stack_count_Origin2", "op": "max"}, {"as": "rank_Cylinders", "op": "dense_rank"}, {"as": "distinct_Cylinders", "field": "Cylinders", "op": "distinct"}]}, {"frame": [null, null], "sort": [{"field": "Origin", "order": "ascending"}], "window": [{"as": "rank_Origin", "op": "dense_rank"}]}, {"as": ["y", "y2"], "groupby": ["Origin"], "offset": "normalize", "sort": [{"field": "Cylinders", "order": "ascending"}], "stack": "count_*"}, {"as": "ny", "calculate": "datum.y + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3"}, {"as": "ny2", "calculate": "datum.y2 + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3"}, {"as": "nx", "calculate": "datum.x + (datum.rank_Origin - 1) * 0.01"}, {"as": "nx2", "calculate": "datum.x2 + (datum.rank_Origin - 1) * 0.01"}, {"as": "xc", "calculate": "(datum.nx+datum.nx2)/2"}, {"as": "yc", "calculate": "(datum.ny+datum.ny2)/2"}], "vconcat": [{"encoding": {"color": {"field": "Origin", "legend": null, "type": "nominal"}, "text": {"field": "Origin", "type": "nominal"}, "x": {"aggregate": "min", "axis": {"orient": "top"}, "field": "xc", "title": "Origin", "type": "quantitative"}}, "mark": {"align": "center", "baseline": "middle", "type": "text"}}, {"layer": [{"encoding": {"color": {"field": "Origin", "legend": null, "type": "nominal"}, "opacity": {"field": "Cylinders", "legend": null, "type": "quantitative"}, "tooltip": [{"field": "Origin", "type": "nominal"}, {"field": "Cylinders", "type": "quantitative"}], "x": {"axis": null, "field": "nx", "type": "quantitative"}, "x2": {"field": "nx2", "type": "quantitative"}, "y": {"axis": null, "field": "ny", "type": "quantitative"}, "y2": {"field": "ny2", "type": "quantitative"}}, "mark": {"type": "rect"}}, {"encoding": {"text": {"field": "Cylinders", "type": "nominal"}, "x": {"axis": null, "field": "xc", "type": "quantitative"}, "y": {"axis": {"title": "Cylinders"}, "field": "yc", "type": "quantitative"}}, "mark": {"baseline": "middle", "type": "text"}}]}]}, "count": 376, "id": "9a77fe9"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Google's stock price over time.", "encoding": {"x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": {"interpolate": "step-after", "type": "line"}, "transform": [{"filter": "datum.symbol==='GOOG'"}]}, "count": 584, "id": "8cf1940"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Google's stock price over time.", "encoding": {"x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": {"line": true, "point": true, "type": "area"}, "transform": [{"filter": "datum.symbol==='GOOG'"}]}, "count": 505, "id": "8599f16"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/movies.json"}, "encoding": {"size": {"aggregate": "count", "type": "quantitative"}, "x": {"bin": {"maxbins": 10}, "field": "IMDB_Rating", "type": "quantitative"}, "y": {"bin": {"maxbins": 10}, "field": "Rotten_Tomatoes_Rating", "type": "quantitative"}}, "mark": "circle"}, "count": 536, "id": "69dd07a"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"text": {"align": "left", "dx": 3, "dy": 1}}, "data": {"format": {"parse": {"Date": "utc:'%Y-%m-%d'"}, "type": "csv"}, "url": "data/co2-concentration.csv"}, "encoding": {"x": {"axis": {"tickCount": 11, "title": "Year into Decade"}, "field": "scaled_date", "type": "quantitative"}, "y": {"field": "CO2", "scale": {"zero": false}, "title": "CO2 concentration in ppm", "type": "quantitative"}}, "height": 500, "layer": [{"encoding": {"color": {"field": "decade", "legend": null, "scale": {"scheme": "magma"}, "type": "ordinal"}}, "mark": "line"}, {"encoding": {"text": {"field": "year", "type": "nominal"}}, "mark": {"baseline": "top", "type": "text"}, "transform": [{"filter": {"equal": "first", "field": "end"}}]}, {"encoding": {"text": {"field": "year", "type": "nominal"}}, "mark": {"baseline": "bottom", "type": "text"}, "transform": [{"filter": {"equal": "last", "field": "end"}}]}], "transform": [{"as": "year", "calculate": "year(datum.Date)"}, {"as": "decade", "calculate": "floor(datum.year / 10)"}, {"as": "scaled_date", "calculate": "(datum.year % 10) + (month(datum.Date)/12)"}, {"frame": [null, null], "groupby": ["decade"], "sort": [{"field": "scaled_date", "order": "ascending"}, {"field": "scaled_date", "order": "ascending"}], "window": [{"as": "first_date", "field": "scaled_date", "op": "first_value"}, {"as": "last_date", "field": "scaled_date", "op": "last_value"}]}, {"as": "end", "calculate": "datum.first_date === datum.scaled_date ? 'first' : datum.last_date === datum.scaled_date ? 'last' : null"}], "width": 800}, "count": 387, "id": "cc5eedc"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/unemployment-across-industries.json"}, "description": "Area chart showing weight of cars over time.", "encoding": {"color": {"field": "series", "scale": {"scheme": "category20b"}, "type": "nominal"}, "x": {"axis": {"format": "%Y"}, "field": "date", "timeUnit": "yearmonth", "type": "temporal"}, "y": {"aggregate": "sum", "field": "count", "type": "quantitative"}}, "height": 200, "mark": "area", "width": 300}, "count": 509, "id": "74922c2"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "description": "A bubbleplot showing horsepower on x, miles per gallons on y, and binned acceleration on size.", "encoding": {"size": {"field": "Acceleration", "type": "quantitative"}, "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}}, "mark": "point"}, "count": 526, "id": "5e695c7"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"percentage": 0.7, "question": "Question 1", "type": "Strongly disagree", "value": 24}, {"percentage": 9.1, "question": "Question 1", "type": "Disagree", "value": 294}, {"percentage": 18.5, "question": "Question 1", "type": "Neither agree nor disagree", "value": 594}, {"percentage": 59.9, "question": "Question 1", "type": "Agree", "value": 1927}, {"percentage": 11.7, "question": "Question 1", "type": "Strongly agree", "value": 376}, {"percentage": 18.2, "question": "Question 2", "type": "Strongly disagree", "value": 2}, {"percentage": 18.2, "question": "Question 2", "type": "Disagree", "value": 2}, {"percentage": 0, "question": "Question 2", "type": "Neither agree nor disagree", "value": 0}, {"percentage": 63.6, "question": "Question 2", "type": "Agree", "value": 7}, {"percentage": 0, "question": "Question 2", "type": "Strongly agree", "value": 11}, {"percentage": 20, "question": "Question 3", "type": "Strongly disagree", "value": 2}, {"percentage": 0, "question": "Question 3", "type": "Disagree", "value": 0}, {"percentage": 20, "question": "Question 3", "type": "Neither agree nor disagree", "value": 2}, {"percentage": 40, "question": "Question 3", "type": "Agree", "value": 4}, {"percentage": 20, "question": "Question 3", "type": "Strongly agree", "value": 2}, {"percentage": 0, "question": "Question 4", "type": "Strongly disagree", "value": 0}, {"percentage": 12.5, "question": "Question 4", "type": "Disagree", "value": 2}, {"percentage": 6.3, "question": "Question 4", "type": "Neither agree nor disagree", "value": 1}, {"percentage": 43.8, "question": "Question 4", "type": "Agree", "value": 7}, {"percentage": 37.5, "question": "Question 4", "type": "Strongly agree", "value": 6}, {"percentage": 0, "question": "Question 5", "type": "Strongly disagree", "value": 0}, {"percentage": 4.2, "question": "Question 5", "type": "Disagree", "value": 1}, {"percentage": 12.5, "question": "Question 5", "type": "Neither agree nor disagree", "value": 3}, {"percentage": 66.7, "question": "Question 5", "type": "Agree", "value": 16}, {"percentage": 16.7, "question": "Question 5", "type": "Strongly agree", "value": 4}, {"percentage": 6.3, "question": "Question 6", "type": "Strongly disagree", "value": 1}, {"percentage": 6.3, "question": "Question 6", "type": "Disagree", "value": 1}, {"percentage": 12.5, "question": "Question 6", "type": "Neither agree nor disagree", "value": 2}, {"percentage": 56.3, "question": "Question 6", "type": "Agree", "value": 9}, {"percentage": 18.8, "question": "Question 6", "type": "Strongly agree", "value": 3}, {"percentage": 0, "question": "Question 7", "type": "Strongly disagree", "value": 0}, {"percentage": 0, "question": "Question 7", "type": "Disagree", "value": 0}, {"percentage": 20, "question": "Question 7", "type": "Neither agree nor disagree", "value": 1}, {"percentage": 80, "question": "Question 7", "type": "Agree", "value": 4}, {"percentage": 0, "question": "Question 7", "type": "Strongly agree", "value": 0}, {"percentage": 0, "question": "Question 8", "type": "Strongly disagree", "value": 0}, {"percentage": 0, "question": "Question 8", "type": "Disagree", "value": 0}, {"percentage": 0, "question": "Question 8", "type": "Neither agree nor disagree", "value": 0}, {"percentage": 0, "question": "Question 8", "type": "Agree", "value": 0}, {"percentage": 100, "question": "Question 8", "type": "Strongly agree", "value": 2}]}, "description": "A diverging stacked bar chart for sentiments towards a set of eight questions, displayed as percentages with neutral responses straddling the 0% mark", "encoding": {"color": {"field": "type", "legend": {"title": "Response"}, "scale": {"domain": ["Strongly disagree", "Disagree", "Neither agree nor disagree", "Agree", "Strongly agree"], "range": ["#c30d24", "#f3a583", "#cccccc", "#94c6da", "#1770ab"], "type": "ordinal"}, "type": "nominal"}, "x": {"axis": {"title": "Percentage"}, "field": "nx", "type": "quantitative"}, "x2": {"field": "nx2", "type": "quantitative"}, "y": {"axis": {"domain": false, "minExtent": 60, "offset": 5, "ticks": false, "title": "Question"}, "field": "question", "type": "nominal"}}, "mark": "bar", "transform": [{"as": "q_order", "calculate": "if(datum.type === 'Strongly disagree',-2,0) + if(datum.type==='Disagree',-1,0) + if(datum.type =='Neither agree nor disagree',0,0) + if(datum.type ==='Agree',1,0) + if(datum.type ==='Strongly agree',2,0)"}, {"as": "signed_percentage", "calculate": "if(datum.type === 'Disagree' || datum.type === 'Strongly disagree', datum.percentage,0) + if(datum.type === 'Neither agree nor disagree', datum.percentage / 2,0)"}, {"as": ["v1", "v2"], "groupby": ["question"], "stack": "percentage"}, {"frame": [null, null], "groupby": ["question"], "window": [{"as": "offset", "field": "signed_percentage", "op": "sum"}]}, {"as": "nx", "calculate": "datum.v1 - datum.offset"}, {"as": "nx2", "calculate": "datum.v2 - datum.offset"}]}, "count": 540, "id": "fc8ba5b"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"diff": -1, "matchday": 1, "point": 0, "team": "Germany"}, {"diff": 1, "matchday": 1, "point": 3, "team": "Mexico"}, {"diff": -1, "matchday": 1, "point": 0, "team": "South Korea"}, {"diff": 1, "matchday": 1, "point": 3, "team": "Sweden"}, {"diff": 0, "matchday": 2, "point": 3, "team": "Germany"}, {"diff": 2, "matchday": 2, "point": 6, "team": "Mexico"}, {"diff": -2, "matchday": 2, "point": 0, "team": "South Korea"}, {"diff": 0, "matchday": 2, "point": 3, "team": "Sweden"}, {"diff": -2, "matchday": 3, "point": 3, "team": "Germany"}, {"diff": -1, "matchday": 3, "point": 6, "team": "Mexico"}, {"diff": 0, "matchday": 3, "point": 3, "team": "South Korea"}, {"diff": 3, "matchday": 3, "point": 6, "team": "Sweden"}]}, "encoding": {"color": {"field": "team", "scale": {"domain": ["Germany", "Mexico", "South Korea", "Sweden"], "range": ["black", "#127153", "#C91A3C", "#0C71AB"]}, "type": "nominal"}, "x": {"field": "matchday", "type": "ordinal"}, "y": {"field": "rank", "type": "ordinal"}}, "mark": {"orient": "vertical", "type": "line"}, "title": "World Cup 2018: Group F Rankings", "transform": [{"groupby": ["matchday"], "sort": [{"field": "point", "order": "descending"}, {"field": "diff", "order": "descending"}], "window": [{"as": "rank", "op": "rank"}]}]}, "count": 522, "id": "c13c8ac"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/movies.json"}, "encoding": {"x": {"bin": true, "field": "IMDB_Rating", "type": "quantitative"}, "y": {"aggregate": "count", "type": "quantitative"}}, "mark": "bar"}, "count": 591, "id": "fe4821e"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/population.json"}, "description": "A bar chart showing the US population distribution of age groups in 2000.", "encoding": {"x": {"aggregate": "sum", "axis": {"title": "population"}, "field": "people", "type": "quantitative"}, "y": {"field": "age", "scale": {"rangeStep": 17}, "type": "ordinal"}}, "mark": "bar", "transform": [{"filter": "datum.year == 2000"}]}, "count": 578, "id": "dc72c6a"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}]}, "description": "A simple bar chart with embedded data.", "encoding": {"x": {"field": "a", "type": "ordinal"}, "y": {"field": "b", "type": "quantitative"}}, "mark": "bar"}, "count": 639, "id": "9c937bd"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/population.json"}, "description": "A bar chart showing the US population distribution of age groups and gender in 2000.", "encoding": {"color": {"field": "gender", "scale": {"range": ["#e377c2", "#1f77b4"]}, "type": "nominal"}, "opacity": {"value": 0.7}, "x": {"field": "age", "scale": {"rangeStep": 17}, "type": "ordinal"}, "y": {"aggregate": "sum", "axis": {"title": "population"}, "field": "people", "stack": null, "type": "quantitative"}}, "mark": "bar", "transform": [{"filter": "datum.year == 2000"}, {"as": "gender", "calculate": "datum.sex == 2 ? 'Female' : 'Male'"}]}, "count": 507, "id": "d32989b"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "description": "Google's stock price over time.", "encoding": {"x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": {"color": "green", "point": {"color": "red"}, "type": "line"}, "transform": [{"filter": "datum.symbol==='GOOG'"}]}, "count": 523, "id": "344d2f4"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"area": {"interpolate": "monotone"}}, "data": {"values": [{"x": 1, "y": 28}, {"x": 2, "y": 55}, {"x": 3, "y": 43}, {"x": 4, "y": 91}, {"x": 5, "y": 81}, {"x": 6, "y": 53}, {"x": 7, "y": 19}, {"x": 8, "y": 87}, {"x": 9, "y": 52}, {"x": 10, "y": 48}, {"x": 11, "y": 24}, {"x": 12, "y": 49}, {"x": 13, "y": 87}, {"x": 14, "y": 66}, {"x": 15, "y": 17}, {"x": 16, "y": 27}, {"x": 17, "y": 68}, {"x": 18, "y": 16}, {"x": 19, "y": 49}, {"x": 20, "y": 15}]}, "description": "Horizon Graph with 2 layers. (See https://idl.cs.washington.edu/papers/horizon/ for more details on Horizon Graphs.)", "height": 50, "layer": [{"encoding": {"opacity": {"value": 0.6}, "x": {"field": "x", "scale": {"nice": false, "zero": false}, "type": "quantitative"}, "y": {"field": "y", "scale": {"domain": [0, 50]}, "type": "quantitative"}}, "mark": {"clip": true, "orient": "vertical", "type": "area"}}, {"encoding": {"opacity": {"value": 0.3}, "x": {"field": "x", "type": "quantitative"}, "y": {"axis": {"title": "y"}, "field": "ny", "scale": {"domain": [0, 50]}, "type": "quantitative"}}, "mark": {"clip": true, "orient": "vertical", "type": "area"}, "transform": [{"as": "ny", "calculate": "datum.y - 50"}]}], "width": 300}, "count": 187, "id": "7e3f708"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "description": "A scatterplot showing horsepower and miles per gallons.", "encoding": {"color": {"field": "Origin", "type": "nominal"}, "shape": {"field": "Origin", "type": "nominal"}, "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}}, "mark": "point"}, "count": 645, "id": "80f7e0f"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/stocks.csv"}, "encoding": {"x": {"field": "date", "type": "temporal"}, "y": {"field": "price", "type": "quantitative"}}, "mark": {"interpolate": "monotone", "type": "line"}, "transform": [{"filter": "datum.symbol==='GOOG'"}]}, "count": 568, "id": "f74121e"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"values": [{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}]}, "description": "A simple bar chart with embedded data.", "encoding": {"x": {"field": "b", "type": "quantitative"}, "y": {"field": "a", "type": "ordinal"}}, "layer": [{"mark": "bar"}, {"encoding": {"text": {"field": "b", "type": "quantitative"}}, "mark": {"align": "left", "baseline": "middle", "dx": 3, "type": "text"}}]}, "count": 544, "id": "f247195"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "csv"}, "url": "data/github.csv"}, "description": "Punchcard Visualization like on Github. The day on y-axis uses a custom order from Monday to Sunday. The sort property supports both full day names (e.g., 'Monday') and their three letter initials (e.g., 'mon') -- both of which are case insensitive.", "encoding": {"size": {"aggregate": "sum", "field": "count", "type": "quantitative"}, "x": {"field": "time", "timeUnit": "hours", "type": "ordinal"}, "y": {"field": "time", "sort": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "timeUnit": "day", "type": "ordinal"}}, "mark": "circle"}, "count": 551, "id": "3379c16"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"scale": {"bandPaddingInner": 0, "bandPaddingOuter": 0}, "text": {"baseline": "middle"}}, "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "encoding": {"x": {"field": "Cylinders", "type": "ordinal"}, "y": {"field": "Origin", "type": "ordinal"}}, "layer": [{"encoding": {"color": {"aggregate": "count", "field": "*", "type": "quantitative"}}, "mark": "rect"}, {"encoding": {"color": {"condition": {"test": "datum['count_*'] > 100", "value": "black"}, "value": "white"}, "text": {"aggregate": "count", "field": "*", "type": "quantitative"}}, "mark": "text"}]}, "count": 178, "id": "b014388"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"axis": {"domain": false}, "scale": {"rangeStep": 13}, "view": {"strokeWidth": 0}}, "data": {"format": {"type": "csv"}, "url": "data/seattle-temps.csv"}, "encoding": {"color": {"aggregate": "max", "field": "temp", "legend": {"title": null}, "type": "quantitative"}, "x": {"axis": {"format": "%e", "labelAngle": 0}, "field": "date", "timeUnit": "date", "title": "Day", "type": "ordinal"}, "y": {"field": "date", "timeUnit": "month", "title": "Month", "type": "ordinal"}}, "mark": "rect", "title": "2010 Daily Max Temperature (F) in Seattle, WA"}, "count": 190, "id": "8dd3c62"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "data": {"format": {"type": "json"}, "url": "data/cars.json"}, "encoding": {"color": {"aggregate": "mean", "field": "Horsepower", "type": "quantitative"}, "x": {"field": "Cylinders", "type": "ordinal"}, "y": {"field": "Origin", "type": "nominal"}}, "mark": "rect"}, "count": 177, "id": "2ca76ff"}, {"context": {"$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"range": {"heatmap": {"scheme": "greenblue"}}, "view": {"stroke": "transparent"}}, "data": {"format": {"type": "json"}, "url": "data/movies.json"}, "encoding": {"color": {"aggregate": "count", "type": "quantitative"}, "x": {"bin": {"maxbins": 60}, "field": "IMDB_Rating", "type": "quantitative"}, "y": {"bin": {"maxbins": 40}, "field": "Rotten_Tomatoes_Rating", "type": "quantitative"}}, "height": 200, "mark": "rect", "width": 300}, "count": 141, "id": "9be6adf"}]