general: snapshot

This commit is contained in:
k
2024-07-18 09:16:18 +02:00
parent fb978211ae
commit 4d23fdef61
14 changed files with 565 additions and 488 deletions

View File

@@ -1,144 +1,203 @@
import { colors } from "../../utils/colors";
export function createPresets() {
const scale: ResourceScale = "date";
export function createPresets(scale: ResourceScale) {
return {
name: "Blocks",
tree: [
{
scale,
icon: IconTablerWall,
name: "Height",
title: "Block Height",
description: "",
bottom: [
{
title: "Height",
color: colors.bitcoin,
datasetPath: `/date-to-last-height`,
},
],
},
{
scale,
name: "Mined",
tree: [
{
scale,
icon: IconTablerCube,
name: "Daily Sum",
title: "Daily Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1d-target`,
options: {
lineStyle: 3,
...((scale === "date"
? [
{
scale,
icon: IconTablerWall,
name: "Height",
title: "Block Height",
description: "",
bottom: [
{
title: "Height",
color: colors.bitcoin,
datasetPath: `/date-to-last-height`,
},
},
{
title: "1W Avg.",
color: colors.momentumYellow,
datasetPath: `/date-to-blocks-mined-1w-sma`,
defaultVisible: false,
},
{
title: "1M Avg.",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1m-sma`,
},
{
title: "Mined",
color: colors.darkBitcoin,
datasetPath: `/date-to-blocks-mined`,
},
],
},
{
scale,
icon: IconTablerLetterW,
name: "Weekly Sum",
title: "Weekly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1w-target`,
options: {
lineStyle: 3,
],
},
{
scale,
name: "Mined",
tree: [
{
scale,
icon: IconTablerCube,
name: "Daily Sum",
title: "Daily Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1d-target`,
options: {
lineStyle: 3,
},
},
{
title: "1W Avg.",
color: colors.momentumYellow,
datasetPath: `/date-to-blocks-mined-1w-sma`,
defaultVisible: false,
},
{
title: "1M Avg.",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1m-sma`,
},
{
title: "Mined",
color: colors.darkBitcoin,
datasetPath: `/date-to-blocks-mined`,
},
],
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1w-sum`,
},
],
},
{
scale,
icon: IconTablerLetterM,
name: "Monthly Sum",
title: "Monthly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1m-target`,
options: {
lineStyle: 3,
{
scale,
icon: IconTablerLetterW,
name: "Weekly Sum",
title: "Weekly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1w-target`,
options: {
lineStyle: 3,
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1w-sum`,
},
],
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1m-sum`,
},
],
},
{
scale,
icon: IconTablerLetterY,
name: "Yearly Sum",
title: "Yearly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1y-target`,
options: {
lineStyle: 3,
{
scale,
icon: IconTablerLetterM,
name: "Monthly Sum",
title: "Monthly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1m-target`,
options: {
lineStyle: 3,
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1m-sum`,
},
],
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1y-sum`,
},
],
},
{
scale,
icon: IconTablerWall,
name: "Total",
title: "Total Blocks Mined",
description: "",
bottom: [
{
title: "Mined",
color: colors.bitcoin,
datasetPath: `/date-to-total-blocks-mined`,
},
],
},
],
},
{
scale,
icon: IconTablerLetterY,
name: "Yearly Sum",
title: "Yearly Sum Of Blocks Mined",
description: "",
bottom: [
{
title: "Target",
color: colors.white,
datasetPath: `/date-to-blocks-mined-1y-target`,
options: {
lineStyle: 3,
},
},
{
title: "Sum Mined",
color: colors.bitcoin,
datasetPath: `/date-to-blocks-mined-1y-sum`,
},
],
},
{
scale,
icon: IconTablerWall,
name: "Total",
title: "Total Blocks Mined",
description: "",
bottom: [
{
title: "Mined",
color: colors.bitcoin,
datasetPath: `/date-to-total-blocks-mined`,
},
],
},
],
},
]
: [
{
scale,
icon: IconTablerMaximize,
name: "Size",
title: "Block Size",
description: "",
bottom: [
{
title: "Size (MB)",
color: colors.darkWhite,
datasetPath: `/height-to-block-size`,
},
],
},
{
scale,
icon: IconTablerWeight,
name: "Weight",
title: "Block Weight",
description: "",
bottom: [
{
title: "Weight (MB)",
color: colors.darkWhite,
datasetPath: `/height-to-block-weight`,
},
],
},
{
scale,
icon: IconTablerBinary,
name: "VBytes",
title: "Block VBytes",
description: "",
bottom: [
{
title: "VBytes",
color: colors.darkWhite,
datasetPath: `/height-to-block-vbytes`,
},
],
},
{
scale,
icon: IconTablerAlarm,
name: "Interval",
title: "Block Interval",
description: "",
bottom: [
{
title: "Interval (s)",
color: colors.darkWhite,
datasetPath: `/height-to-block-interval`,
},
],
},
]) satisfies PartialPresetTree),
{
scale,
icon: IconTablerStack3,
@@ -149,7 +208,7 @@ export function createPresets() {
{
title: "Size (MB)",
color: colors.darkWhite,
datasetPath: `/date-to-cumulative-block-size`,
datasetPath: `/${scale}-to-cumulative-block-size`,
},
],
},

View File

@@ -36,7 +36,7 @@ export function createPresets(): Presets {
name: "By Block Date",
tree: [
createMarketPresets("date"),
createBlocksPresets(),
createBlocksPresets("date"),
createMinersPresets("date"),
createTransactionsPresets("date"),
...createCohortPresetList({
@@ -62,6 +62,7 @@ export function createPresets(): Presets {
tree: !phone
? [
createMarketPresets("height"),
createBlocksPresets("height"),
createMinersPresets("height"),
createTransactionsPresets("height"),
...createCohortPresetList({

View File

@@ -12,7 +12,7 @@ export function createPresets(scale: ResourceScale): PartialPresetFolder {
scale,
icon: IconTablerMathAvg,
name: "All",
title: "All Averages",
title: "All Moving Averages",
description: "",
top: averages.map((average) => ({
title: average.key.toUpperCase(),
@@ -25,6 +25,7 @@ export function createPresets(scale: ResourceScale): PartialPresetFolder {
scale,
color: colors[`_${key}`],
name,
title: `${name} Market Price Moving Average`,
key,
}),
),
@@ -36,11 +37,13 @@ function createPresetFolder({
scale,
color,
name,
title,
key,
}: {
scale: ResourceScale;
color: Color;
name: string;
title: string;
key: AverageName;
}) {
return {
@@ -51,7 +54,7 @@ function createPresetFolder({
name: "Average",
description: "",
icon: IconTablerMathAvg,
title: `${name} Moving Average`,
title,
top: [
{
title: `SMA`,
@@ -60,255 +63,12 @@ function createPresetFolder({
},
],
},
// {
// name: "Ratio",
// tree: [
// {
// scale,
// name: "Basic",
// description: "",
// icon: IconTablerMathXDivideY,
// title: `Market Price To ${name} Moving Average Ratio`,
// top: [
// {
// title: `SMA`,
// color,
// datasetPath: `/${scale}-to-price-${key}-sma`,
// },
// ],
// bottom: [
// {
// title: `Ratio`,
// seriesType: SeriesType.Based,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
// options: {
// base: 1,
// },
// },
// {
// title: `Even`,
// color: colors.white,
// datasetPath: `/${scale}-to-1`,
// options: {
// lineStyle: 3,
// lastValueVisible: false,
// },
// },
// ],
// },
// {
// scale,
// name: "Averages",
// description: "",
// icon: IconTablerMathAvg,
// title: `Market Price To ${name} Moving Average Ratio Averages`,
// top: [
// {
// title: `SMA`,
// color,
// datasetPath: `/${scale}-to-price-${key}-sma`,
// },
// ],
// bottom: [
// {
// title: `1Y`,
// color: colors._1y,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma`,
// },
// {
// title: `1M`,
// color: colors._1m,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1m-sma`,
// },
// {
// title: `1W`,
// color: colors._1w,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1w-sma`,
// },
// {
// title: `Raw`,
// color: colors.white,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
// options: {
// base: 1,
// },
// },
// {
// title: `Even`,
// color: colors.gray,
// datasetPath: `/${scale}-to-1`,
// options: {
// lineStyle: 3,
// lastValueVisible: false,
// },
// },
// ],
// },
// {
// scale,
// name: "Momentum Oscillator",
// description: "",
// icon: IconTablerWaveSine,
// title: `Market Price To ${name} Moving Average Ratio 1Y SMA Momentum Oscillator`,
// top: [
// {
// title: `SMA`,
// color,
// datasetPath: `/${scale}-to-price-${key}-sma`,
// },
// ],
// bottom: [
// {
// title: `Momentum`,
// seriesType: SeriesType.Based,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma-momentum-oscillator`,
// },
// {
// title: `Base`,
// color: colors.white,
// datasetPath: `/${scale}-to-0`,
// options: {
// lineStyle: 3,
// lastValueVisible: false,
// },
// },
// ],
// },
// {
// scale,
// name: "Top Percentiles",
// description: "",
// icon: IconTablerFlame,
// title: `Market Price To ${name} Moving Average Ratio Top Percentiles`,
// top: [
// {
// title: `SMA`,
// color,
// datasetPath: `/${scale}-to-price-${key}-sma`,
// },
// ],
// bottom: [
// {
// title: `99.9%`,
// color: colors.extremeMax,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99-9p`,
// },
// {
// title: `99.5%`,
// color: colors.extremeMiddle,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99-5p`,
// },
// {
// title: `99%`,
// color: colors.extremeMin,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99p`,
// },
// {
// title: `Raw`,
// color: colors.white,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
// options: {
// base: 1,
// },
// },
// ],
// },
// {
// scale,
// name: "Bottom Percentiles",
// description: "",
// icon: IconTablerIceCream,
// title: `Market Price To ${name} Moving Average Ratio Bottom Percentiles`,
// top: [
// {
// title: `SMA`,
// color,
// datasetPath: `/${scale}-to-price-${key}-sma`,
// },
// ],
// bottom: [
// {
// title: `1%`,
// color: colors.extremeMin,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1p`,
// },
// {
// title: `0.5%`,
// color: colors.extremeMiddle,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-0-5p`,
// },
// {
// title: `0.1%`,
// color: colors.extremeMax,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-0-1p`,
// },
// {
// title: `Raw`,
// color: colors.white,
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
// options: {
// base: 1,
// },
// },
// ],
// },
// {
// scale,
// name: "Extreme Tops",
// description: "",
// icon: IconTablerRocket,
// title: `${name} Moving Average Extreme Tops`,
// top: [
// {
// title: `99.9%`,
// color: colors.extremeMax,
// datasetPath: `/${scale}-to-price-${key}-sma-99-9p`,
// },
// {
// title: `99.5%`,
// color: colors.extremeMiddle,
// datasetPath: `/${scale}-to-price-${key}-sma-99-5p`,
// },
// {
// title: `99%`,
// color: colors.extremeMin,
// datasetPath: `/${scale}-to-price-${key}-sma-99p`,
// },
// ],
// },
// {
// scale,
// name: "Extreme Bottoms",
// description: "",
// icon: IconTablerSubmarine,
// title: `${name} Moving Average Extreme Bottoms`,
// top: [
// {
// title: `0.1%`,
// color: colors.extremeMax,
// datasetPath: `/${scale}-to-price-${key}-sma-0-1p`,
// },
// {
// title: `0.5%`,
// color: colors.extremeMiddle,
// datasetPath: `/${scale}-to-price-${key}-sma-0-5p`,
// },
// {
// title: `1%`,
// color: colors.extremeMin,
// datasetPath: `/${scale}-to-price-${key}-sma-1p`,
// },
// ],
// },
// ],
// },
createRatioFolder({
scale,
color,
ratioDatasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
valueDatasetPath: `/${scale}-to-price-${key}-sma`,
title: `${name} Moving Average`,
title,
}),
],
} satisfies PartialPresetFolder;

View File

@@ -142,17 +142,17 @@ export function createRatioFolder({
bottom: [
{
title: `99.9%`,
color: colors.extremeMax,
color: colors.probability0_1p,
datasetPath: `${ratioDatasetPath}-99-9p` as any,
},
{
title: `99.5%`,
color: colors.extremeMiddle,
color: colors.probability0_5p,
datasetPath: `${ratioDatasetPath}-99-5p` as any,
},
{
title: `99%`,
color: colors.extremeMin,
color: colors.probability1p,
datasetPath: `${ratioDatasetPath}-99p` as any,
},
{
@@ -178,17 +178,17 @@ export function createRatioFolder({
bottom: [
{
title: `1%`,
color: colors.extremeMin,
color: colors.probability1p,
datasetPath: `${ratioDatasetPath}-1p` as any,
},
{
title: `0.5%`,
color: colors.extremeMiddle,
color: colors.probability0_5p,
datasetPath: `${ratioDatasetPath}-0-5p` as any,
},
{
title: `0.1%`,
color: colors.extremeMax,
color: colors.probability0_1p,
datasetPath: `${ratioDatasetPath}-0-1p` as any,
},
{
@@ -200,48 +200,48 @@ export function createRatioFolder({
},
{
scale,
name: "Extreme Tops",
name: "Top Probabilities",
description: "",
icon: IconTablerRocket,
title: `${title} Extreme Tops`,
title: `${title} Top Probabilities`,
top: [
{
title: `99.9%`,
color: colors.extremeMax,
title: `0.1%`,
color: colors.probability0_1p,
datasetPath: `${valueDatasetPath}-99-9p` as any,
},
{
title: `99.5%`,
color: colors.extremeMiddle,
title: `0.5%`,
color: colors.probability0_5p,
datasetPath: `${valueDatasetPath}-99-5p` as any,
},
{
title: `99%`,
color: colors.extremeMin,
title: `1%`,
color: colors.probability1p,
datasetPath: `${valueDatasetPath}-99p` as any,
},
],
},
{
scale,
name: "Extreme Bottoms",
name: "Bottom Probabilities",
description: "",
icon: IconTablerSubmarine,
title: `${title} Extreme Bottoms`,
title: `${title} Bottom Probabilities`,
top: [
{
title: `0.1%`,
color: colors.extremeMax,
color: colors.probability0_1p,
datasetPath: `${valueDatasetPath}-0-1p` as any,
},
{
title: `0.5%`,
color: colors.extremeMiddle,
color: colors.probability0_5p,
datasetPath: `${valueDatasetPath}-0-5p` as any,
},
{
title: `1%`,
color: colors.extremeMin,
color: colors.probability1p,
datasetPath: `${valueDatasetPath}-1p` as any,
},
],

View File

@@ -306,9 +306,9 @@ export const colors = {
momentumGreen: green,
momentumYellow: yellow,
momentumRed: red,
extremeMax: red,
extremeMiddle: orange,
extremeMin: yellow,
probability0_1p: red,
probability0_5p: orange,
probability1p: yellow,
year_2009: yellow,
year_2010: yellow,
year_2011: yellow,