Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

API in Different Cities

Public visualization

Viewing a saved revision (read-only)

58c63a2a62a14d88b7b31320dfb5f59d

API in Different Cities

1 star0🌍 Public
LLichenYang
Last edited Dec 14, 2019
Created on Dec 9, 2019

This example shows hourly Air Quality Index (AQI) readings across multiple Chinese cities, with each city’s time series plotted as an area chart and stacked vertically for comparison. The visualization uses a Vega-Lite specification embedded via `vegaEmbed`, which declares temporal x-axes, quantitative y-axes, and row facets for city names. Data is loaded from a CSV file using `d3.csv`, and the chart re-renders on window resize by re-calling `vegaEmbed` with updated dimensions. The code references D3 v4 for data loading and Vega-Lite v2 for the visual encoding.

AI-generated description