Created
March 26, 2018 15:10
-
-
Save simonw/adee6214f56277f710868337d96ef53d to your computer and use it in GitHub Desktop.
Some combined Seattle weather graphs - from following https://vega.github.io/vega-lite/tutorials/explore.html
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/v2.json", | |
| "data": { | |
| "url": "data/seattle-weather.csv", | |
| "format": { | |
| "type": "csv" | |
| } | |
| }, | |
| "vconcat": [ | |
| { | |
| "mark": "line", | |
| "width": 600, | |
| "encoding": { | |
| "x": { | |
| "timeUnit": "monthyear", | |
| "field": "date", | |
| "type": "temporal" | |
| }, | |
| "y": { | |
| "aggregate": "mean", | |
| "field": "precipitation", | |
| "type": "quantitative" | |
| } | |
| } | |
| }, | |
| { | |
| "mark": "line", | |
| "width": 600, | |
| "encoding": { | |
| "x": { | |
| "timeUnit": "yearmonth", | |
| "field": "date", | |
| "type": "temporal" | |
| }, | |
| "y": { | |
| "aggregate": "max", | |
| "field": "temp_max", | |
| "type": "quantitative" | |
| } | |
| } | |
| }, | |
| { | |
| "mark": "bar", | |
| "encoding": { | |
| "x": { | |
| "timeUnit": "yearmonth", | |
| "field": "date", | |
| "type": "ordinal" | |
| }, | |
| "y": { | |
| "aggregate": "count", | |
| "field": "*", | |
| "type": "quantitative" | |
| }, | |
| "color": { | |
| "field": "weather", | |
| "type": "nominal" | |
| } | |
| } | |
| }, | |
| { | |
| "mark": "bar", | |
| "encoding": { | |
| "x": { | |
| "bin": { | |
| "maxbins": 20 | |
| }, | |
| "field": "precipitation", | |
| "type": "quantitative" | |
| }, | |
| "y": { | |
| "aggregate": "count", | |
| "field": "*", | |
| "type": "quantitative" | |
| } | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment