mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 14:37:57 +01:00
* feat(graph): dependency rows are graph edges — profiles, /api/graph and Ask read them Each row in config/substrata-dependencies.ts becomes a depends-on or sells-into relation carrying its source and verbatim sentence. Company and bottleneck profiles get a 'What it rests on' section; /api/graph edges carry quote and scope; Ask gains trace_dependencies (upstream/downstream walk, one quoted sentence per hop) and get_company/get_bottleneck list the rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(dependencies): 26 sourced rows for hyperscalers, labs, equipment makers, Marvell and the grid queue Microsoft, Google, AWS, CoreWeave, OpenAI, Anthropic and Marvell rest on foundry/HBM/grid/transformers/turbines/switchgear; KLA, Tokyo Electron, ASM International and Canon sell into foundry, memory and packaging; grid interconnection needs switchgear (LBNL). Each row: fetched URL, verbatim sentence, scope. Gaps rewritten with what was looked for and why it fails. get_bottleneck lists dependencies by name so producers stay in budget. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(listings): pinned home lines where OpenFIGI truncates names — 2330 TT, RIO LN and 7 more A pin is ticker + exchange + the exact OpenFIGI name, read by hand off the mapping API; the generator accepts it only while all three match. The strict matcher is unchanged. Re-ran research:listings for the nine slugs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(series): 3% minimum move before tightens/loosens; merge the duplicate transformer lead-time series Moves under MIN_MOVE_PCT show their sign and read 'flat' (method documented). NIAC's 2021/2024 Wood Mackenzie points join the headline power transformer series. A test makes the next single-point split a reviewed decision. CSV export split into lib/series-csv.ts (300-line cap). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
25 lines
1.6 KiB
TypeScript
25 lines
1.6 KiB
TypeScript
/**
|
|
* The data series' computed numbers, spread into METHODS in lib/methods.ts —
|
|
* kept here so that file stays one screen of shared rules.
|
|
*/
|
|
import type { Method } from './methods';
|
|
import { MIN_MOVE_PCT } from './series';
|
|
|
|
export const SERIES_METHODS = {
|
|
'series-change': {
|
|
title: 'Change vs the prior point',
|
|
formula:
|
|
'The latest value in a series minus the value before it, divided by the earlier value, same series and unit.',
|
|
explanation: `Points are compared as published, never interpolated: when the prior point is a year earlier, so is the comparison, and the badge names the period it compares against. Whether a rise tightens or loosens the bottleneck is set per series (a longer lead time tightens; more capacity loosens). A move smaller than ${MIN_MOVE_PCT * 100}% either way is shown with its sign but called flat, not tightening or loosening: surveys and revisions move by that much without anything changing. A target or forecast is never called either way.`,
|
|
code: ['lib/series.ts'],
|
|
},
|
|
'series-points': {
|
|
title: 'Series and points',
|
|
formula:
|
|
'Count of dated values in a series, or of series matching the filters, across the committed corpus and the official statistics fetched on schedule.',
|
|
explanation:
|
|
'Corpus points live in research/series.json with a source link and a quote each; official points come from the BLS public API into the database. A count covers what is held, not everything published.',
|
|
code: ['lib/series.ts', 'lib/series-store.ts', 'research/series.json'],
|
|
},
|
|
} as const satisfies Record<string, Method>;
|