diff --git a/src/data/daily_metrics.csv.sh b/src/data/daily_metrics.csv.sh index 79a552a..2420854 100644 --- a/src/data/daily_metrics.csv.sh +++ b/src/data/daily_metrics.csv.sh @@ -9,5 +9,6 @@ COPY ( providers_with_active_deals, providers_with_power, FROM read_parquet('https://data.filecoindataportal.xyz/filecoin_daily_metrics.parquet') + WHERE date >= CURRENT_DATE() - INTERVAL '30 days' ) TO STDOUT (FORMAT 'CSV'); EOF diff --git a/src/index.md b/src/index.md index 2fa6262..e14bdb6 100644 --- a/src/index.md +++ b/src/index.md @@ -14,26 +14,67 @@ const daily_metrics = FileAttachment("data/daily_metrics.csv").csv({typed: true}
-

Unique Deal Making Providers

- ```js - Plot.lineY(daily_metrics, {x: "date", y: "unique_deal_making_providers"}).plot({y: {grid: true}}) + resize((width) => Plot.plot({ + title: "Deal Making Providers", + subtitle: "How many providers are making deals.", + x: {label: "Date"}, + y: {grid: true, label: "Providers"}, + width, + marks: [ + Plot.ruleY([0]), + Plot.lineY(daily_metrics, { + x: "date", + y: "unique_deal_making_providers", + tip: true + }) + ] + })) ```
-

Providers With Active Deals

+
```js - Plot.lineY(daily_metrics, {x: "date", y: "providers_with_active_deals"}).plot({y: {grid: true}}) + resize((width) => Plot.plot({ + title: "Providers With Active Deals", + subtitle: "How many providers have active deals.", + x: { label: "Date" }, + y: { grid: true, label: "Providers", zero: true }, + width, + marks: [ + Plot.ruleY([0]), + Plot.lineY(daily_metrics, { + x: "date", + y: "providers_with_active_deals", + tip: true + }) + ] + })) ```
-

Providers With Power

+ +
```js - Plot.lineY(daily_metrics, {x: "date", y: "providers_with_power"}).plot({y: {grid: true}}) + resize((width) => Plot.plot({ + title: "Providers With Power", + subtitle: "How many providers are with power.", + x: { label: "Date" }, + y: { grid: true, label: "Providers", zero: true }, + width, + marks: [ + Plot.ruleY([0]), + Plot.lineY(daily_metrics, { + x: "date", + y: "providers_with_power", + tip: true + }) + ] + })) ```