Skip to content

Instantly share code, notes, and snippets.

@simonw
Created March 27, 2018 22:38
Show Gist options
  • Select an option

  • Save simonw/5f69fbe29380b0d5d95f31a385f49ee4 to your computer and use it in GitHub Desktop.

Select an option

Save simonw/5f69fbe29380b0d5d95f31a385f49ee4 to your computer and use it in GitHub Desktop.
Vega-lite visualization of the trees in one corner of San Francisco
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.1.json",
"width": 700,
"height": 800,
"data": {
"url": "https://san-francisco.datasettes.com/sf-trees-ebc2ad9.jsono?sql=select+latitude%2C+longitude%2C+qSpecies+from+Street_Tree_List+where+latitude+is+not+null and Latitude > 37.77 and Longitude < -122.45",
"format": {
"type": "json",
"property": "rows"
}
},
"projection": {
"type": "albersUsa"
},
"mark": "point",
"encoding": {
"longitude": {
"field": "Longitude",
"type": "quantitative"
},
"latitude": {
"field": "Latitude",
"type": "quantitative"
},
"size": {
"value": 1
},
"color": {
"field": "qSpecies",
"type": "nominal"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment