Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Hello Vega Lite API

Public visualization

Viewing a saved revision (read-only)

6f5d5cb596e3488fb848f75ff4e35092

Hello Vega Lite API

0 stars0🌍 Public
Hhotdoujiang
Last edited Sep 12, 2019
Created on Sep 12, 2019

This example maps zip code locations across the United States as an interactive canvas visualization. It uses the Vega-Lite API (vl) to define a circle mark with longitude and latitude encodings, projecting the data with the Albers USA projection. The D3 library supplies a categorical color scale generated from hue, chroma, and lightness (hcl) values, assigning a distinct color per first two digits of each zip code. The final Vega view is rendered to a HiDPI canvas with a scale factor of three for retina displays. The underlying data is loaded from a remote CSV of zip codes.

AI-generated description

An example starting point for working with vega-lite-api. Derived from Observable: vega-lite-api.

Implements HiDPI Canvas.