Skip to content

Commit 24206f1

Browse files
committed
Move us-county-population-2020.json and us-unemployment-2026.csv example data files to fix Cloudflare build (function script_too_large)
1 parent 9561020 commit 24206f1

8 files changed

Lines changed: 12 additions & 9 deletions

File tree

packages/layerchart/src/routes/docs/examples/BubbleMap/+page.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414
import Tooltip from '$lib/components/Tooltip.svelte';
1515
import TooltipItem from '$lib/components/TooltipItem.svelte';
1616
17-
import _population from '../_data/geo/us-county-population-2020.json';
18-
1917
export let data;
2018
const states = feature(data.geojson, data.geojson.objects.states);
2119
const counties = feature(data.geojson, data.geojson.objects.counties);
2220
2321
const statesById = index(states.features, (d) => d.id);
2422
25-
const population = _population.map((d) => {
23+
const population = data.population.map((d) => {
2624
return {
2725
fips: d.state + d.county,
2826
state: statesById.get(d.state).properties.name,

packages/layerchart/src/routes/docs/examples/BubbleMap/+page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export async function load({ fetch }) {
88
geojson: await fetch('https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json').then(
99
(r) => r.json()
1010
),
11+
population: await fetch('/data/examples/geo/us-county-population-2020.json').then((r) =>
12+
r.json()
13+
),
1114
meta: {
1215
pageSource,
1316
},

packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
import Tooltip from '$lib/components/Tooltip.svelte';
1414
import TooltipItem from '$lib/components/TooltipItem.svelte';
1515
16-
import _population from '../_data/geo/us-county-population-2020.json';
17-
1816
export let data;
1917
const states = feature(data.geojson, data.geojson.objects.states);
2018
const counties = feature(data.geojson, data.geojson.objects.counties);
2119
2220
const statesById = index(states.features, (d) => d.id);
2321
24-
const population = _population.map((d) => {
22+
const population = data.population.map((d) => {
2523
return {
2624
id: d.state + d.county,
2725
state: statesById.get(d.state).properties.name,

packages/layerchart/src/routes/docs/examples/Choropleth/+page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export async function load({ fetch }) {
77
geojson: await fetch('https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json').then(
88
(r) => r.json()
99
),
10+
population: await fetch('/data/examples/geo/us-county-population-2020.json').then((r) =>
11+
r.json()
12+
),
1013
meta: {
1114
pageSource,
1215
},

packages/layerchart/src/routes/docs/examples/SpikeMap/+page.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
import Tooltip from '$lib/components/Tooltip.svelte';
1414
import TooltipItem from '$lib/components/TooltipItem.svelte';
1515
16-
import _population from '../_data/geo/us-county-population-2020.json';
17-
1816
export let data;
1917
const states = feature(data.geojson, data.geojson.objects.states);
2018
const counties = feature(data.geojson, data.geojson.objects.counties);
2119
2220
const statesById = index(states.features, (d) => d.id);
2321
24-
const population = _population.map((d) => {
22+
const population = data.population.map((d) => {
2523
return {
2624
fips: d.state + d.county,
2725
state: statesById.get(d.state).properties.name,

packages/layerchart/src/routes/docs/examples/SpikeMap/+page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export async function load({ fetch }) {
88
geojson: await fetch('https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json').then(
99
(r) => r.json()
1010
),
11+
population: await fetch('/data/examples/geo/us-county-population-2020.json').then((r) =>
12+
r.json()
13+
),
1114
meta: {
1215
pageSource,
1316
},

packages/layerchart/src/routes/docs/examples/_data/geo/us-county-population-2020.json renamed to packages/layerchart/static/data/examples/geo/us-county-population-2020.json

File renamed without changes.

packages/layerchart/src/routes/docs/examples/_data/geo/us-unemployment-2016.csv renamed to packages/layerchart/static/data/examples/geo/us-unemployment-2016.csv

File renamed without changes.

0 commit comments

Comments
 (0)