Something went wrong. Try again.
Central platform for European atproto.<cc> country community websites
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// What the PLC directory and the repos themselves say about the accounts we identified.//// Produced off-site by scripts/facts-aggregate.py and committed here as counts only:// no DIDs, no handles, same rule as nl-stats.json. The placeholder file ships with// zeroes so the page builds before the first collection run lands; every section that// reads it checks `has*` first and renders nothing until there is something to show.
import raw from './nl-facts.json';
export interface NlFacts { generatedAt: string; accounts: { known: number; dated: number; reposChecked: number }; /** "YYYY-MM" -> accounts created that month. */ creationByMonth: Record<string, number>; pds: { blueskyHosted: number; elsewhere: number; topOtherHosts: { host: string; accounts: number }[]; }; handles: { customDomainNow: number; /** "YYYY-MM" -> accounts that took a handle they control that month. */ firstCustomDomainByMonth: Record<string, number>; }; lexicons: { accountsUsingSomething: number; /** Accounts per app: one account counts once however many of its record types it holds. */ byApp?: { app: string; accounts: number }[]; /** The literal per-record-type counts, kept as the detail behind the app view. */ byNsid: { nsid: string; accounts: number }[]; };}
export const nlFacts: NlFacts = raw as NlFacts;
export const hasCreation = Object.keys(nlFacts.creationByMonth).length > 0;export const hasLexicons = (nlFacts.lexicons.byApp ?? []).length > 0;export const hasPds = nlFacts.pds.blueskyHosted + nlFacts.pds.elsewhere > 0;export const hasAnyFacts = hasCreation || hasLexicons || hasPds;
/** Months from the first recorded to the last, with gaps filled as zero, so a quiet * month renders as a gap in the chart instead of being silently skipped. */export function creationSeries(): { month: string; count: number }[] { const months = Object.keys(nlFacts.creationByMonth).sort(); if (!months.length) return []; const out: { month: string; count: number }[] = []; const [startY, startM] = months[0].split('-').map(Number); const [endY, endM] = months[months.length - 1].split('-').map(Number); for (let y = startY, m = startM; y < endY || (y === endY && m <= endM); ) { const key = `${y}-${String(m).padStart(2, '0')}`; out.push({ month: key, count: nlFacts.creationByMonth[key] ?? 0 }); m += 1; if (m > 12) { m = 1; y += 1; } } return out;}