Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite US Maps With Captital Cities

Public visualization

Viewing a saved revision (read-only)

604cdf81c0a84b8cbdf803131ba1ef32

Vega-Lite US Maps With Captital Cities

0 stars1🌍 Public
Yyuzhang21
Last edited Sep 27, 2019
Created on Sep 18, 2019

This example visualizes U.S. state capitals as orange circles with city name labels, layered over a light gray map of U.S. states. It uses two Vega-Lite layers: a geoshape for the TopoJSON state boundaries and a composite layer combining circle and text marks for the capitals, positioned by longitude and latitude from the us-state-capitals.json dataset. The code relies on Vega-Lite’s projection type `albersUsa`, and embeds the visualization via `vegaEmbed` in an HTML page.

AI-generated description

This example of US State Capital Overlayed on US Map comes form Vega-Lite's site. It demonstrates mutliple layers are used to show the map and state capitals with name text and orange colored circle dots. The original data are json data from vega demo data for US State Capitals which can be found in vega docs data on github.