Skip to content

Instantly share code, notes, and snippets.

📊
charting new territory

Dominik Moritz domoritz

📊
charting new territory
View GitHub Profile
@domoritz
domoritz / spec.json
Last active Jun 17, 2020
NYT Covid 19 Data
View spec.json
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"url": "https://raw.githubusercontent.com/nytimes/covid-19-data/master/us.csv",
"format": {"parse": {"deaths": "number"}}
},
"transform": [
{
"window": [
{"field": "deaths", "as": "previous_deaths", "op": "lag", "param": 1},
@domoritz
domoritz / .block
Created Jun 15, 2020
Altair container
View .block
license: mit
@domoritz
domoritz / .block
Last active Jun 13, 2020
Vega CSP inline code demo
View .block
license: mit
@domoritz
domoritz / .block
Last active Jun 13, 2020
Vega CSP test
View .block
license: mit
@domoritz
domoritz / .block
Last active May 21, 2020
Vega interaction bug with SVG
View .block
license: mit
@domoritz
domoritz / .block
Last active May 11, 2020
Vega out of sync demo
View .block
license: mit
@domoritz
domoritz / spec.json
Created May 10, 2020
Window smoothing with filter
View spec.json
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"sequence": {"start": 0, "stop": 100, "as": "x"}},
"transform": [{"calculate": "random() * sin(datum.x/10)", "as": "y"}],
"vconcat": [
{
"width": 600,
"mark": "line",
"encoding": {
"x": {"field": "x", "type": "quantitative"},
@domoritz
domoritz / spec.json
Last active May 9, 2020
Vega tooltip with images
View spec.json
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"padding": 5,
"height": 100,
"data": [
{
"name": "data",
"values": [
{"img": "data/ffox.png"},
{"img": "data/gimp.png"},
@domoritz
domoritz / spec.json
Last active May 8, 2020
Vega-Lite spec from Fri May 08 2020
View spec.json
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "A simple bar chart with embedded data.",
"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}
]
},
@domoritz
domoritz / .block
Last active Apr 12, 2020
Vega-Lite Locale Example
View .block
license: bsd-3-clause
You can’t perform that action at this time.