File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ,
Original file line number Diff line number Diff 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 } ,
Original file line number Diff line number Diff line change 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 ,
Original file line number Diff line number Diff 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 } ,
Original file line number Diff line number Diff line change 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 ,
Original file line number Diff line number Diff 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 } ,
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments