Skip to main content
Public

Share visualization

Loading preview…

Vega-Lite US Map for Unemployment Rate

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Vega-Lite US Map for Unemployment Rate

1
Yyuzhang21
Last edited Sep 27, 2019
Created on Sep 18, 2019

This choropleth map visualizes U.S. state-level unemployment rates using a sequential color scale. Built with Vega-Lite, it loads TopoJSON state boundaries and joins them to a TSV file of rates by state ID. The map applies an Albers USA projection. The code uses `vega-embed` to render the specification, with `getData.js` importing CSV data via D3. A hover effect is implemented with CSS, and the original configuration was adapted from a Vega-Lite example that used county-level data.

AI-generated description

This example of Choropleth of Unemployment Rate comes form Vega-Lite's site. Originally, tt reads a unemployment rate from a tsv data file, which can be found from vega demo data for unemployment rate by state in US in vega docs data on github. But the original example is using counties instead of state. The unemployment tsv file I used actually comes from a different source from here: US States Choropleth.

Comments

Sign in to join the discussion.

MIT Licensed