Global map of data center infrastructure
{
setSelected(null);
setSelectedCloud(c);
setInspectorTab("details");
setInspector(true);
}}
flyTo={fly}
paddingBottom={isDesktop ? 0 : 260}
/>
{/* ---------------------------------------------------------------- desktop left rail: modes · density · time machine */}
{isDesktop && (
{isWide ? (
<>
setExtras({ layer: l })} className="px-1.5 pb-1.5" />
setExtras({ density: d })} className="border-t border-hair px-1.5 pb-1.5" />
setExtras({ year: y })} coverage={yearCoverage} className="mt-auto border-t border-hair pb-2" />
>
) : (
{MAP_LAYERS.map((l) => (
setExtras({ layer: l })} className={cn("figure inline-flex h-9 w-full items-center justify-center rounded-sm text-[10.5px] font-medium uppercase", l === extras.layer ? "bg-ink text-paper" : "text-ink-2 hover:bg-surface-2")}>
{MAP_LAYER_LABEL[l].slice(0, 3)}
))}
setExtras({ density: extras.density ? null : "facilities" })} className={cn("mt-1 inline-flex h-9 w-full items-center justify-center rounded-sm border-t border-hair text-[10.5px] font-medium uppercase", extras.density ? "bg-surface-3 text-ink" : "text-ink-2 hover:bg-surface-2")}>
Dens
)}
)}
{/* ---------------------------------------------------------------- desktop right inspector: filters · details */}
{isDesktop && (
{(["filters", "details"] as const).map((t) => (
setInspectorTab(t)} className={cn("inline-flex h-8 items-center gap-1.5 rounded-sm px-2.5 text-[12.5px] font-medium", inspectorTab === t ? "bg-surface-3 text-ink" : "text-ink-3 hover:text-ink")}>
{t === "filters" ? "Filters" : "Details"}
{t === "filters" && active > 0 && {active} }
))}
{statusLine}
setInspector(false)}>
{inspectorTab === "filters" ? (
<>
{active > 0 && (
writeUrl({}, { layer: extras.layer, density: extras.density, year: null })}>
Reset filters
)}
{facilityFields((n) => writeUrl(n, extras), filters)}
writeUrl(filters, x)} layer={extras.layer} />
>
) : selected ? (
setSelected(null)} />
) : selectedCloud ? (
) : (
Select a facility, project, IXP or cloud region on the map to inspect it here.
{LAYER_HINT[extras.layer]}.
)}
Open as list
setLegend((l) => !l)} aria-expanded={legend} className="inline-flex items-center gap-1 hover:text-ink">
Legend
{legend && {legendPanel}
}
)}
{isDesktop && !inspector && (
setInspector(true)} className="h-10 bg-surface/95 backdrop-blur" aria-expanded={inspector} aria-controls="map-inspector">
Inspector{active > 0 && {active} }
)}
{/* ---------------------------------------------------------------- top bar: search + chips (+ mobile modes) */}
{
setQ(v);
setHitsOpen(true);
}}
onFocus={() => setHitsOpen(true)}
onBlur={() => setTimeout(() => setHitsOpen(false), 120)}
onKeyDown={(e) => {
if (e.key === "Enter" && hits[0]) pickHit(hits[0]);
if (e.key === "Escape") setHitsOpen(false);
}}
placeholder="Search a place, operator or facility…"
aria-label="Search the map"
wrapperClassName="bg-surface/95 backdrop-blur"
trailing={
!isDesktop && (
setPanel(true)} aria-label={`Filters${active ? ` (${active} active)` : ""}`} className={cn("inline-flex h-10 min-w-10 items-center justify-center gap-1 rounded-xs px-2 text-[12px]", active ? "bg-ink text-paper" : "text-ink-2")}>
{active > 0 && {active} }
)
}
/>
{hitsOpen && dq.length >= 2 && hits.length > 0 && (
{hits.map((h) => (
e.preventDefault()} onClick={() => pickHit(h)} className="flex min-h-11 w-full items-center gap-3 px-3 py-1.5 text-left hover:bg-surface-2">
{h.type.replace("_", " ")}
{h.title}
{h.subtitle && {h.subtitle} }
))}
)}
{!isDesktop &&
setExtras({ layer: l })} orientation="horizontal" className="-mx-3 px-3" />}
{data && total === 0 && !error && (
{extras.layer === "projects" || extras.layer === "pipeline" ? (
<>
No project with published coordinates in this view — most projects carry a city-level location only.{" "}
Browse the project list
.
>
) : extras.year !== null ? (
<>No facility with a known opening date on or before {extras.year} in this view — opening dates are published for a small share of facilities.>
) : (
<>Nothing published for the {MAP_LAYER_LABEL[extras.layer].toLowerCase()} layer in this view{active ? " with these filters" : ""}.>
)}
)}
{(chips.length > 0 || showCloud) && (
writeUrl({}, { layer: extras.layer, density: null, year: null })} className="[&>*]:bg-surface/95 [&>*]:backdrop-blur">
{showCloud && (
writeUrl(filters, extras, { cr: undefined })} className="inline-flex h-10 shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-accent/40 bg-surface px-2 text-[12px] text-ink sm:h-7">
Cloud regions ×
)}
)}
{/* ---------------------------------------------------------------- bottom-left: count + legend (+ mobile time machine) */}
{legend && !isDesktop &&
{legendPanel}
}
{!isDesktop && extras.year !== null && (
setExtras({ year: y })} coverage={yearCoverage} compact />
)}
{!isDesktop && (
setLegend((l) => !l)} aria-expanded={legend} className="inline-flex h-10 items-center gap-1.5 rounded-sm border border-hair bg-surface/95 px-2.5 text-[12px] text-ink-2 backdrop-blur hover:text-ink">
Legend
)}
{statusLine}
{extras.year !== null && isDesktop && Known open by {extras.year} {yearCoverage !== null && · dates known for {fmtPct(yearCoverage, yearCoverage < 0.1 ? 1 : 0)} } }
{/* ---------------------------------------------------------------- mobile filter sheet: filters + density + time machine */}
{!isDesktop && (
setPanel(false)}
title="Filter the map"
description={total !== null ? statusLine : undefined}
heightVh={84}
id="map-filters"
footer={
{
setDraft({});
setDraftX({ layer: draftX.layer, density: null, year: null });
}}
>
Reset
{
writeUrl(draft, draftX);
setPanel(false);
}}
>
Show results
}
>
setDraftX({ ...draftX, year: y })} coverage={yearCoverage} />
Density
{DENSITY_VIEWS.map((d) => (
setDraftX({ ...draftX, density: draftX.density === d ? null : d })}>
{DENSITY_LABEL[d]}
))}
{facilityFields(setDraft, draft)}
)}
{/* ---------------------------------------------------------------- mobile detail sheets (swipeable) */}
{!isDesktop && (
<>
setSelected(null)} modal={false} heightVh={48} width={380} title={selected?.n} description={selected ? [selected.o, selected.c ? countryName(selected.c) : null].filter(Boolean).join(" · ") : undefined}>
{selected && }
setSelectedCloud(null)} modal={false} heightVh={40} width={380} title={selectedCloud ? `${selectedCloud.provider.name} · ${selectedCloud.code}` : undefined} description={selectedCloud?.name}>
{selectedCloud && }
>
)}
);
}
/* ------------------------------------------------------------------ profiles */
function kindLabel(k: MapPoint["k"]): string {
switch (k) {
case "project":
return "Project";
case "ixp":
return "Internet exchange";
case "cloud_region":
return "Cloud region";
case "landing_station":
return "Cable landing station";
case "substation":
return "Substation";
case "power_plant":
return "Power plant";
default:
return "Data center";
}
}
function hrefFor(p: MapPoint): string {
switch (p.k) {
case "project":
return routes.project(p.slug);
case "ixp":
return routes.ixp(p.slug);
case "cloud_region":
return routes.cloudRegion(p.slug);
default:
return routes.facility(p.slug);
}
}
function QuickProfile({ p, onClose }: { p: MapPoint; onClose?: () => void }) {
const imprecise = p.p === "city" || p.p === "metro" || p.p === "approximate" || p.p === "unknown";
return (
{onClose && (
{kindLabel(p.k)}
{p.n}
{(p.o || p.c) &&
{[p.o, p.c ? countryName(p.c) : null].filter(Boolean).join(" · ")}
}
Clear
)}
{p.k !== "project" && p.k !== "ixp" &&
}
{p.ai ?
: null}
{p.rs === "campus" && (
Campus
)}
{p.k === "project" ? "Planned" : "Capacity"}
{p.mw === null || p.mw === undefined ? — : `${p.k === "project" ? "≈ " : ""}${fmtMw(p.mw)}`}
{(p.mw === null || p.mw === undefined) && not published }
Status
{STATUS_SHORT[p.s]}
{p.y ? "Opened" : "Country"}
{p.y ? {p.y} : }
{PRECISION_LABEL[p.p]}
{imprecise ? " — the ring marks the area, not a site" : ` · ${p.lat.toFixed(4)}, ${p.lng.toFixed(4)}`}
Open {p.k === "project" ? "project" : p.k === "ixp" ? "exchange" : "profile"}
{p.o && (
{p.o}
)}
Confidence and per-field evidence: on the full profile (every figure opens its sources).
);
}
function CloudProfile({ c }: { c: CloudRegionSummary }) {
return (
Cloud region
{c.provider.name} · {c.code}
{c.name}
{c.status}
{c.isSovereign && (
Sovereign
)}
Location
{c.city ?? countryName(c.countryIso2)}
Availability zones
{c.availabilityZones ?? "—"}
Providers publish the metro, not the building — the point marks the market.
Open region
);
}