Skip to content

Instantly share code, notes, and snippets.

@RunyangWang
Last active March 25, 2020 17:23
Show Gist options
  • Save RunyangWang/21f595ff0ff3b85b26ca9de759bc9445 to your computer and use it in GitHub Desktop.
Save RunyangWang/21f595ff0ff3b85b26ca9de759bc9445 to your computer and use it in GitHub Desktop.
vega-lite-question 2
{
"$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": "endstation_id", "equal": "336"}
}
],
"selection": {
"grid": {
"type": "interval", "bind": "scales"
}
},
"mark": "circle",
"encoding": {
"x": {"field": "startstation_longitude", "type": "quantitative","axis": {"title": "startstation_longitude, endstation_longitude"}},
"y": {"field": "startstation_latitude", "type": "quantitative","axis": {"title": "startstation_latitude, endstation_latitude"}},
"color": {
"condition": {
"test": "datum.startstation_longitude === -73.99906065 && datum.startstation_latitude === 40.73047747",
"value": "red"
}
},
"size":{
"condition": {
"test": "datum.startstation_longitude === -73.99906065 && datum.startstation_latitude === 40.73047747",
"value": "300"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment