This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
forked from ONSvisual/census-atlas
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tom Ridd <twridd@gmail.com>
- Loading branch information
1 parent
11d6592
commit 3bf1c4a
Showing
21 changed files
with
472 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
export default { | ||
legacy: { | ||
geography: "TYPE298", | ||
mapstyle: "https://bothness.github.io/ons-basemaps/data/style-omt.json", | ||
tabledata: "https://bothness.github.io/census-atlas/data/indicators.json", | ||
ladtopo: { | ||
url: "https://bothness.github.io/census-atlas/data/lad_boundaries_2020.json", | ||
layer: "LA2020EW", | ||
code: "AREACD", | ||
name: "AREANM", | ||
}, | ||
lsoabldg: { | ||
url: "https://cdn.ons.gov.uk/maptiles/buildings/v1/{z}/{x}/{y}.pbf", | ||
layer: "buildings", | ||
code: "lsoa11cd", | ||
}, | ||
lsoabounds: { | ||
url: "https://cdn.ons.gov.uk/maptiles/administrative/lsoa/v2/boundaries/{z}/{x}/{y}.pbf", | ||
layer: "lsoa", | ||
code: "areacd", | ||
}, | ||
ladvector: { | ||
url: "https://cdn.ons.gov.uk/maptiles/administrative/authorities/v1/boundaries/{z}/{x}/{y}.pbf", | ||
layer: "authority", | ||
code: "areacd", | ||
}, | ||
lsoadata: "https://bothness.github.io/census-atlas/data/lsoa2011_lad2020.csv", | ||
}, | ||
ux: { | ||
legend_sections: 5, | ||
legend_colours: ["#d5f690", "#5bc4b1", "#2e9daa", "#0079a2", "#005583"], | ||
map: { | ||
default_zoom: 14, | ||
max_zoom: 14, | ||
min_zoom: 9, | ||
buildings_breakpoint: 12, | ||
lsoa_breakpoint: 9, | ||
paint: { | ||
data: { | ||
"fill-color": [ | ||
"case", | ||
["!=", ["feature-state", "color"], null], | ||
["feature-state", "color"], | ||
"rgba(255, 255, 255, 0)", | ||
] | ||
}, | ||
line: { | ||
"line-color": ["rgba(192, 192, 192, 1)"], | ||
"line-width": [0.75], | ||
}, | ||
interactive: { | ||
"line-color": [ | ||
"case", | ||
["==", ["feature-state", "selected"], true], | ||
"rgba(0, 0, 0, 1)", | ||
["==", ["feature-state", "hovered"], true], | ||
"rgba(50, 50, 50, 1)", | ||
"rgba(0, 0, 0, 0)", | ||
], | ||
"line-width": [ | ||
"case", | ||
["==", ["feature-state", "selected"], true], | ||
2, | ||
["==", ["feature-state", "hovered"], true], | ||
2, | ||
0, | ||
], | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {writable} from "svelte/store"; | ||
|
||
export let appIsInitialised = writable(false) | ||
|
||
export const setInitialised = () => { | ||
appIsInitialised.set(true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function getLegendSection(value, breakpoints) { | ||
for (let i = 1; i < breakpoints.length; i++) { | ||
if (value <= breakpoints[i]) { | ||
return i | ||
} | ||
} | ||
return breakpoints.length | ||
} |
Oops, something went wrong.