{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "data": { "url": "https://vega.github.io/vega-lite/data/seattle-weather.csv" }, "description": "Plot showing a 30 day rolling average with raw values in the background.", "height": 300, "layer": [ { "encoding": { "x": { "field": "date", "title": "Date", "type": "temporal" }, "y": { "field": "temp_max", "title": "Maximum temperature", "type": "quantitative" } }, "mark": { "opacity": 0.3, "type": "point" } }, { "encoding": { "x": { "field": "date", "type": "temporal" }, "y": { "field": "rollingMean", "type": "quantitative" } }, "mark": { "color": "red", "size": 3, "type": "line" } } ], "transform": [ { "frame": [ -15, 15 ], "window": [ { "as": "rollingMean", "field": "temp_max", "op": "mean" } ] } ], "width": 400 }