-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework examples section, add uploadable vega support
- Loading branch information
1 parent
a7477c3
commit 96dfc4e
Showing
18 changed files
with
744 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | ||
"width": 250, | ||
"height": 200, | ||
"data": { | ||
"url": "data/penguins.json" | ||
}, | ||
"mark": { | ||
"type": "area", | ||
"opacity": 0.5 | ||
}, | ||
"transform": [ | ||
{ | ||
"density": "Body Mass (g)", | ||
"groupby": [ | ||
"Species" | ||
], | ||
"extent": [ | ||
2500, | ||
6500 | ||
] | ||
} | ||
], | ||
"encoding": { | ||
"x": { | ||
"field": "value", | ||
"type": "quantitative", | ||
"title": "Body Mass (g)" | ||
}, | ||
"y": { | ||
"field": "density", | ||
"type": "quantitative", | ||
"stack": null | ||
}, | ||
"color": { | ||
"field": "Species", | ||
"type": "nominal" | ||
} | ||
} | ||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"height": 150, | ||
"width": 150, | ||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | ||
"data": { | ||
"values": [ | ||
{ | ||
"category": "A", | ||
"group": "x", | ||
"value": 0.1 | ||
}, | ||
{ | ||
"category": "A", | ||
"group": "y", | ||
"value": 0.6 | ||
}, | ||
{ | ||
"category": "A", | ||
"group": "z", | ||
"value": 0.9 | ||
}, | ||
{ | ||
"category": "B", | ||
"group": "x", | ||
"value": 0.7 | ||
}, | ||
{ | ||
"category": "B", | ||
"group": "y", | ||
"value": 0.2 | ||
}, | ||
{ | ||
"category": "B", | ||
"group": "z", | ||
"value": 1.1 | ||
}, | ||
{ | ||
"category": "C", | ||
"group": "x", | ||
"value": 0.6 | ||
}, | ||
{ | ||
"category": "C", | ||
"group": "y", | ||
"value": 0.1 | ||
}, | ||
{ | ||
"category": "C", | ||
"group": "z", | ||
"value": 0.2 | ||
} | ||
] | ||
}, | ||
"mark": "bar", | ||
"encoding": { | ||
"x": { | ||
"field": "category" | ||
}, | ||
"y": { | ||
"field": "value", | ||
"type": "quantitative" | ||
}, | ||
"xOffset": { | ||
"field": "group" | ||
}, | ||
"color": { | ||
"field": "group" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | ||
"data": { | ||
"values": [ | ||
{ | ||
"x": 0, | ||
"y": 0, | ||
"value": -10 | ||
}, | ||
{ | ||
"x": 1, | ||
"y": 0, | ||
"value": -5 | ||
}, | ||
{ | ||
"x": 2, | ||
"y": 0, | ||
"value": 0 | ||
}, | ||
{ | ||
"x": 3, | ||
"y": 0, | ||
"value": 5 | ||
}, | ||
{ | ||
"x": 0, | ||
"y": 1, | ||
"value": -5 | ||
}, | ||
{ | ||
"x": 1, | ||
"y": 1, | ||
"value": 0 | ||
}, | ||
{ | ||
"x": 2, | ||
"y": 1, | ||
"value": 5 | ||
}, | ||
{ | ||
"x": 3, | ||
"y": 1, | ||
"value": 10 | ||
}, | ||
{ | ||
"x": 0, | ||
"y": 2, | ||
"value": 0 | ||
}, | ||
{ | ||
"x": 1, | ||
"y": 2, | ||
"value": 5 | ||
}, | ||
{ | ||
"x": 2, | ||
"y": 2, | ||
"value": 10 | ||
}, | ||
{ | ||
"x": 3, | ||
"y": 2, | ||
"value": 15 | ||
} | ||
] | ||
}, | ||
"mark": "rect", | ||
"encoding": { | ||
"x": { | ||
"field": "x", | ||
"type": "ordinal" | ||
}, | ||
"y": { | ||
"field": "y", | ||
"type": "ordinal" | ||
}, | ||
"color": { | ||
"field": "value", | ||
"type": "ordinal", | ||
"bin": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
"width": 250, | ||
"height": 250, | ||
"autosize": "none", | ||
"data": [ | ||
{ | ||
"name": "counties", | ||
"url": "data/us-10m.json", | ||
"format": { | ||
"type": "topojson", | ||
"feature": "counties" | ||
}, | ||
"transform": [ | ||
{ | ||
"type": "formula", | ||
"expr": "toNumber(datum.id)", | ||
"as": "id2" | ||
}, | ||
{ | ||
"type": "filter", | ||
"expr": "datum.id2 > 17000 && datum.id2 < 18000" | ||
} | ||
] | ||
} | ||
], | ||
"projections": [ | ||
{ | ||
"name": "projection", | ||
"type": "albersUsa", | ||
"translate": [ | ||
-100, | ||
180 | ||
], | ||
"scale": 2500 | ||
} | ||
], | ||
"scales": [ | ||
{ | ||
"name": "color", | ||
"type": "ordinal", | ||
"domain": { | ||
"data": "counties", | ||
"field": "id2" | ||
}, | ||
"range": "category" | ||
} | ||
], | ||
"marks": [ | ||
{ | ||
"type": "shape", | ||
"from": { | ||
"data": "counties" | ||
}, | ||
"encode": { | ||
"update": { | ||
"fill": { | ||
"scale": "color", | ||
"field": "id2" | ||
} | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"type": "geoshape", | ||
"projection": "projection" | ||
} | ||
] | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | ||
"data": { | ||
"url": "data/penguins.json" | ||
}, | ||
"mark": "point", | ||
"encoding": { | ||
"x": { | ||
"field": "Flipper Length (mm)", | ||
"type": "quantitative", | ||
"scale": { | ||
"zero": false | ||
} | ||
}, | ||
"y": { | ||
"field": "Body Mass (g)", | ||
"type": "quantitative", | ||
"scale": { | ||
"zero": false | ||
} | ||
}, | ||
"color": { | ||
"field": "Flipper Length (mm)", | ||
"type": "ordinal", | ||
"legend": null | ||
}, | ||
"shape": { | ||
"field": "Species", | ||
"type": "nominal" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"height": 150, | ||
"width": 150, | ||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | ||
"description": "A scatterplot showing body mass and flipper lengths of penguins.", | ||
"data": { | ||
"url": "data/penguins.json" | ||
}, | ||
"mark": "point", | ||
"encoding": { | ||
"x": { | ||
"field": "Flipper Length (mm)", | ||
"type": "quantitative", | ||
"scale": { | ||
"zero": false | ||
} | ||
}, | ||
"y": { | ||
"field": "Body Mass (g)", | ||
"type": "quantitative", | ||
"scale": { | ||
"zero": false | ||
} | ||
}, | ||
"color": { | ||
"field": "Species", | ||
"type": "nominal" | ||
}, | ||
"shape": { | ||
"field": "Species", | ||
"type": "nominal" | ||
} | ||
} | ||
} |
Oops, something went wrong.