Viewing a saved revision (read-only)
df6911738c0f4d5aaba9c42deee62ba2
Observable Plot Starter
An Observable Plot starter demonstrates how to build an arrow variation chart, tracking changes in population and income inequality across U.S. metropolitan areas from 1980 to 2015. The `@observablehq/plot` library renders logarithmic x-axes, a color legend, and curved arrows whose stroke color encodes inequality shifts. It loads CSV data with `metros.csv`, converts strings to numbers, and dynamically sizes the plot to the container via `container.clientWidth` and `container.clientHeight`. The code includes hot-reloading support by replacing the container's first child on each run.
AI-generated descriptionUnlocking Observable Plot with VizHub's hot reloading patterns.
This example was ported from Observable:Arrow variation chart.
Thanks to Stefan Apostol for the original HTML implementation and inspiration!