global: snapshot part 18

This commit is contained in:
nym21
2026-03-21 20:03:28 +01:00
parent 8859de5393
commit 926721c482
17 changed files with 15824 additions and 1443 deletions
@@ -50,7 +50,7 @@ function volumeTree(tv, color, title) {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Transfer Volume Profitability (${w.title})`),
title: title(`${w.title} Transfer Volume Profitability`),
bottom: [
...satsBtcUsd({
pattern: tv.inProfit.sum[w.key],
@@ -157,7 +157,7 @@ function singleRollingSoprTree(ratio, title, prefix = "") {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${prefix}SOPR (${w.title})`),
title: title(`${w.title} ${prefix}SOPR`.trim()),
bottom: [
baseline({
series: ratio[w.key],
@@ -228,7 +228,7 @@ function singleSellSideRiskTree(sellSideRisk, title) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Sell Side Risk (${w.title})`),
title: title(`${w.title} Sell Side Risk`),
bottom: percentRatio({
pattern: sellSideRisk[w.key],
name: "Risk",
@@ -509,7 +509,7 @@ function groupedVolumeFolderWithAdjusted(list, all, title, getTransferVolume, ge
function groupedSoprCharts(list, all, getRatio, title, prefix = "") {
return ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${prefix}SOPR (${w.title})`),
title: title(`${w.title} ${prefix}SOPR`.trim()),
bottom: mapCohortsWithAll(list, all, (c) =>
baseline({
series: getRatio(c)[w.key],
@@ -653,7 +653,7 @@ function groupedActivitySharedItems(list, all, title) {
name: "Dormancy",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Dormancy (${w.title})`),
title: title(`${w.title} Dormancy`),
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
line({
series: tree.activity.dormancy[w.key],
@@ -668,7 +668,7 @@ function groupedActivitySharedItems(list, all, title) {
name: "Sell Side Risk",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Sell Side Risk (${w.title})`),
title: title(`${w.title} Sell Side Risk`),
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
line({
series: tree.realized.sellSideRiskRatio[w.key].ratio,
@@ -711,7 +711,7 @@ export function createGroupedActivitySectionWithActivity({ list, all, title }) {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Coindays Destroyed (${w.title})`),
title: title(`${w.title} Coindays Destroyed`),
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
line({
series: tree.activity.coindaysDestroyed.sum[w.key],
@@ -108,7 +108,7 @@ function groupedDeltaItems(list, all, getDelta, unit, title, name) {
name: "Change",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${name} Change (${w.title})`),
title: title(`${w.title} ${name} Change`),
bottom: mapCohortsWithAll(list, all, (c) =>
baseline({
series: getDelta(c).absolute[w.key],
@@ -123,7 +123,7 @@ function groupedDeltaItems(list, all, getDelta, unit, title, name) {
name: "Growth Rate",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${name} Growth Rate (${w.title})`),
title: title(`${w.title} ${name} Growth Rate`),
bottom: flatMapCohortsWithAll(list, all, (c) =>
percentRatioBaseline({
pattern: getDelta(c).rate[w.key],
@@ -403,7 +403,7 @@ export function createGroupedCohortFolderAgeRangeWithMatured({
name: "Matured",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Matured Supply (${w.title})`),
title: title(`${w.title} Matured Supply`),
bottom: list.flatMap((cohort) =>
satsBtcUsd({
pattern: cohort.matured.sum[w.key],
@@ -617,7 +617,7 @@ function groupedBucketCharts(list, groupTitle) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Supply Change (${w.title})`),
title: title(`${w.title} Supply Change`),
bottom: list.map(({ name, color, pattern }) =>
baseline({
series: pattern.supply.all.delta.absolute[w.key],
@@ -647,7 +647,7 @@ function groupedBucketCharts(list, groupTitle) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Supply Growth Rate (${w.title})`),
title: title(`${w.title} Supply Growth Rate`),
bottom: list.flatMap(({ name, color, pattern }) =>
percentRatio({
pattern: pattern.supply.all.delta.rate[w.key],
@@ -315,7 +315,7 @@ function realizedMetricFolder({ pattern, metricTitle, color, title }) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized ${metricTitle} (${w.title})`),
title: title(`${w.title} Realized ${metricTitle}`),
bottom: [
line({
series: pattern.sum[w.key].usd,
@@ -366,7 +366,7 @@ function realizedNetFolder({ netPnl, title, extraChange = [] }) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Net Realized P&L (${w.title})`),
title: title(`${w.title} Net Realized P&L`),
bottom: [
baseline({
series: netPnl.sum[w.key].usd,
@@ -433,7 +433,7 @@ function realizedOverviewFolder({
name: "Overview",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized P&L (${w.title})`),
title: title(`${w.title} Realized P&L`),
bottom: [
baseline({
series: netPnl.sum[w.key].usd,
@@ -576,7 +576,7 @@ function realizedSubfolderFull(r, title) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized P/L Ratio (${w.title})`),
title: title(`${w.title} Realized P/L Ratio`),
bottom: [
baseline({
series: r.profitToLossRatio[w.key],
@@ -605,7 +605,7 @@ function realizedSubfolderFull(r, title) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Peak Regret (${w.title})`),
title: title(`${w.title} Peak Regret`),
bottom: [
line({
series: r.peakRegret.sum[w.key].usd,
@@ -937,7 +937,7 @@ function groupedRealizedNetPnlDeltaItems(list, all, title) {
name: "Change",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Net Realized P&L Change (${w.title})`),
title: title(`${w.title} Net Realized P&L Change`),
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
baseline({
series: tree.realized.netPnl.delta.absolute[w.key].usd,
@@ -952,7 +952,7 @@ function groupedRealizedNetPnlDeltaItems(list, all, title) {
name: "Growth Rate",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Net Realized P&L Growth Rate (${w.title})`),
title: title(`${w.title} Net Realized P&L Growth Rate`),
bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) =>
percentRatioBaseline({
pattern: tree.realized.netPnl.delta.rate[w.key],
@@ -1005,7 +1005,7 @@ function groupedRealizedSubfolderFull(list, all, title) {
name: "P/L Ratio",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized P/L Ratio (${w.title})`),
title: title(`${w.title} Realized P/L Ratio`),
bottom: mapCohortsWithAll(list, all, (c) =>
baseline({
series: c.tree.realized.profitToLossRatio[w.key],
@@ -44,7 +44,7 @@ function groupedDeltaAndMvrv(list, all, title) {
name: "Change",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized Cap Change (${w.title})`),
title: title(`${w.title} Realized Cap Change`),
bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) =>
baseline({ series: tree.realized.cap.delta.absolute[w.key].usd, name, color, unit: Unit.usd }),
),
@@ -54,7 +54,7 @@ function groupedDeltaAndMvrv(list, all, title) {
name: "Growth Rate",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`Realized Cap Growth Rate (${w.title})`),
title: title(`${w.title} Realized Cap Growth Rate`),
bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) =>
percentRatioBaseline({ pattern: tree.realized.cap.delta.rate[w.key], name, color }),
),
+5 -5
View File
@@ -588,7 +588,7 @@ export function createMarketSection() {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Capitalization Growth Rate Spread (${w.title})`,
title: `${w.title} Capitalization Growth Rate Spread`,
bottom: [
baseline({
series: supply.marketMinusRealizedCapGrowthRate[w.key],
@@ -676,7 +676,7 @@ export function createMarketSection() {
const rsi = technical.rsi[w.key];
return {
name: w.name,
title: `RSI (${w.title})`,
title: `${w.title} RSI`,
bottom: [
...indexRatio({
pattern: rsi.rsi,
@@ -699,7 +699,7 @@ export function createMarketSection() {
const rsi = technical.rsi[w.key];
return {
name: w.name,
title: `Stochastic RSI (${w.title})`,
title: `${w.title} Stochastic RSI`,
bottom: [
...indexRatio({
pattern: rsi.stochRsiK,
@@ -738,7 +738,7 @@ export function createMarketSection() {
},
...ROLLING_WINDOWS_TO_1M.map((w) => ({
name: w.name,
title: `MACD (${w.title})`,
title: `${w.title} MACD`,
bottom: [
line({
series: technical.macd[w.key].line,
@@ -785,7 +785,7 @@ export function createMarketSection() {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Volatility Index (${w.title})`,
title: `${w.title} Volatility Index`,
bottom: [
line({
series: volatility[w.key],
+7 -7
View File
@@ -97,7 +97,7 @@ export function createMiningSection() {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: percentRatio({ pattern: dominance[w.key], name: w.name, color: w.color }),
})),
{
@@ -177,7 +177,7 @@ export function createMiningSection() {
name: "Dominance",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Dominance: ${groupTitle} ${w.title}`,
title: formatCohortTitle(groupTitle)(`${w.title} Dominance`),
bottom: poolList.flatMap((p, i) =>
percentRatio({
pattern: p.pool.dominance[w.key],
@@ -191,7 +191,7 @@ export function createMiningSection() {
name: "Blocks Mined",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Blocks Mined: ${groupTitle} ${w.title} Sum`,
title: formatCohortTitle(groupTitle)(`${w.title} Blocks Mined`),
bottom: poolList.map((p, i) =>
line({
series: p.pool.blocksMined.sum[w.key],
@@ -299,7 +299,7 @@ export function createMiningSection() {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Revenue ${w.title} Averages`,
title: `${w.title} Revenue`,
bottom: revenueRollingBtcSatsUsd({
coinbase: mining.rewards.coinbase.average[w.key],
subsidy: mining.rewards.subsidy.average[w.key],
@@ -341,7 +341,7 @@ export function createMiningSection() {
name: "Distributions",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Fee Revenue per Block ${w.title} Distribution`,
title: `${w.title} Fee Revenue per Block Distribution`,
bottom: distributionBtcSatsUsd(statsAtWindow(mining.rewards.fees, w.key)),
})),
},
@@ -352,7 +352,7 @@ export function createMiningSection() {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Revenue Dominance ${w.title}`,
title: `${w.title} Revenue Dominance`,
bottom: [
...percentRatio({ pattern: mining.rewards.subsidy.dominance[w.key], name: "Subsidy", color: colors.mining.subsidy }),
...percentRatio({ pattern: mining.rewards.fees.dominance[w.key], name: "Fees", color: colors.mining.fee }),
@@ -372,7 +372,7 @@ export function createMiningSection() {
name: "Fee Multiple",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Fee-to-Subsidy Ratio ${w.title}`,
title: `${w.title} Fee-to-Subsidy Ratio`,
bottom: [line({ series: mining.rewards.fees.toSubsidyRatio[w.key].ratio, name: "Ratio", color: colors.mining.fee, unit: Unit.ratio })],
})),
},
+5 -5
View File
@@ -162,7 +162,7 @@ export function createNetworkSection() {
name: "Compare",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `${titlePrefix}Active Addresses ${w.title} Average`,
title: `${w.title} ${titlePrefix}Active Addresses`,
bottom: activityTypes.map((t, i) =>
line({
series: addrs.activity[key][t.key][w.key],
@@ -213,7 +213,7 @@ export function createNetworkSection() {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `${groupName} Output Count ${w.title} Sum`,
title: `${w.title} ${groupName} Output Count`,
bottom: types.map((t) =>
line({
series: /** @type {CountPattern<number>} */ (
@@ -402,7 +402,7 @@ export function createNetworkSection() {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Block Count ${w.title}`,
title: `${w.title} Block Count`,
bottom: [
line({
series: blocks.count.total.sum[w.key],
@@ -531,7 +531,7 @@ export function createNetworkSection() {
name: "Throughput",
tree: ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Throughput ${w.title} Average`,
title: `${w.title} Throughput`,
bottom: [
line({
series: transactions.volume.txPerSec[w.key],
@@ -597,7 +597,7 @@ export function createNetworkSection() {
tree: [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: `Output Count by Script Type ${w.title} Sum`,
title: `${w.title} Output Count by Script Type`,
bottom: scriptTypes.map((t) =>
line({
series: /** @type {CountPattern<number>} */ (
+9 -9
View File
@@ -519,7 +519,7 @@ export function sumsAndAveragesCumulativeWith({
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: [
...series({ pattern: sum[w.key], name: "Sum", color: w.color }),
...series({
@@ -551,7 +551,7 @@ export function sumsAndAveragesCumulativeWith({
export function sumsAndAveragesArray({ sum, average, title = (s) => s, metric, unit }) {
return ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: [
line({ series: sum[w.key], name: "Sum", color: w.color, unit }),
line({
@@ -611,7 +611,7 @@ export function sumsTreeBaseline({ windows, title = (s) => s, metric, unit }) {
return rollingWindowsTreeBaseline({
windows,
title: title(metric),
windowTitle: (w) => title(`${w.name} ${metric}`),
windowTitle: (w) => title(`${w.title} ${metric}`),
unit,
name: "Sums",
});
@@ -637,7 +637,7 @@ export function averagesArray({ windows, title = (s) => s, metric, unit }) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: [
line({ series: windows[w.key], name: w.name, color: w.color, unit }),
],
@@ -673,7 +673,7 @@ export function distributionWindowsTree({ pattern, base, title = (s) => s, metri
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric} Distribution`),
title: title(`${w.title} ${metric} Distribution`),
bottom: [
...(base ? [line({ series: base, name: "base", unit })] : []),
...percentileSeries({ pattern: statsAtWindow(pattern, w.key), unit }),
@@ -870,7 +870,7 @@ export function rollingPercentRatioTree({
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: percentRatioBaseline({ pattern: windows[w.key], name: w.name }),
})),
],
@@ -907,7 +907,7 @@ export function deltaTree({ delta, title = (s) => s, metric, unit, extract }) {
},
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric} Change`),
title: title(`${w.title} ${metric} Change`),
bottom: [
baseline({
series: extract(delta.absolute[w.key]),
@@ -1106,7 +1106,7 @@ export function chartsFromCountEntries({ entries, title = (s) => s, metric, unit
return [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: items.map((e) =>
line({ series: e.sum[w.key], name: e.name, color: e.color, unit }),
),
@@ -1134,7 +1134,7 @@ export function multiSeriesTree({ entries, title = (s) => s, metric, unit }) {
return [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${w.name} ${metric}`),
title: title(`${w.title} ${metric}`),
bottom: entries.map((e) =>
line({ series: e.average[w.key], name: e.name, color: e.color, unit }),
),
+2 -2
View File
@@ -775,7 +775,7 @@ export function groupedWindowsCumulative({ list, all, title, metricTitle, getWin
return [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${metricTitle} (${w.title})`),
title: title(`${w.title} ${metricTitle}`),
bottom: mapCohortsWithAll(list, all, (c) =>
seriesFn({ series: getWindowSeries(c, w.key), name: c.name, color: c.color, unit }),
),
@@ -827,7 +827,7 @@ export function groupedWindowsCumulativeSatsBtcUsd({ list, all, title, metricTit
return [
...ROLLING_WINDOWS.map((w) => ({
name: w.name,
title: title(`${metricTitle} (${w.title})`),
title: title(`${w.title} ${metricTitle}`),
bottom: flatMapCohortsWithAll(list, all, (c) =>
satsBtcUsd({ pattern: getMetric(c).sum[w.key], name: c.name, color: c.color }),
),