Created
May 27, 2020 19:30
-
-
Save algomaster99/6dbb9dc35e0fc81aecc9ad028b44336e to your computer and use it in GitHub Desktop.
Vega-Lite spec from Thu May 28 2020
This file contains hidden or 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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | |
"description": "Plot showing a 30 day rolling average with raw values in the background.", | |
"width": 400, | |
"height": 300, | |
"data": {"url": "data/seattle-weather.csv"}, | |
"transform": [{ | |
"frame": [-15, 15], | |
"window": [ | |
{ | |
"field": "temp_max", | |
"op": "mean", | |
"as": "rolling_mean" | |
} | |
] | |
} | |
], | |
"layer": [ | |
{ | |
"mark": {"type": "point", "opacity": 0.3}, | |
"encoding": { | |
"x": { | |
"title": "Date", | |
"field": "date", | |
"type": "temporal" | |
}, | |
"y": { | |
"title": "Max Temperature", | |
"field": "temp_max", | |
"type": "quantitative" | |
} | |
} | |
}, | |
{ | |
"mark": { | |
"color": "red", | |
"size": 3, | |
"type": "line" | |
}, | |
"encoding": { | |
"x": { | |
"field": "date", | |
"type": "temporal" | |
}, | |
"y": { | |
"field": "rolling_mean", | |
"type": "quantitative" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment