lgtm
This commit is contained in:
parent
f7e0814a38
commit
fd2860070a
55 changed files with 4084 additions and 186 deletions
|
|
@ -227,6 +227,14 @@ export const POI_CLUSTER_MAX_ZOOM = 15;
|
|||
/** Zoom level at which individual POI cards are shown without hovering */
|
||||
export const POI_AUTO_CARD_ZOOM_THRESHOLD = POI_CLUSTER_MAX_ZOOM + 1;
|
||||
|
||||
/** Hard cap on auto POI cards rendered at once. With every category enabled a
|
||||
* dense area can yield hundreds of overlapping cards — an unreadable wall — so we
|
||||
* show a spaced subset and rely on the map markers (+ hover) for the rest. */
|
||||
export const MAX_AUTO_POI_CARDS = 40;
|
||||
/** Minimum screen-space gap (px) between two auto POI cards before one is culled. */
|
||||
export const AUTO_POI_CARD_MIN_DX = 130;
|
||||
export const AUTO_POI_CARD_MIN_DY = 34;
|
||||
|
||||
/**
|
||||
* Groups whose features should be collapsed into stacked bar charts.
|
||||
* Keyed by feature group name. Each entry defines one stacked chart.
|
||||
|
|
@ -290,6 +298,19 @@ export const STACKED_GROUPS: Record<
|
|||
'% Other',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Qualifications',
|
||||
unit: '%',
|
||||
components: [
|
||||
'% No qualifications',
|
||||
'% Some GCSEs',
|
||||
'% Good GCSEs',
|
||||
'% Apprenticeship',
|
||||
'% A-levels',
|
||||
'% Degree or higher',
|
||||
'% Other qualifications',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Political vote share',
|
||||
unit: '%',
|
||||
|
|
@ -302,6 +323,11 @@ export const STACKED_GROUPS: Record<
|
|||
'% Other parties',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Tenure',
|
||||
unit: '%',
|
||||
components: ['% Owner occupied', '% Social rent', '% Private rent'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
@ -470,6 +496,18 @@ export const STACKED_SEGMENT_COLORS: Record<string, string> = {
|
|||
'% Black': '#8b5cf6',
|
||||
'% Mixed': '#14b8a6',
|
||||
'% Other': '#6b7280',
|
||||
// Qualifications: low-attainment (red) → high-attainment (green) ramp.
|
||||
'% No qualifications': '#ef4444',
|
||||
'% Some GCSEs': '#f97316',
|
||||
'% Good GCSEs': '#eab308',
|
||||
'% Apprenticeship': '#14b8a6',
|
||||
'% A-levels': '#3b82f6',
|
||||
'% Degree or higher': '#22c55e',
|
||||
'% Other qualifications': '#6b7280',
|
||||
// Tenure (Census 2021 TS054): owner-occupied (green) → social rent (amber) → private rent (blue).
|
||||
'% Owner occupied': '#22c55e',
|
||||
'% Social rent': '#f59e0b',
|
||||
'% Private rent': '#3b82f6',
|
||||
'Anti-social': '#14b8a6',
|
||||
Vehicle: '#3b82f6',
|
||||
Burglary: '#eab308',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue