Skip to main content
100%

Hello Vega Lite API

✓ Published0🌍 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.

MIT Licensed

Similar vizzes