Skip to content

Instantly share code, notes, and snippets.

@RobinL
Created July 14, 2018 13:25
Show Gist options
  • Select an option

  • Save RobinL/461dfc0f189375715d0078042c08fdaa to your computer and use it in GitHub Desktop.

Select an option

Save RobinL/461dfc0f189375715d0078042c08fdaa to your computer and use it in GitHub Desktop.

Revisions

  1. RobinL created this gist Jul 14, 2018.
    79 changes: 79 additions & 0 deletions spec.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,79 @@
    {"$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"
    }
    ]
    }
    ]
    }