Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template w/ API Fetch

Public visualization

Viewing a saved revision (read-only)

e97e0ae4b3dd4c58b83ba37d16663ecb

Vega-Lite API Template w/ API Fetch

0 stars0🌍 Public
AAndres de la Garza
Last edited Mar 1, 2021
Created on Feb 28, 2021

This example demonstrates a scatterplot of temperature readings for various cities, using the Vega-Lite API to construct the visualization. The chart encodes temperature as the y-axis and city as the x-axis, with a tooltip displaying the state for each point. The code fetches CSV data from a remote URL using `d3.csv`, then builds the visualization with `vega-lite-api`, rendering it as an SVG via the `vega` and `vega-lite` libraries. Styling is customized through a config object, and the chart fills the browser window with an autosize fit.

AI-generated description

A visualization constructed using the vega-lite-api.