Skip to content

Instantly share code, notes, and snippets.

@yssymmt
Created October 22, 2023 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yssymmt/76aa4839ebe4d233945b63ca4780ef48 to your computer and use it in GitHub Desktop.
Save yssymmt/76aa4839ebe4d233945b63ca4780ef48 to your computer and use it in GitHub Desktop.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 600,
"height": 600,
"layer": [
{
"data": {
"url": "jp_pref.l.topojson",
"format": {
"type": "topojson",
"feature": "pref"
}
},
"mark": {
"type": "geoshape",
"stroke": "white",
"strokeWidth": 0.5
},
"encoding": {
"color": {
"value": "#e0e0e0"
}
}
},
{
"data": {
"url": "geoc_01linesplit_base.csv",
"format": {
"type": "csv"
}
},
"mark": {"type": "line", "opacity": 0.5},
"encoding": {
"longitude": {
"field": "経度",
"type": "quantitative"
},
"latitude": {
"field": "緯度",
"type": "quantitative"
},
"order": {
"field": "順序"
},
"detail": {
"field": "番号",
"type": "nominal"
},
"color": {
"field": "名前",
"type": "nominal",
"scale": { "range": ["#c71585"] }
}
}
},
{
"data": {
"url": "geoc_01linesplit_dot.csv",
"format": {
"type": "csv"
}
},
"mark": {"type": "circle", "opacity": 0.5},
"encoding": {
"longitude": {
"field": "経度",
"type": "quantitative"
},
"latitude": {
"field": "緯度",
"type": "quantitative"
},
"size": {"value": 100},
"detail": {
"field": "番号",
"type": "nominal"},
"color": {
"field": "名前",
"type": "nominal",
"scale": { "range": ["#66cdaa"] }
}
}
},
{
"data": {
"url": "geoc_01linesplit_dot.csv",
"format": {
"type": "csv"
}
},
"mark": {
"type": "text",
"opacity": 1,
"size": 12,
"color": "#202020"
},
"encoding": {
"longitude": {
"field": "経度",
"type": "quantitative"
},
"latitude": {
"field": "緯度",
"type": "quantitative"
},
"text": {
"field": "名前",
"type": "nominal"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment