Created
March 25, 2020 02:24
-
-
Save RunyangWang/486c712972aac96234e41f48f3faa910 to your computer and use it in GitHub Desktop.
Code for question 1
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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | |
"width": "container", | |
"height": "container", | |
"data": { | |
"url": "https://raw.githubusercontent.com/vda-lab/vda-lab.github.io/master/assets/station_366.json" | |
}, | |
"transform": [ | |
{ | |
"filter": {"field": "tripduration", "lte": "5000"} | |
}, | |
{"calculate": "hours(datum.starttime)", "as": "hour"} | |
], | |
"mark": "circle", | |
"encoding": { | |
"x": {"field": "hour", "type": "quantitative"}, | |
"y": {"field": "tripduration", "type": "quantitative"}, | |
"color":{"field": "usertype", "type": "nominal"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment