Skip to content

Instantly share code, notes, and snippets.

@RobinL
Created July 14, 2018 13:25
Show Gist options
  • Save RobinL/461dfc0f189375715d0078042c08fdaa to your computer and use it in GitHub Desktop.
Save RobinL/461dfc0f189375715d0078042c08fdaa to your computer and use it in GitHub Desktop.
{"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 500,
"height": 600,
"autosize": "none",
"signals": [
{
"name": "translate0",
"update": "width / 2"
},
{
"name": "translate1",
"update": "height / 2"
}
],
"projections": [
{
"name": "projection",
"type": "mercator",
"scale": 1000,
"rotate": [
0,
0,
0
],
"center": [
17,
-3
],
"translate": [
{
"signal": "translate0"
},
{
"signal": "translate1"
}
]
}
],
"data": [
{
"name": "drc",
"url": "https://gist.githubusercontent.com/thomas-maschler/ef9891ef03ed4cf3fb23a4378dab485e/raw/47f3632d2135b9a783eeb76d0091762b70677c0d/drc.geojson",
"format": {
"type": "json",
"property": "features"
}
}
],
"marks": [
{
"type": "shape",
"from": {
"data": "drc"
},
"encode": {
"update": {
"strokeWidth": {
"value": 0.5
},
"stroke": {
"value": "darkblue"
},
"fillOpacity": {
"value": 0.5
}
}
},
"transform": [
{
"type": "geoshape",
"projection": "projection"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment