mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 23:29:58 -07:00
app: add address size in sidebar when needed
This commit is contained in:
@@ -2,17 +2,19 @@ export const addressCohortsBySize = [
|
||||
{
|
||||
key: "plankton",
|
||||
name: "Plankton",
|
||||
size: "1 sat to 0.1 BTC",
|
||||
},
|
||||
{
|
||||
key: "shrimp",
|
||||
name: "Shrimp",
|
||||
size: "0.1 sat to 1 BTC",
|
||||
},
|
||||
{ key: "crab", name: "Crab" },
|
||||
{ key: "fish", name: "Fish" },
|
||||
{ key: "shark", name: "Shark" },
|
||||
{ key: "whale", name: "Whale" },
|
||||
{ key: "humpback", name: "Humpback" },
|
||||
{ key: "megalodon", name: "Megalodon" },
|
||||
{ key: "crab", name: "Crab", size: "1 BTC to 10 BTC" },
|
||||
{ key: "fish", name: "Fish", size: "10 BTC to 100 BTC" },
|
||||
{ key: "shark", name: "Shark", size: "100 BTC to 1000 BTC" },
|
||||
{ key: "whale", name: "Whale", size: "1000 BTC to 10 000 BTC" },
|
||||
{ key: "humpback", name: "Humpback", size: "10 000 BTC to 100 000 BTC" },
|
||||
{ key: "megalodon", name: "Megalodon", size: "More than 100 000 BTC" },
|
||||
] as const;
|
||||
|
||||
export const addressCohortsByType = [
|
||||
|
||||
@@ -68,11 +68,12 @@ export function createPresets(scale: ResourceScale): PartialPresetFolder {
|
||||
},
|
||||
{
|
||||
name: "By Size",
|
||||
tree: addressCohortsBySize.map(({ key, name }) =>
|
||||
tree: addressCohortsBySize.map(({ key, name, size }) =>
|
||||
createAddressPresetFolder({
|
||||
scale,
|
||||
color: colors[key],
|
||||
name,
|
||||
filenameAddon: size,
|
||||
datasetId: key,
|
||||
}),
|
||||
),
|
||||
@@ -97,15 +98,17 @@ function createAddressPresetFolder({
|
||||
scale,
|
||||
color,
|
||||
name,
|
||||
filenameAddon,
|
||||
datasetId,
|
||||
}: {
|
||||
scale: ResourceScale;
|
||||
name: string;
|
||||
filenameAddon?: string;
|
||||
datasetId: AddressCohortId;
|
||||
color: Color;
|
||||
}): PartialPresetFolder {
|
||||
return {
|
||||
name,
|
||||
name: filenameAddon ? `${name} - ${filenameAddon}` : name,
|
||||
tree: [
|
||||
createAddressCountPreset({ scale, name, datasetId, color }),
|
||||
...createCohortPresetList({
|
||||
|
||||
@@ -1,22 +1,6 @@
|
||||
// import {
|
||||
// applyMultipleSeries,
|
||||
// colors,
|
||||
// createMomentumPresetFolder,
|
||||
// SeriesType,
|
||||
// } from "/src/scripts";
|
||||
|
||||
import { colors } from "../../utils/colors";
|
||||
import { SeriesType } from "../enums";
|
||||
|
||||
// // type HeightRatioKey =
|
||||
// // | `${AnyPossibleCohortKey}RealizedPrice`
|
||||
// // | "activePrice"
|
||||
// // | "vaultedPrice"
|
||||
// // | "trueMarketMean";
|
||||
|
||||
// // // type DateRatioKey = HeightRatioKey;
|
||||
// // type DateRatioKey = HeightRatioKey | `price${AverageName}MA`;
|
||||
|
||||
export function createRatioFolder({
|
||||
scale,
|
||||
color,
|
||||
@@ -83,25 +67,22 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `1Y`,
|
||||
color: colors._1y,
|
||||
datasetPath: `${ratioDatasetPath}-1y-sma`,
|
||||
datasetPath: `${ratioDatasetPath}-1y-sma` as any,
|
||||
},
|
||||
{
|
||||
title: `1M`,
|
||||
color: colors._1m,
|
||||
datasetPath: `${ratioDatasetPath}-1m-sma`,
|
||||
datasetPath: `${ratioDatasetPath}-1m-sma` as any,
|
||||
},
|
||||
{
|
||||
title: `1W`,
|
||||
color: colors._1w,
|
||||
datasetPath: `${ratioDatasetPath}-1w-sma`,
|
||||
datasetPath: `${ratioDatasetPath}-1w-sma` as any,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
datasetPath: ratioDatasetPath as any,
|
||||
},
|
||||
{
|
||||
title: `Even`,
|
||||
@@ -131,7 +112,8 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `Momentum`,
|
||||
seriesType: SeriesType.Based,
|
||||
datasetPath: `${ratioDatasetPath}-1y-sma-momentum-oscillator`,
|
||||
datasetPath:
|
||||
`${ratioDatasetPath}-1y-sma-momentum-oscillator` as any,
|
||||
},
|
||||
{
|
||||
title: `Base`,
|
||||
@@ -161,25 +143,22 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${ratioDatasetPath}-99-9p`,
|
||||
datasetPath: `${ratioDatasetPath}-99-9p` as any,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${ratioDatasetPath}-99-5p`,
|
||||
datasetPath: `${ratioDatasetPath}-99-5p` as any,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${ratioDatasetPath}-99p`,
|
||||
datasetPath: `${ratioDatasetPath}-99p` as any,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -200,25 +179,22 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `1%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${ratioDatasetPath}-1p`,
|
||||
datasetPath: `${ratioDatasetPath}-1p` as any,
|
||||
},
|
||||
{
|
||||
title: `0.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${ratioDatasetPath}-0-5p`,
|
||||
datasetPath: `${ratioDatasetPath}-0-5p` as any,
|
||||
},
|
||||
{
|
||||
title: `0.1%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${ratioDatasetPath}-0-1p`,
|
||||
datasetPath: `${ratioDatasetPath}-0-1p` as any,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -232,17 +208,17 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${valueDatasetPath}-99-9p`,
|
||||
datasetPath: `${valueDatasetPath}-99-9p` as any,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${valueDatasetPath}-99-5p`,
|
||||
datasetPath: `${valueDatasetPath}-99-5p` as any,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${valueDatasetPath}-99p`,
|
||||
datasetPath: `${valueDatasetPath}-99p` as any,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -256,17 +232,17 @@ export function createRatioFolder({
|
||||
{
|
||||
title: `0.1%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${valueDatasetPath}-0-1p`,
|
||||
datasetPath: `${valueDatasetPath}-0-1p` as any,
|
||||
},
|
||||
{
|
||||
title: `0.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${valueDatasetPath}-0-5p`,
|
||||
datasetPath: `${valueDatasetPath}-0-5p` as any,
|
||||
},
|
||||
{
|
||||
title: `1%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${valueDatasetPath}-1p`,
|
||||
datasetPath: `${valueDatasetPath}-1p` as any,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user