Unemployment claims by state through 2020
The average state's insured unemployment rate went from 1.1% in January 2020 to 12.0% by July 4. encoding.time plays the weeks on a map joined by encoding.key.
{
"type": "map",
"geo": {
"features": "\u0000demo-fold:0",
"projection": "albersUsa",
"idField": "name"
},
"data": "\u0000demo-fold:1",
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
}
{
"type": "map",
"geo": {
"features": {/* TopoJSON, 181 arcs; Copy includes it */},
"projection": "albersUsa",
"idField": "name"
},
"data": [
{
"state": "Alaska",
"code": "AK",
"week": "2020-01-04",
"rate": 2.64
},
{
"state": "Alaska",
"code": "AK",
"week": "2020-01-18",
"rate": 2.83
},
{
"state": "Alaska",
"code": "AK",
"week": "2020-02-01",
"rate": 2.96
},
{
"state": "Alaska",
"code": "AK",
"week": "2020-02-15",
"rate": 3.02
},
{
"state": "Alaska",
"code": "AK",
"week": "2020-02-29",
"rate": 3
},
{
"state": "Alaska",
"code": "AK",
"week": "2020-03-14",
"rate": 2.97
},
// … 1,320 more rows; Copy includes them
],
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
}import { GeoMap } from "@opendata-ai/openchart-react";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:1";
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": "\u0000demo-fold:0",
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
export function Example() {
return <GeoMap spec={spec} />;
}
import { GeoMap } from "@opendata-ai/openchart-react";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 1,326 rows; Copy includes them */];
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": {/* TopoJSON, 181 arcs; Copy includes it */},
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
export function Example() {
return <GeoMap spec={spec} />;
}
<script setup lang="ts">
import { GeoMap } from "@opendata-ai/openchart-vue";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:1";
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": "\u0000demo-fold:0",
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
</script>
<template>
<GeoMap :spec="spec" />
</template>
<script setup lang="ts">
import { GeoMap } from "@opendata-ai/openchart-vue";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 1,326 rows; Copy includes them */];
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": {/* TopoJSON, 181 arcs; Copy includes it */},
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
</script>
<template>
<GeoMap :spec="spec" />
</template>
<script lang="ts">
import { GeoMap } from "@opendata-ai/openchart-svelte";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:1";
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": "\u0000demo-fold:0",
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
</script>
<GeoMap {spec} />
<script lang="ts">
import { GeoMap } from "@opendata-ai/openchart-svelte";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 1,326 rows; Copy includes them */];
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": {/* TopoJSON, 181 arcs; Copy includes it */},
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
</script>
<GeoMap {spec} />
import { createGeoMap } from "@opendata-ai/openchart-vanilla";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:1";
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": "\u0000demo-fold:0",
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createGeoMap(container, spec);
import { createGeoMap } from "@opendata-ai/openchart-vanilla";
import type { GeoMapSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 1,326 rows; Copy includes them */];
const spec: GeoMapSpec = {
data,
"type": "map",
"geo": {
"features": {/* TopoJSON, 181 arcs; Copy includes it */},
"projection": "albersUsa",
"idField": "name"
},
"encoding": {
"key": {
"field": "state",
"type": "nominal"
},
"color": {
"field": "rate",
"type": "quantitative",
"title": "Insured unemployment rate (%)",
"format": ".1f"
},
"time": {
"field": "week",
"type": "temporal"
}
},
"playback": {
"duration": 20000,
"period": {
"format": "%b %Y"
}
},
"chrome": {
"title": "Insured unemployment rose tenfold by July 2020, then eased",
"subtitle": "Insured unemployment rate by state, 13-week average, every other week through 2020"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createGeoMap(container, spec);