Skip to content

Instantly share code, notes, and snippets.

@canDry
Created November 6, 2019 23:06
Show Gist options
  • Save canDry/a52b289f36a1d26b5fa117debecbbfb1 to your computer and use it in GitHub Desktop.
Save canDry/a52b289f36a1d26b5fa117debecbbfb1 to your computer and use it in GitHub Desktop.
observable display of mcds geojson points (from qgis)
viewof mcds = embed({
$schema: 'https://vega.github.io/schema/vega/v5.json',
data:[{
name: "mcdonalds",
url: "https://gist.github.com/canDry/cbd6813056a868ae5786601b4e148f6b#file-mcds-geojson",
format: {
type: "geojson",
property: "features"
}
}],
projections: [{
name: "projection",
fit: {signal: "data('mcdonalds')"},
size: {signal: "[800, 600]"},
//scale: 190000,
//center: [-123.149648,49.265815],
type: "mercator"
}],
marks: [
{
type: "shape",
from: {data: "mcdonalds"},
encode: {
update: {
opacity: {value: 0.25},
fill: {value: "blue"}
}
},
transform: [
{
type: "geoshape",
projection: "projection",
pointRadius: 6
}
]
}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment