Last active
February 10, 2018 09:06
-
-
Save tomtaylor/55d50eca2a928f37855a5b32f1188745 to your computer and use it in GitHub Desktop.
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/v3.0.json", | |
"width": 500, | |
"height": 250, | |
"padding": 5, | |
"data": [ | |
{ | |
"name": "table", | |
"format": { | |
"type": "json", | |
"parse": { | |
"from": "date:%Y-%m-%dT%H:%MZ" | |
} | |
}, | |
"values": [ | |
{ | |
"from": "2018-02-05T21:00Z", | |
"to": "2018-02-05T21:30Z", | |
"intensity": { | |
"forecast": 307, | |
"actual": 350, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-05T21:30Z", | |
"to": "2018-02-05T22:00Z", | |
"intensity": { | |
"forecast": 299, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-05T22:00Z", | |
"to": "2018-02-05T22:30Z", | |
"intensity": { | |
"forecast": 292, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-05T22:30Z", | |
"to": "2018-02-05T23:00Z", | |
"intensity": { | |
"forecast": 284, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-05T23:00Z", | |
"to": "2018-02-05T23:30Z", | |
"intensity": { | |
"forecast": 276, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-05T23:30Z", | |
"to": "2018-02-06T00:00Z", | |
"intensity": { | |
"forecast": 278, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T00:00Z", | |
"to": "2018-02-06T00:30Z", | |
"intensity": { | |
"forecast": 290, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T00:30Z", | |
"to": "2018-02-06T01:00Z", | |
"intensity": { | |
"forecast": 295, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T01:00Z", | |
"to": "2018-02-06T01:30Z", | |
"intensity": { | |
"forecast": 294, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T01:30Z", | |
"to": "2018-02-06T02:00Z", | |
"intensity": { | |
"forecast": 295, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T02:00Z", | |
"to": "2018-02-06T02:30Z", | |
"intensity": { | |
"forecast": 289, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T02:30Z", | |
"to": "2018-02-06T03:00Z", | |
"intensity": { | |
"forecast": 289, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T03:00Z", | |
"to": "2018-02-06T03:30Z", | |
"intensity": { | |
"forecast": 287, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T03:30Z", | |
"to": "2018-02-06T04:00Z", | |
"intensity": { | |
"forecast": 283, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T04:00Z", | |
"to": "2018-02-06T04:30Z", | |
"intensity": { | |
"forecast": 277, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T04:30Z", | |
"to": "2018-02-06T05:00Z", | |
"intensity": { | |
"forecast": 273, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T05:00Z", | |
"to": "2018-02-06T05:30Z", | |
"intensity": { | |
"forecast": 275, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T05:30Z", | |
"to": "2018-02-06T06:00Z", | |
"intensity": { | |
"forecast": 271, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T06:00Z", | |
"to": "2018-02-06T06:30Z", | |
"intensity": { | |
"forecast": 272, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T06:30Z", | |
"to": "2018-02-06T07:00Z", | |
"intensity": { | |
"forecast": 286, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T07:00Z", | |
"to": "2018-02-06T07:30Z", | |
"intensity": { | |
"forecast": 297, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T07:30Z", | |
"to": "2018-02-06T08:00Z", | |
"intensity": { | |
"forecast": 312, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T08:00Z", | |
"to": "2018-02-06T08:30Z", | |
"intensity": { | |
"forecast": 319, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T08:30Z", | |
"to": "2018-02-06T09:00Z", | |
"intensity": { | |
"forecast": 321, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T09:00Z", | |
"to": "2018-02-06T09:30Z", | |
"intensity": { | |
"forecast": 316, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T09:30Z", | |
"to": "2018-02-06T10:00Z", | |
"intensity": { | |
"forecast": 319, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T10:00Z", | |
"to": "2018-02-06T10:30Z", | |
"intensity": { | |
"forecast": 316, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T10:30Z", | |
"to": "2018-02-06T11:00Z", | |
"intensity": { | |
"forecast": 261, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T11:00Z", | |
"to": "2018-02-06T11:30Z", | |
"intensity": { | |
"forecast": 257, | |
"actual": null, | |
"index": "moderate" | |
} | |
}, | |
{ | |
"from": "2018-02-06T11:30Z", | |
"to": "2018-02-06T12:00Z", | |
"intensity": { | |
"forecast": 288, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T12:00Z", | |
"to": "2018-02-06T12:30Z", | |
"intensity": { | |
"forecast": 299, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T12:30Z", | |
"to": "2018-02-06T13:00Z", | |
"intensity": { | |
"forecast": 298, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T13:00Z", | |
"to": "2018-02-06T13:30Z", | |
"intensity": { | |
"forecast": 295, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T13:30Z", | |
"to": "2018-02-06T14:00Z", | |
"intensity": { | |
"forecast": 295, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T14:00Z", | |
"to": "2018-02-06T14:30Z", | |
"intensity": { | |
"forecast": 296, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T14:30Z", | |
"to": "2018-02-06T15:00Z", | |
"intensity": { | |
"forecast": 304, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T15:00Z", | |
"to": "2018-02-06T15:30Z", | |
"intensity": { | |
"forecast": 311, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T15:30Z", | |
"to": "2018-02-06T16:00Z", | |
"intensity": { | |
"forecast": 320, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T16:00Z", | |
"to": "2018-02-06T16:30Z", | |
"intensity": { | |
"forecast": 329, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T16:30Z", | |
"to": "2018-02-06T17:00Z", | |
"intensity": { | |
"forecast": 337, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T17:00Z", | |
"to": "2018-02-06T17:30Z", | |
"intensity": { | |
"forecast": 343, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T17:30Z", | |
"to": "2018-02-06T18:00Z", | |
"intensity": { | |
"forecast": 351, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T18:00Z", | |
"to": "2018-02-06T18:30Z", | |
"intensity": { | |
"forecast": 354, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T18:30Z", | |
"to": "2018-02-06T19:00Z", | |
"intensity": { | |
"forecast": 352, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T19:00Z", | |
"to": "2018-02-06T19:30Z", | |
"intensity": { | |
"forecast": 346, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T19:30Z", | |
"to": "2018-02-06T20:00Z", | |
"intensity": { | |
"forecast": 338, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T20:00Z", | |
"to": "2018-02-06T20:30Z", | |
"intensity": { | |
"forecast": 328, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T20:30Z", | |
"to": "2018-02-06T21:00Z", | |
"intensity": { | |
"forecast": 315, | |
"actual": null, | |
"index": "high" | |
} | |
}, | |
{ | |
"from": "2018-02-06T21:00Z", | |
"to": "2018-02-06T21:30Z", | |
"intensity": { | |
"forecast": 305, | |
"actual": null, | |
"index": "high" | |
} | |
} | |
] | |
} | |
], | |
"scales": [ | |
{ | |
"name": "x", | |
"type": "linear", | |
"range": "width", | |
"zero": false, | |
"domain": { "data": "table", "field": "from" } | |
}, | |
{ | |
"name": "y", | |
"type": "linear", | |
"range": "height", | |
"nice": true, | |
"zero": true, | |
"domain": { "data": "table", "field": "intensity.forecast" } | |
} | |
], | |
"axes": [ | |
{ | |
"orient": "left", | |
"scale": "y", | |
"grid": true, | |
"title": "CO2 g/kWh", | |
"titlePadding": 10 | |
}, | |
{ | |
"orient": "bottom", | |
"scale": "x", | |
"format": ".2" | |
} | |
], | |
"marks": [ | |
{ | |
"type": "area", | |
"from": { "data": "table" }, | |
"encode": { | |
"enter": { | |
"interpolate": {"value": "monotone"}, | |
"x": { "scale": "x", "field": "from" }, | |
"y": { "scale": "y", "field": "intensity.forecast" }, | |
"y2": { "scale": "y", "value": 0 }, | |
"fill": { "value": "steelblue" }, | |
"strokeWidth": { "value": 3 } | |
}, | |
"update": { | |
"fillOpacity": { "value": 1 } | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment