spb/satelliteindex
Public
TypeScript 66.5%
Python 30.9%
JavaScript 1.4%
CSS 0.7%
1import { Stat } from '@/components/ui/section';2import { fmtAgo, fmtInt } from '@/lib/format';3import type { StatsSnapshot } from '@/lib/types';4import { GroupTitle, StatGrid } from './shared';56/** Headline tiles of the global statistics dashboard, grouped by theme. All values come straight from the snapshot. */7export function StatsHeadline({ snapshot }: { snapshot: StatsSnapshot }) {8 const g = snapshot.global;9 const l = snapshot.launches;10 return (11 <div className="space-y-10">12 <div>13 <GroupTitle hint={g.latest_epoch ? `Latest element set epoch ${fmtAgo(g.latest_epoch)}` : undefined}>Catalogue</GroupTitle>14 <StatGrid cols={4}>15 <Stat label="Active satellites" value={fmtInt(g.active_satellites)} accent hint="Operational payloads" />16 <Stat label="Objects on orbit" value={fmtInt(g.objects_on_orbit)} hint="All tracked objects" />17 <Stat label="Objects catalogued" value={fmtInt(g.objects_catalogued)} hint="Since 1957, incl. decayed" />18 <Stat label="With element sets" value={fmtInt(g.with_elements)} hint="Objects with current GP data" />19 <Stat label="Payloads on orbit" value={fmtInt(g.payloads_on_orbit)} hint={`${fmtInt(g.payloads_total)} catalogued`} />20 <Stat label="Debris on orbit" value={fmtInt(g.debris_on_orbit)} hint="Catalogued fragments" />21 <Stat label="Rocket bodies" value={fmtInt(g.rocket_bodies_on_orbit)} hint="On orbit" />22 <Stat label="Decayed objects" value={fmtInt(g.decayed_objects)} hint={`${fmtInt(g.decayed_last_30d)} last 30 d · ${fmtInt(g.decayed_last_365d)} last 365 d`} />23 </StatGrid>24 </div>2526 <div>27 <GroupTitle hint="Payloads by launch date">Launch activity</GroupTitle>28 <StatGrid cols={4}>29 <Stat label="Launched 30 d" value={fmtInt(g.payloads_launched_30d)} hint="Payloads" />30 <Stat label="Launched YTD" value={fmtInt(g.payloads_launched_ytd)} hint="Payloads" />31 <Stat label="Launched 365 d" value={fmtInt(g.payloads_launched_365d)} hint="Payloads" />32 <Stat label="Launches 30 d" value={fmtInt(l.last_30d)} hint="Orbital launches" />33 <Stat label="Launches YTD" value={fmtInt(l.ytd)} hint="Orbital launches" />34 <Stat label="Launches 365 d" value={fmtInt(l.last_365d)} hint="Orbital launches" />35 <Stat label="Launches total" value={fmtInt(l.total)} hint="Since 1957" />36 </StatGrid>37 </div>3839 <div>40 <GroupTitle hint="Entities with at least one active payload">Ecosystem</GroupTitle>41 <StatGrid cols={3}>42 <Stat label="Active operators" value={fmtInt(g.active_operators)} />43 <Stat label="Active countries" value={fmtInt(g.active_countries)} />44 <Stat label="Active constellations" value={fmtInt(g.active_constellations)} />45 </StatGrid>46 </div>47 </div>48 );49}50