@gloom-sh/terminal 0.20.16 → 0.20.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api-client/data.ts +13 -3
- package/src/api-client/types/econ.ts +3 -0
- package/src/cli/commands/fred-series.ts +3 -1
- package/src/cli/commands/overview.ts +65 -13
- package/src/cli/csv-export.ts +73 -0
- package/src/cli/desktop-pane-shot.ts +3 -2
- package/src/cli/help.ts +4 -2
- package/src/cli/pane-functions/headless.ts +7 -2
- package/src/cli/pane-functions/index.ts +2 -2
- package/src/cli/pane-functions/screenshot-bridge.ts +4 -2
- package/src/cli/report-tables.ts +17 -3
- package/src/cli/result.ts +3 -6
- package/src/components/chart/composite/legend.tsx +37 -7
- package/src/components/ui/data-table/display-columns.ts +4 -1
- package/src/components/ui/data-table/hooks.ts +2 -3
- package/src/components/ui/data-table/index.tsx +4 -1
- package/src/components/ui/data-table/types.ts +11 -4
- package/src/components/ui/data-table/visible-range.ts +11 -1
- package/src/plugins/builtin/awards/pane.tsx +6 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +4 -1
- package/src/plugins/builtin/credit-conditions/series.ts +2 -2
- package/src/plugins/builtin/earnings/board-model.ts +12 -0
- package/src/plugins/builtin/earnings/board-table.ts +7 -4
- package/src/plugins/builtin/earnings/board.tsx +2 -2
- package/src/plugins/builtin/earnings/highlight.ts +1 -1
- package/src/plugins/builtin/econ/calendar-model.ts +2 -0
- package/src/plugins/builtin/econ/fred-catalog.ts +1 -256
- package/src/plugins/builtin/econ-statistics/cache.ts +1 -1
- package/src/plugins/builtin/econ-statistics/client.ts +11 -10
- package/src/plugins/builtin/econ-statistics/detail.tsx +1 -0
- package/src/plugins/builtin/econ-statistics/headless.ts +42 -6
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -0
- package/src/plugins/builtin/econ-statistics/pane.tsx +7 -2
- package/src/plugins/builtin/econ-statistics/stats.ts +2 -1
- package/src/plugins/builtin/econ-statistics/view.ts +9 -3
- package/src/plugins/builtin/shared/fred-catalog.ts +256 -0
- package/src/plugins/builtin/shared/series-cache.ts +3 -0
- package/src/plugins/builtin/shared/series-detail-chart.tsx +3 -0
- package/src/plugins/builtin/short-interest/watch-pane.tsx +7 -7
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +16 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +8 -4
- package/src/plugins/builtin/time-sales/headless.ts +4 -1
- package/src/plugins/builtin/time-sales/pane.tsx +2 -0
- package/src/plugins/builtin/time-sales/window.ts +12 -0
- package/src/plugins/builtin/treasury-auctions/client.ts +4 -0
- package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -0
- package/src/plugins/builtin/treasury-daily/client.ts +23 -11
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -0
- package/src/sources/gloomberb-cloud/fred-publisher.ts +25 -0
- package/src/sources/gloomberb-cloud/fred-series.ts +1 -1
- package/src/time-series/base-series.ts +3 -0
- package/src/time-series/ice-credit.ts +1 -0
- package/src/time-series/types.ts +1 -0
- package/src/types/headless.ts +4 -2
- package/src/utils/throttled-fetch.ts +15 -1
|
@@ -1,256 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { SeriesDefinition, SeriesFrequency } from "../../../series/types";
|
|
3
|
-
|
|
4
|
-
type FredRow = readonly [seriesId: string, name: string, unit: string, frequency: SeriesFrequency, tags?: readonly string[]];
|
|
5
|
-
|
|
6
|
-
/** What people call a Treasury bill: a t-bill, a tbill, cash parked in a money market. */
|
|
7
|
-
const BILL_TAGS = ["bill", "T-bill", "T-bills", "tbill", "tbills", "money markets", "money market"] as const;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The FRED series Gloom Cloud serves, by group, except the Treasury constant
|
|
11
|
-
* maturities (UST:2Y and so on, from the yield curve) and the credit spreads
|
|
12
|
-
* and yields (from the credit plugin). Ids follow the server's allowlist: a
|
|
13
|
-
* series added there is listed here to reach the catalog.
|
|
14
|
-
* Türkiye's CPI, Brazil's IPCA, MAS's SORA and NAHB's housing market index
|
|
15
|
-
* are served the same way but are not on FRED; their rows name TurkStat,
|
|
16
|
-
* IBGE, MAS and NAHB (`seriesNotOnFred`).
|
|
17
|
-
*/
|
|
18
|
-
const GROUPS: ReadonlyArray<{ group: string; rows: readonly FredRow[] }> = [
|
|
19
|
-
{
|
|
20
|
-
group: "Rates",
|
|
21
|
-
rows: [
|
|
22
|
-
["FEDFUNDS", "Fed funds effective rate (monthly)", "%", "monthly", ["fed funds"]],
|
|
23
|
-
["DFF", "Fed funds effective rate", "%", "daily", ["fed funds"]],
|
|
24
|
-
["EFFR", "Effective federal funds rate", "%", "daily", ["EFFR", "money markets"]],
|
|
25
|
-
["IORB", "Interest on reserve balances", "%", "daily", ["IORB", "money markets"]],
|
|
26
|
-
["DFEDTARU", "Fed funds target range, upper limit", "%", "daily", ["fed funds", "policy rate"]],
|
|
27
|
-
["DFEDTARL", "Fed funds target range, lower limit", "%", "daily", ["fed funds", "policy rate"]],
|
|
28
|
-
["ECBDFR", "ECB deposit facility rate", "%", "daily", ["ECB", "euro area", "policy rate"]],
|
|
29
|
-
["DPRIME", "Bank prime loan rate", "%", "daily"],
|
|
30
|
-
["DFII5", "5Y TIPS real yield", "%", "daily", ["treasury", "real yield"]],
|
|
31
|
-
["DFII10", "10Y TIPS real yield", "%", "daily", ["treasury", "real yield"]],
|
|
32
|
-
["T10Y2Y", "10Y minus 2Y Treasury spread", "%", "daily", ["treasury", "curve", "2s10s"]],
|
|
33
|
-
["T10Y3M", "10Y minus 3M Treasury spread", "%", "daily", ["treasury", "curve"]],
|
|
34
|
-
// The Federal Reserve Board's Kim-Wright estimates, a week or so behind.
|
|
35
|
-
...Array.from({ length: 10 }, (_, index): FredRow =>
|
|
36
|
-
[`THREEFYTP${index + 1}`, `${index + 1}Y Treasury term premium (Kim-Wright)`, "%", "daily", ["treasury", "term premium", "Kim-Wright"]]),
|
|
37
|
-
["SOFR", "SOFR", "%", "daily", ["secured overnight financing rate", "money markets"]],
|
|
38
|
-
["SORA", "SORA (Singapore overnight rate average)", "%", "daily", ["SGD", "Singapore", "MAS", "overnight", "money markets"]],
|
|
39
|
-
["OBFR", "Overnight bank funding rate", "%", "daily", ["OBFR", "money markets"]],
|
|
40
|
-
["DTB4WK", "4-week Treasury bill rate", "%", "daily", BILL_TAGS],
|
|
41
|
-
["DTB3", "3-month Treasury bill rate", "%", "daily", BILL_TAGS],
|
|
42
|
-
["DTB6", "6-month Treasury bill rate", "%", "daily", BILL_TAGS],
|
|
43
|
-
["DTB1YR", "1-year Treasury bill rate", "%", "daily", BILL_TAGS],
|
|
44
|
-
["DCPF3M", "3-month AA financial commercial paper rate", "%", "daily", ["commercial paper", "money markets"]],
|
|
45
|
-
["DCPN3M", "3-month AA nonfinancial commercial paper rate", "%", "daily", ["commercial paper", "money markets"]],
|
|
46
|
-
["RRPONTSYD", "Overnight reverse repo at the Fed", "billion USD", "daily", ["RRP", "liquidity", "money markets"]],
|
|
47
|
-
["WDTGAL", "Treasury General Account", "million USD", "weekly", ["TGA", "liquidity", "money markets"]],
|
|
48
|
-
["WRESBAL", "Bank reserves at the Fed", "million USD", "weekly", ["reserves", "liquidity", "money markets"]],
|
|
49
|
-
["WALCL", "Fed total assets", "million USD", "weekly", ["balance sheet", "liquidity"]],
|
|
50
|
-
["M2SL", "M2 money stock", "billion USD", "monthly", ["money supply", "liquidity"]],
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
group: "Volatility",
|
|
55
|
-
rows: [
|
|
56
|
-
["VIXCLS", "VIX", "index", "daily", ["volatility index", "30 day"]],
|
|
57
|
-
["VXVCLS", "VIX 3M", "index", "daily", ["volatility index", "3 month"]],
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
group: "Economy",
|
|
62
|
-
rows: [
|
|
63
|
-
["GDP", "Gross domestic product", "billion USD", "quarterly", ["GDP", "growth"]],
|
|
64
|
-
["GDPC1", "Real gross domestic product", "billion USD", "quarterly", ["GDP", "growth"]],
|
|
65
|
-
["UNRATE", "Unemployment rate", "%", "monthly", ["labor", "jobs"]],
|
|
66
|
-
["ICSA", "Initial jobless claims", "count", "weekly", ["labor", "claims"]],
|
|
67
|
-
["PAYEMS", "Nonfarm payrolls", "thousand people", "monthly", ["labor", "jobs", "employment"]],
|
|
68
|
-
["NPPTTL", "Private payroll employment (discontinued)", "thousand people", "monthly", ["labor", "jobs"]],
|
|
69
|
-
["JTSJOL", "Job openings", "thousand jobs", "monthly", ["labor", "JOLTS"]],
|
|
70
|
-
["OPHNFB", "Nonfarm labor productivity", "index", "quarterly", ["labor", "productivity"]],
|
|
71
|
-
["ULCNFB", "Unit labor costs", "index", "quarterly", ["labor", "wages"]],
|
|
72
|
-
["RSAFS", "Retail sales", "million USD", "monthly", ["consumer", "spending"]],
|
|
73
|
-
["RSFSXMV", "Retail sales excluding autos", "million USD", "monthly", ["consumer", "spending"]],
|
|
74
|
-
["UMCSENT", "University of Michigan consumer sentiment", "index", "monthly", ["consumer", "sentiment"]],
|
|
75
|
-
["CSCICP03USM665S", "Consumer confidence (OECD)", "index", "monthly", ["consumer", "sentiment"]],
|
|
76
|
-
["HOUST", "Housing starts", "thousand units", "monthly", ["housing", "homebuilders"]],
|
|
77
|
-
["PERMIT", "Building permits", "thousand units", "monthly", ["housing", "homebuilders"]],
|
|
78
|
-
["EXHOSLUSM495S", "Existing home sales", "units", "monthly", ["housing", "homebuilders"]],
|
|
79
|
-
["HSN1F", "New home sales", "thousand units", "monthly", ["housing", "homebuilders"]],
|
|
80
|
-
["MORTGAGE30US", "30-year fixed mortgage rate (Freddie Mac PMMS)", "%", "weekly", ["housing", "mortgage rate", "PMMS", "Freddie Mac", "homebuilders"]],
|
|
81
|
-
["MORTGAGE15US", "15-year fixed mortgage rate (Freddie Mac PMMS)", "%", "weekly", ["housing", "mortgage rate", "PMMS", "Freddie Mac", "homebuilders"]],
|
|
82
|
-
// Computed by Gloom Cloud: MORTGAGE30US less DGS10 on each PMMS date.
|
|
83
|
-
["MORTGAGE30US10Y", "30-year mortgage rate minus 10Y Treasury, on the PMMS date", "%", "weekly", ["housing", "mortgage spread", "PMMS", "treasury", "homebuilders"]],
|
|
84
|
-
["NAHBHMI", "NAHB housing market index (builder sentiment)", "index", "monthly", ["housing", "NAHB", "HMI", "homebuilders", "sentiment"]],
|
|
85
|
-
["DGORDER", "Durable goods orders", "million USD", "monthly", ["manufacturing", "orders"]],
|
|
86
|
-
["ADXTNO", "Durable goods orders excluding transportation", "million USD", "monthly", ["manufacturing", "orders"]],
|
|
87
|
-
["AMTMNO", "Manufacturing new orders", "million USD", "monthly", ["manufacturing", "factory orders"]],
|
|
88
|
-
["BOPGSTB", "Trade balance", "million USD", "monthly", ["trade"]],
|
|
89
|
-
["INDPRO", "Industrial production", "index", "monthly", ["manufacturing", "output"]],
|
|
90
|
-
["TCU", "Capacity utilization", "%", "monthly", ["manufacturing"]],
|
|
91
|
-
["PI", "Personal income", "billion USD", "monthly", ["consumer", "income"]],
|
|
92
|
-
["PCE", "Personal consumption expenditures", "billion USD", "monthly", ["consumer", "spending"]],
|
|
93
|
-
["NETFI", "Current account balance", "billion USD", "quarterly", ["trade", "external"]],
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
group: "Defense & fiscal",
|
|
98
|
-
rows: [
|
|
99
|
-
["FDEFX", "National defense spending (annual rate)", "billion USD", "quarterly", ["defense", "military", "DoD", "budget", "government spending", "GDP"]],
|
|
100
|
-
["ADEFNO", "New orders for defense capital goods", "million USD", "monthly", ["defense", "military", "DoD", "orders", "manufacturing"]],
|
|
101
|
-
["MTSO133FMS", "Federal outlays (Monthly Treasury Statement)", "million USD", "monthly", ["budget", "government spending", "fiscal", "deficit", "Treasury"]],
|
|
102
|
-
],
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
group: "Inflation",
|
|
106
|
-
rows: [
|
|
107
|
-
["CPIAUCSL", "CPI, all items", "index", "monthly", ["CPI", "headline", "seasonally adjusted"]],
|
|
108
|
-
["CPIAUCNS", "CPI, all items (not seasonally adjusted)", "index", "monthly", ["CPI", "headline"]],
|
|
109
|
-
["CPILFESL", "Core CPI", "index", "monthly", ["CPI", "core", "ex food and energy"]],
|
|
110
|
-
["CPILFENS", "Core CPI (not seasonally adjusted)", "index", "monthly", ["CPI", "core"]],
|
|
111
|
-
["CPIUFDSL", "CPI: Food", "index", "monthly", ["CPI", "component"]],
|
|
112
|
-
["CUSR0000SAF11", "CPI: Food at home", "index", "monthly", ["CPI", "component", "groceries"]],
|
|
113
|
-
["CUSR0000SEFV", "CPI: Food away from home", "index", "monthly", ["CPI", "component", "restaurants"]],
|
|
114
|
-
["CPIENGSL", "CPI: Energy", "index", "monthly", ["CPI", "component"]],
|
|
115
|
-
["CUSR0000SETB01", "CPI: Gasoline", "index", "monthly", ["CPI", "component", "energy"]],
|
|
116
|
-
["CUSR0000SEHF01", "CPI: Electricity", "index", "monthly", ["CPI", "component", "energy"]],
|
|
117
|
-
["CUSR0000SEHF02", "CPI: Utility gas service", "index", "monthly", ["CPI", "component", "energy"]],
|
|
118
|
-
["CUSR0000SACL1E", "CPI: Core goods", "index", "monthly", ["CPI", "component", "goods"]],
|
|
119
|
-
["CUSR0000SETA01", "CPI: New vehicles", "index", "monthly", ["CPI", "component", "goods", "cars"]],
|
|
120
|
-
["CUSR0000SETA02", "CPI: Used cars and trucks", "index", "monthly", ["CPI", "component", "goods", "cars"]],
|
|
121
|
-
["CPIAPPSL", "CPI: Apparel", "index", "monthly", ["CPI", "component", "goods"]],
|
|
122
|
-
["CUSR0000SAM1", "CPI: Medical care goods", "index", "monthly", ["CPI", "component", "goods", "health"]],
|
|
123
|
-
["CUSR0000SASLE", "CPI: Core services", "index", "monthly", ["CPI", "component", "services"]],
|
|
124
|
-
["CUSR0000SAH1", "CPI: Shelter", "index", "monthly", ["CPI", "component", "services", "housing"]],
|
|
125
|
-
["CUSR0000SEHA", "CPI: Rent", "index", "monthly", ["CPI", "component", "services", "housing"]],
|
|
126
|
-
["CUSR0000SEHC", "CPI: Owners' equivalent rent", "index", "monthly", ["CPI", "component", "services", "housing", "OER"]],
|
|
127
|
-
["CUSR0000SEHB", "CPI: Lodging away from home", "index", "monthly", ["CPI", "component", "services", "hotels"]],
|
|
128
|
-
["CUSR0000SAM2", "CPI: Medical care services", "index", "monthly", ["CPI", "component", "services", "health"]],
|
|
129
|
-
["CUSR0000SAS4", "CPI: Transportation services", "index", "monthly", ["CPI", "component", "services"]],
|
|
130
|
-
["CUSR0000SETG01", "CPI: Airline fares", "index", "monthly", ["CPI", "component", "services", "travel"]],
|
|
131
|
-
["PCEPI", "PCE price index", "index", "monthly", ["PCE", "headline"]],
|
|
132
|
-
["PCEPILFE", "Core PCE price index", "index", "monthly", ["PCE", "core"]],
|
|
133
|
-
["PPIACO", "Producer prices, all commodities", "index", "monthly", ["PPI"]],
|
|
134
|
-
["PPIFIS", "Producer prices, final demand", "index", "monthly", ["PPI"]],
|
|
135
|
-
["PPIFID", "Producer prices, final demand (not seasonally adjusted)", "index", "monthly", ["PPI"]],
|
|
136
|
-
["IR", "Import prices", "index", "monthly", ["trade"]],
|
|
137
|
-
["IQ", "Export prices", "index", "monthly", ["trade"]],
|
|
138
|
-
["T5YIE", "5Y breakeven inflation", "%", "daily", ["breakeven", "expectations", "TIPS"]],
|
|
139
|
-
["T10YIE", "10Y breakeven inflation", "%", "daily", ["breakeven", "expectations", "TIPS"]],
|
|
140
|
-
["T5YIFR", "5Y, 5Y forward inflation expectation", "%", "daily", ["breakeven", "expectations", "5y5y"]],
|
|
141
|
-
["TURCPIYOY", "Türkiye CPI, y/y", "%", "monthly", ["CPI", "headline", "Turkey", "TR", "inflation", "lira"]],
|
|
142
|
-
["TURCPIMOM", "Türkiye CPI, m/m", "%", "monthly", ["CPI", "headline", "Turkey", "TR", "inflation", "lira"]],
|
|
143
|
-
["BRAIPCAMOM", "Brazil IPCA, m/m", "%", "monthly", ["IPCA", "CPI", "headline", "Brazil", "BR", "Brazil inflation", "inflation", "real"]],
|
|
144
|
-
["BRAIPCA15MOM", "Brazil IPCA-15 mid-month, m/m", "%", "monthly",
|
|
145
|
-
["IPCA-15", "IPCA", "CPI", "mid-month", "Brazil", "BR", "Brazil inflation", "inflation", "real"]],
|
|
146
|
-
],
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
group: "FX",
|
|
150
|
-
rows: [
|
|
151
|
-
["DEXUSEU", "Euro (USD per EUR)", "USD", "daily", ["EURUSD", "EUR", "euro"]],
|
|
152
|
-
["DEXUSUK", "British pound (USD per GBP)", "USD", "daily", ["GBPUSD", "GBP", "sterling", "pound"]],
|
|
153
|
-
["DEXUSAL", "Australian dollar (USD per AUD)", "USD", "daily", ["AUDUSD", "AUD"]],
|
|
154
|
-
["DEXUSNZ", "New Zealand dollar (USD per NZD)", "USD", "daily", ["NZDUSD", "NZD"]],
|
|
155
|
-
["DEXJPUS", "Japanese yen (JPY per USD)", "JPY", "daily", ["USDJPY", "JPY", "yen"]],
|
|
156
|
-
["DEXCHUS", "Chinese yuan (CNY per USD)", "CNY", "daily", ["USDCNY", "CNY", "renminbi", "yuan"]],
|
|
157
|
-
["DEXINUS", "Indian rupee (INR per USD)", "INR", "daily", ["USDINR", "INR"]],
|
|
158
|
-
["DEXBZUS", "Brazilian real (BRL per USD)", "BRL", "daily", ["USDBRL", "BRL"]],
|
|
159
|
-
["DEXMXUS", "Mexican peso (MXN per USD)", "MXN", "daily", ["USDMXN", "MXN"]],
|
|
160
|
-
["DEXKOUS", "South Korean won (KRW per USD)", "KRW", "daily", ["USDKRW", "KRW"]],
|
|
161
|
-
["DEXCAUS", "Canadian dollar (CAD per USD)", "CAD", "daily", ["USDCAD", "CAD"]],
|
|
162
|
-
["DEXSZUS", "Swiss franc (CHF per USD)", "CHF", "daily", ["USDCHF", "CHF", "franc", "swiss franc"]],
|
|
163
|
-
["DEXTAUS", "Taiwan dollar (TWD per USD)", "TWD", "daily", ["USDTWD", "TWD"]],
|
|
164
|
-
["DEXHKUS", "Hong Kong dollar (HKD per USD)", "HKD", "daily", ["USDHKD", "HKD"]],
|
|
165
|
-
["DEXSIUS", "Singapore dollar (SGD per USD)", "SGD", "daily", ["USDSGD", "SGD"]],
|
|
166
|
-
["DEXTHUS", "Thai baht (THB per USD)", "THB", "daily", ["USDTHB", "THB"]],
|
|
167
|
-
["DEXMAUS", "Malaysian ringgit (MYR per USD)", "MYR", "daily", ["USDMYR", "MYR"]],
|
|
168
|
-
["DEXNOUS", "Norwegian krone (NOK per USD)", "NOK", "daily", ["USDNOK", "NOK"]],
|
|
169
|
-
["DEXSDUS", "Swedish krona (SEK per USD)", "SEK", "daily", ["USDSEK", "SEK"]],
|
|
170
|
-
["DEXDNUS", "Danish krone (DKK per USD)", "DKK", "daily", ["USDDKK", "DKK"]],
|
|
171
|
-
["DEXSLUS", "Sri Lankan rupee (LKR per USD)", "LKR", "daily", ["USDLKR", "LKR"]],
|
|
172
|
-
["DEXSFUS", "South African rand (ZAR per USD)", "ZAR", "daily", ["USDZAR", "ZAR"]],
|
|
173
|
-
["DEXVZUS", "Venezuelan bolivar (VES per USD)", "VES", "daily", ["USDVES", "VES"]],
|
|
174
|
-
["DTWEXBGS", "Broad dollar index", "index", "daily", ["dollar", "trade weighted"]],
|
|
175
|
-
["DTWEXAFEGS", "Dollar index against advanced economies", "index", "daily", ["dollar", "trade weighted"]],
|
|
176
|
-
["DTWEXEMEGS", "Dollar index against emerging markets", "index", "daily", ["dollar", "trade weighted"]],
|
|
177
|
-
["RTWEXBGS", "Real broad dollar index", "index", "monthly", ["dollar", "trade weighted", "real"]],
|
|
178
|
-
["RTWEXAFEGS", "Real dollar index against advanced economies", "index", "monthly", ["dollar", "trade weighted", "real"]],
|
|
179
|
-
["RTWEXEMEGS", "Real dollar index against emerging markets", "index", "monthly", ["dollar", "trade weighted", "real"]],
|
|
180
|
-
],
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
group: "Energy",
|
|
184
|
-
rows: [
|
|
185
|
-
["DCOILWTICO", "WTI crude oil spot", "USD/barrel", "daily", ["oil", "crude"]],
|
|
186
|
-
["WCOILWTICO", "WTI crude oil spot (weekly)", "USD/barrel", "weekly", ["oil", "crude"]],
|
|
187
|
-
["DCOILBRENTEU", "Brent crude oil spot", "USD/barrel", "daily", ["oil", "crude"]],
|
|
188
|
-
["DHHNGSP", "Henry Hub natural gas spot", "USD/MMBtu", "daily", ["natural gas"]],
|
|
189
|
-
["NATURALGAS", "Natural gas consumption", "billion cubic feet", "monthly", ["natural gas"]],
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
// The IMF's monthly world prices: the closest public series to LME copper and aluminium, which FUT does not list,
|
|
194
|
-
// and to iron ore, whose futures are licensed.
|
|
195
|
-
group: "Commodities",
|
|
196
|
-
rows: [
|
|
197
|
-
["PCOPPUSDM", "Global price of copper", "USD/ton", "monthly", ["copper", "metals", "LME"]],
|
|
198
|
-
["PALUMUSDM", "Global price of aluminum", "USD/ton", "monthly", ["aluminum", "aluminium", "metals", "LME"]],
|
|
199
|
-
["PIORECRUSDM", "Global price of iron ore (dry metric ton)", "USD/ton", "monthly", ["iron ore", "iron", "steel", "metals"]],
|
|
200
|
-
],
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
group: "Valuation",
|
|
204
|
-
rows: [
|
|
205
|
-
["NCBEILQ027S", "Nonfinancial corporate equities (Z.1)", "million USD", "quarterly", ["market cap", "Buffett"]],
|
|
206
|
-
["FBCELLQ027S", "Financial sector corporate equities (Z.1)", "million USD", "quarterly", ["market cap"]],
|
|
207
|
-
["BOGZ1FL153064486Q", "Household corporate equity holdings (Z.1)", "million USD", "quarterly", ["households", "equity allocation"]],
|
|
208
|
-
["BOGZ1FL663067003Q", "Broker-dealer customer receivables (Z.1)", "million USD", "quarterly", ["margin debt"]],
|
|
209
|
-
["CPROFIT", "Corporate profits after tax", "billion USD", "quarterly", ["earnings", "profits"]],
|
|
210
|
-
["TNWMVBSNNCB", "Nonfinancial corporate net worth (Z.1)", "million USD", "quarterly", ["Tobin's Q"]],
|
|
211
|
-
],
|
|
212
|
-
},
|
|
213
|
-
];
|
|
214
|
-
|
|
215
|
-
/** The FRED series the rates and macro panes chart, each listed once. */
|
|
216
|
-
export const FRED_CATALOG_SERIES: readonly SeriesDefinition[] = GROUPS.flatMap(({ group, rows }) => (
|
|
217
|
-
rows.map(([seriesId, name, unit, frequency, tags]): SeriesDefinition => ({
|
|
218
|
-
id: `fred:${seriesId}`,
|
|
219
|
-
name,
|
|
220
|
-
unit,
|
|
221
|
-
frequency,
|
|
222
|
-
group,
|
|
223
|
-
...(tags?.length ? { tags } : {}),
|
|
224
|
-
publisher: seriesNotOnFred(seriesId)?.publisher ?? "FRED",
|
|
225
|
-
// The licence a publisher's data comes under, which the catalog lists beside the series (SORA's).
|
|
226
|
-
...(seriesNotOnFred(seriesId)?.attribution ? { limitation: seriesNotOnFred(seriesId)!.attribution } : {}),
|
|
227
|
-
url: fredSeriesUrl(seriesId),
|
|
228
|
-
expression: `FRED:${seriesId}`,
|
|
229
|
-
}))
|
|
230
|
-
));
|
|
231
|
-
|
|
232
|
-
/** Spellings of a Treasury bill a person types, as the series names say it. */
|
|
233
|
-
const BILL_WORDS: ReadonlyArray<[RegExp, string]> = [
|
|
234
|
-
[/\bt-?bills?\b|\bt bills?\b|\btreasury bills?\b/g, "treasury bill"],
|
|
235
|
-
[/\b(\d+|three|six|one|four)[\s-]*(month|mo|m)\b/g, "$1-month"],
|
|
236
|
-
[/\bthree-month\b/g, "3-month"],
|
|
237
|
-
[/\bsix-month\b/g, "6-month"],
|
|
238
|
-
[/\b(\d+|four)[\s-]*(week|wk|w)\b/g, "$1-week"],
|
|
239
|
-
[/\bfour-week\b/g, "4-week"],
|
|
240
|
-
[/\b(1|one)[\s-]*(year|yr|y)\b/g, "1-year"],
|
|
241
|
-
];
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* The served FRED series a name asks for, when one alone fits every word: `3 month t-bill` is DTB3. Null for an id
|
|
245
|
-
* (DTB3), for words several series fit and for none.
|
|
246
|
-
*/
|
|
247
|
-
export function fredSeriesIdForName(text: string): string | null {
|
|
248
|
-
const normalized = BILL_WORDS.reduce((value, [pattern, replacement]) => value.replace(pattern, replacement), text.trim().toLowerCase());
|
|
249
|
-
const words = normalized.split(/\s+/).filter((word) => word && word !== "rate" && word !== "yield");
|
|
250
|
-
if (words.length < 2) return null;
|
|
251
|
-
const fits = FRED_CATALOG_SERIES.filter((series) => {
|
|
252
|
-
const name = `${series.name} ${(series.tags ?? []).join(" ")}`.toLowerCase();
|
|
253
|
-
return words.every((word) => name.includes(word));
|
|
254
|
-
});
|
|
255
|
-
return fits.length === 1 ? fits[0]!.id.replace(/^fred:/, "") : null;
|
|
256
|
-
}
|
|
1
|
+
export { FRED_CATALOG_SERIES, fredSeriesIdForName } from "../shared/fred-catalog";
|
|
@@ -5,4 +5,4 @@ import { createSeriesCache } from "../shared/series-cache";
|
|
|
5
5
|
* weekly series now load their full history, so entries cut to the old
|
|
6
6
|
* observation limits must not be served after an upgrade.
|
|
7
7
|
*/
|
|
8
|
-
export const statsCache = createSeriesCache("econ-statistics-series-
|
|
8
|
+
export const statsCache = createSeriesCache("econ-statistics-series-v3", 6 * 60 * 60 * 1000);
|
|
@@ -14,6 +14,9 @@ export interface StatBuild {
|
|
|
14
14
|
trend: TrendFit;
|
|
15
15
|
/** The day the latest point's figure was released (`YYYY-MM-DD`), when FRED says. */
|
|
16
16
|
releasedOn?: string;
|
|
17
|
+
firstReleased?: string;
|
|
18
|
+
revisedOn?: string;
|
|
19
|
+
firstReleaseValue?: number;
|
|
17
20
|
cache?: SeriesCacheMetadata;
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -52,7 +55,8 @@ function build(def: StatDef, result: DatedObservation[] | SeriesCacheLoadResult)
|
|
|
52
55
|
}));
|
|
53
56
|
const points = applyTransform(scaled, def.transform);
|
|
54
57
|
if (points.length === 0) return null;
|
|
55
|
-
const
|
|
58
|
+
const release = observations.find((entry) => entry.date === points.at(-1)!.date);
|
|
59
|
+
const releasedOn = release?.firstReleased ?? release?.releasedOn;
|
|
56
60
|
const cache = Array.isArray(result) ? undefined : {
|
|
57
61
|
fetchedAt: result.fetchedAt,
|
|
58
62
|
stale: result.stale,
|
|
@@ -60,14 +64,11 @@ function build(def: StatDef, result: DatedObservation[] | SeriesCacheLoadResult)
|
|
|
60
64
|
...(result.refreshError ? { refreshError: result.refreshError } : {}),
|
|
61
65
|
};
|
|
62
66
|
// These go negative routinely, so the fit stays linear.
|
|
63
|
-
return { stat: def, points, trend: fitTrend(points, "linear"), ...(releasedOn ? { releasedOn } : {}),
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const newest = observations.reduce<DatedObservation | null>((best, entry) =>
|
|
69
|
-
entry.value != null && (!best || entry.date > best.date) ? entry : best, null);
|
|
70
|
-
return newest?.date === latestDate && typeof newest.releasedOn === "string" ? newest.releasedOn : undefined;
|
|
67
|
+
return { stat: def, points, trend: fitTrend(points, "linear"), ...(releasedOn ? { releasedOn } : {}),
|
|
68
|
+
...(release?.firstReleased ? { firstReleased: release.firstReleased } : {}),
|
|
69
|
+
...(release?.revisedOn ? { revisedOn: release.revisedOn } : {}),
|
|
70
|
+
...(def.transform === "level" && release?.firstReleaseValue != null ? { firstReleaseValue: release.firstReleaseValue * scale } : {}),
|
|
71
|
+
...(cache ? { cache } : {}) };
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
/**
|
|
@@ -84,7 +85,7 @@ function alignDerivedBuilds(builds: StatBuild[]): StatBuild[] {
|
|
|
84
85
|
if ((entry.points.at(-1)?.date ?? "") <= cap) return entry;
|
|
85
86
|
const points = entry.points.filter((point) => point.date <= cap);
|
|
86
87
|
if (points.length === 0) return entry;
|
|
87
|
-
const { releasedOn: _cutRelease, ...rest } = entry;
|
|
88
|
+
const { releasedOn: _cutRelease, firstReleased: _cutFirst, revisedOn: _cutRevision, firstReleaseValue: _cutValue, ...rest } = entry;
|
|
88
89
|
return { ...rest, points, trend: fitTrend(points, "linear") };
|
|
89
90
|
});
|
|
90
91
|
}
|
|
@@ -69,6 +69,7 @@ export function StatDetail({
|
|
|
69
69
|
reference={stat.reference}
|
|
70
70
|
resetKey={`${stat.id}:${view.range}`}
|
|
71
71
|
formatValue={stat.formatValue}
|
|
72
|
+
formatAxisValue={stat.formatValue}
|
|
72
73
|
// The source line under the chart; the chart takes every other row.
|
|
73
74
|
belowChartRows={SOURCE_ROWS}
|
|
74
75
|
belowChart={(
|
|
@@ -4,7 +4,9 @@ import type {
|
|
|
4
4
|
HeadlessPaneEntry,
|
|
5
5
|
} from "../../../types/plugin";
|
|
6
6
|
import { servedFromSavedCopy } from "../../../data/saved-copies";
|
|
7
|
-
import {
|
|
7
|
+
import { fredCitation, fredPublisher } from "../../../sources/gloomberb-cloud/fred-publisher";
|
|
8
|
+
import { FRED_CATALOG_SERIES } from "../econ/fred-catalog";
|
|
9
|
+
import { FRED_VINTAGE_NOTE, laggingSeriesNote } from "../../../cli/commands/fred-series";
|
|
8
10
|
import { formatBasisPoints, toBasisPoints } from "../../../utils/basis-points";
|
|
9
11
|
import { MISSING_VALUE, formatNumber } from "../../../utils/format";
|
|
10
12
|
import type { StatDef } from "./defs";
|
|
@@ -28,6 +30,14 @@ function reportFormat(stat: StatDef): (value: number) => string {
|
|
|
28
30
|
return stat.basisPoints ? (value) => formatBasisPoints(value) : stat.formatValue;
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
function exportUnit(stat: StatDef): string {
|
|
34
|
+
if (stat.basisPoints || stat.id === "mortgage-spread") return "bp";
|
|
35
|
+
if (stat.axisUnit === "%" || ["yoy", "mom", "qoq-annualized"].includes(stat.transform)) return "pct";
|
|
36
|
+
const catalog = FRED_CATALOG_SERIES.find((series) => series.id === `fred:${stat.seriesId}`);
|
|
37
|
+
const unit = catalog?.unit.replace(/^(?:thousand|million|billion) /, "") ?? "index points";
|
|
38
|
+
return stat.category === "housing" && unit === "units" ? "units, annual rate" : unit;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
/**
|
|
32
42
|
* `cutoffShown`: the status line names when in the day the reading was taken, so the period does not repeat it.
|
|
33
43
|
* `text` is the report's text lines, where Previous says its period beside it; exports give the period a line of its own.
|
|
@@ -83,7 +93,7 @@ function detailEntries(view: StatViewModel, cutoffShown: boolean, text: boolean)
|
|
|
83
93
|
// A Treasury yield adds when in the day it was taken, so it is not read against ^TNX's earlier close.
|
|
84
94
|
// A figure dated by its period also says when it was released: "Sep 2026, released Tue 20 Oct".
|
|
85
95
|
{ label: "Period", value: view.latest.date, formatted: view.stat.cutoff && !cutoffShown ? `${view.reading} ${view.stat.cutoff}` : view.readingReleased },
|
|
86
|
-
{ label: "Source", value:
|
|
96
|
+
{ label: "Source", value: fredCitation(view.stat.seriesId) },
|
|
87
97
|
];
|
|
88
98
|
}
|
|
89
99
|
|
|
@@ -114,12 +124,12 @@ function exportDating(view: StatViewModel): { period: string; released?: string;
|
|
|
114
124
|
}
|
|
115
125
|
|
|
116
126
|
/**
|
|
117
|
-
* What an exported row is as of: the
|
|
127
|
+
* What an exported row is as of: the revision or first release day, else its own
|
|
118
128
|
* day when it is observed daily or weekly (a Treasury yield), and nothing when
|
|
119
129
|
* the date only starts the period it covers.
|
|
120
130
|
*/
|
|
121
131
|
function exportAsOf(view: StatViewModel): string | null {
|
|
122
|
-
return view.releasedOn ?? (view.periodicity ? null : view.latest.date);
|
|
132
|
+
return view.revisedOn ?? view.releasedOn ?? (view.periodicity ? null : view.latest.date);
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
export function projectStatsHeadlessBundle(
|
|
@@ -164,16 +174,31 @@ export function projectStatsHeadlessBundle(
|
|
|
164
174
|
textHeader: "Released",
|
|
165
175
|
format: (_value: unknown, row: Record<string, unknown>) => typeof row.released === "string" ? row.released.replace(/^released /, "") : "",
|
|
166
176
|
},
|
|
177
|
+
...text ? [] : [
|
|
178
|
+
{ key: "firstReleased", header: "first_released", literalHeader: true },
|
|
179
|
+
{ key: "revisedOn", header: "revised_on", literalHeader: true },
|
|
180
|
+
{ key: "firstReleaseValue", header: "first_release_value", literalHeader: true,
|
|
181
|
+
format: (_value: unknown, row: Record<string, unknown>) => typeof row.formattedFirstRelease === "string" ? row.formattedFirstRelease : "" },
|
|
182
|
+
],
|
|
167
183
|
];
|
|
168
184
|
return [{
|
|
169
185
|
title: category.label,
|
|
170
186
|
columns: columns(false),
|
|
171
187
|
textColumns: columns(true),
|
|
172
|
-
// `as_of` is the release;
|
|
188
|
+
// `as_of` is the revision or release; without either, only daily or weekly figures use their observation day.
|
|
173
189
|
rowAsOfKey: "exportAsOf",
|
|
190
|
+
rowSymbolKey: "seriesId",
|
|
191
|
+
rowUnitKey: "unit",
|
|
192
|
+
rowIntervalKey: "interval",
|
|
193
|
+
rowSourceKey: "source",
|
|
194
|
+
appendedColumns: 3,
|
|
174
195
|
rows: categoryViews.map((view) => savedCopyRow(view, {
|
|
175
196
|
id: view.stat.id,
|
|
176
197
|
indicator: view.stat.shortLabel,
|
|
198
|
+
seriesId: view.stat.seriesId,
|
|
199
|
+
unit: exportUnit(view.stat),
|
|
200
|
+
interval: FRED_CATALOG_SERIES.find((series) => series.id === `fred:${view.stat.seriesId}`)?.frequency ?? (view.periodicity ?? "daily"),
|
|
201
|
+
source: fredCitation(view.stat.seriesId),
|
|
177
202
|
latest: view.latest.value,
|
|
178
203
|
formattedLatest: reportFormat(view.stat)(view.latest.value),
|
|
179
204
|
previous: view.previous?.value ?? null,
|
|
@@ -188,6 +213,10 @@ export function projectStatsHeadlessBundle(
|
|
|
188
213
|
// The period the figure covers; `releasedOn` is when it was published, which the report is as of.
|
|
189
214
|
asOf: view.latest.date,
|
|
190
215
|
releasedOn: view.releasedOn,
|
|
216
|
+
firstReleased: view.firstReleased,
|
|
217
|
+
revisedOn: view.revisedOn,
|
|
218
|
+
firstReleaseValue: view.firstReleaseValue,
|
|
219
|
+
formattedFirstRelease: view.firstReleaseValue == null ? null : reportFormat(view.stat)(view.firstReleaseValue),
|
|
191
220
|
exportAsOf: exportAsOf(view),
|
|
192
221
|
...(view.periodicity ? { periodicity: view.periodicity } : {}),
|
|
193
222
|
reading: view.reading,
|
|
@@ -207,11 +236,16 @@ export function projectStatsHeadlessBundle(
|
|
|
207
236
|
const cutoffs = new Set(views.map((view) => view.stat.cutoff));
|
|
208
237
|
const cutoff = cutoffs.size === 1 ? [...cutoffs][0] : undefined;
|
|
209
238
|
return {
|
|
210
|
-
|
|
239
|
+
freshness: { ...ECST_FRESHNESS, ...(cutoff ? { schedule: cutoff } : {}),
|
|
240
|
+
...(selected ? { source: fredCitation(selected.stat.seriesId), publisher: fredPublisher(selected.stat.seriesId) ?? undefined } : {}) },
|
|
211
241
|
sections: [
|
|
212
242
|
...sections,
|
|
213
243
|
...(selected ? [{
|
|
214
244
|
title: selected.stat.label,
|
|
245
|
+
symbol: selected.stat.seriesId,
|
|
246
|
+
unit: exportUnit(selected.stat),
|
|
247
|
+
interval: FRED_CATALOG_SERIES.find((series) => series.id === `fred:${selected.stat.seriesId}`)?.frequency ?? (selected.periodicity ?? "daily"),
|
|
248
|
+
source: fredCitation(selected.stat.seriesId),
|
|
215
249
|
entries: detailEntries(selected, cutoff != null, false),
|
|
216
250
|
textEntries: detailEntries(selected, cutoff != null, true),
|
|
217
251
|
...exportDating(selected),
|
|
@@ -226,6 +260,8 @@ export function projectStatsHeadlessBundle(
|
|
|
226
260
|
? ["A move's pctl is the share of all 1D (or 1W) moves since that year that were smaller, ties counted half; --range does not change it."]
|
|
227
261
|
: []),
|
|
228
262
|
...(cpiGap ? [cpiGap] : []),
|
|
263
|
+
...(views.some((view) => view.releasedOn) ? [FRED_VINTAGE_NOTE] : []),
|
|
264
|
+
...views.flatMap((view) => laggingSeriesNote(view.stat.seriesId) ?? []),
|
|
229
265
|
],
|
|
230
266
|
metadata: {
|
|
231
267
|
fetchedAt: bundle.fetchedAt,
|
|
@@ -19,12 +19,14 @@ import { categoryLabel, changeColor, type StatCategoryId } from "./defs";
|
|
|
19
19
|
import { StatDetail } from "./detail";
|
|
20
20
|
import { DEFAULT_STAT_ID } from "./stats";
|
|
21
21
|
import { selectStatViews, type StatRangeId, type StatViewModel } from "./view";
|
|
22
|
+
import { laggingSeriesNote } from "../../../cli/commands/fred-series";
|
|
23
|
+
import { fredCitation } from "../../../sources/gloomberb-cloud/fred-publisher";
|
|
22
24
|
|
|
23
25
|
const loadBundle = (force: boolean) => loadStatsBundle({ force });
|
|
24
26
|
|
|
25
|
-
const LIST_WIDTH =
|
|
27
|
+
const LIST_WIDTH = 60;
|
|
26
28
|
const NAME_MIN_WIDTH = 13;
|
|
27
|
-
const PERIOD_WIDTH =
|
|
29
|
+
const PERIOD_WIDTH = 10;
|
|
28
30
|
|
|
29
31
|
const RANGE_OPTIONS = [
|
|
30
32
|
{ value: "5Y" as const, label: "5Y" },
|
|
@@ -158,8 +160,11 @@ export function EconStatisticsPane({ focused, width, height }: PaneProps) {
|
|
|
158
160
|
// A Treasury yield names when in the day it was taken, as GC does, so it is not read against ^TNX's earlier close.
|
|
159
161
|
const cutoff = selected.stat.cutoff ? ` ${selected.stat.cutoff}` : "";
|
|
160
162
|
const info: PaneFooterSegment[] = [
|
|
163
|
+
{ id: "publisher", parts: [{ text: fredCitation(selected.stat.seriesId), tone: "muted" }] },
|
|
161
164
|
{ id: "as-of", parts: [{ text: `reading for ${cutoff ? selected.reading : selected.readingReleased}${cutoff}`, tone: "muted" }] },
|
|
162
165
|
];
|
|
166
|
+
const lag = laggingSeriesNote(selected.stat.seriesId);
|
|
167
|
+
if (lag) info.push({ id: "publication-lag", parts: [{ text: lag, tone: "warning" }] });
|
|
163
168
|
// The cached first paint is being replaced; its age only counts once that load fails, and then it is the
|
|
164
169
|
// copy an earlier read saved, which says when that was.
|
|
165
170
|
const seeding = resource.loading && resource.updatedAt === null && !selected.refreshError;
|
|
@@ -21,7 +21,7 @@ const pct2 = (value: number) => `${formatNumber(value, 2)}%`;
|
|
|
21
21
|
const plain = (value: number) => formatNumber(value, 1);
|
|
22
22
|
const index2 = (value: number) => formatNumber(value, 2);
|
|
23
23
|
/** FRED reports payrolls and claims in thousands already. */
|
|
24
|
-
const thousands = (value: number) => `${formatNumber(value / 1000,
|
|
24
|
+
const thousands = (value: number) => `${formatNumber(value / 1000, 3)}M`;
|
|
25
25
|
const signedThousands = (value: number) =>
|
|
26
26
|
`${value > 0 ? "+" : ""}${formatNumber(value, 0)}k`;
|
|
27
27
|
const billions = (value: number) => `${formatNumber(value, 0)}B`;
|
|
@@ -407,6 +407,7 @@ export const STATS: readonly StatDef[] = [
|
|
|
407
407
|
// ---- Housing ---------------------------------------------------------
|
|
408
408
|
stat({
|
|
409
409
|
id: "housing-starts",
|
|
410
|
+
aliases: ["homebuilders", "homebuilder", "homebuilding"],
|
|
410
411
|
measurementBasis: "Annual rate",
|
|
411
412
|
label: "Housing Starts",
|
|
412
413
|
shortLabel: "Starts",
|
|
@@ -26,6 +26,9 @@ export interface StatViewModel {
|
|
|
26
26
|
reading: string;
|
|
27
27
|
/** The day the latest print was released (`YYYY-MM-DD`), when FRED says; null for a daily rate. */
|
|
28
28
|
releasedOn: string | null;
|
|
29
|
+
firstReleased: string | null;
|
|
30
|
+
revisedOn: string | null;
|
|
31
|
+
firstReleaseValue: number | null;
|
|
29
32
|
/** `released Tue 20 Oct`, or null when the release is not known. */
|
|
30
33
|
released: string | null;
|
|
31
34
|
/** The reading and its release, as every macro pane says it: "Sep 2026, released Tue 20 Oct". */
|
|
@@ -89,9 +92,9 @@ function formatStatPeriod(date: string, perYear: number): string {
|
|
|
89
92
|
const month = Number(date.slice(5, 7));
|
|
90
93
|
const name = MONTHS[month - 1];
|
|
91
94
|
if (!name) return date;
|
|
92
|
-
if (perYear <= 4) return `Q${Math.ceil(month / 3)}`;
|
|
93
|
-
if (perYear <= 12) return name
|
|
94
|
-
return `${
|
|
95
|
+
if (perYear <= 4) return `Q${Math.ceil(month / 3)} ${date.slice(0, 4)}`;
|
|
96
|
+
if (perYear <= 12) return `${name} ${date.slice(0, 4)}`;
|
|
97
|
+
return `${date.slice(5)} ${date.slice(0, 4)}`;
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
/**
|
|
@@ -151,6 +154,9 @@ export function projectStat(
|
|
|
151
154
|
period: formatStatPeriod(latest.date, perYear),
|
|
152
155
|
reading,
|
|
153
156
|
releasedOn,
|
|
157
|
+
firstReleased: build.firstReleased ?? null,
|
|
158
|
+
revisedOn: build.revisedOn ?? null,
|
|
159
|
+
firstReleaseValue: build.firstReleaseValue ?? null,
|
|
154
160
|
released: releasedText(releasedOn, latest.date),
|
|
155
161
|
readingReleased: periodReleasedText(reading, releasedOn, latest.date),
|
|
156
162
|
periodicity: periodStartPeriodicity(latest.date, perYear),
|