Skip to content

Commit

Permalink
feat: ✨ add dynamic paths and provider metrics
Browse files Browse the repository at this point in the history
- Integrated duckdb-async to fetch active provider IDs, generating dynamic paths for each.
- Updated config to include these dynamic paths.
- Added new scripts and markdown files to visualize provider metrics with plots.
- Enhanced package.json and package-lock.json with new duckdb-async dependency.
- Configured a bash script using DuckDB SQL for provider metrics extraction.
  • Loading branch information
davidgasquez committed Oct 22, 2024
1 parent a66c5c2 commit d8f034d
Show file tree
Hide file tree
Showing 5 changed files with 1,590 additions and 51 deletions.
14 changes: 14 additions & 0 deletions observablehq.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// https://observablehq.com/framework/config

import { Database } from "duckdb-async";


const db = await Database.create(":memory:");
const rows = await db.all(`
select
distinct(provider_id)
from read_parquet('https://data.filecoindataportal.xyz/filecoin_storage_providers.parquet')
where total_active_deals > 0
`);

const providerPaths = rows.map(row => `/provider/${row.provider_id}`);

export default {
title: "Filecoin Storage Providers Market",
head: '<link rel="icon" href="logo.png" type="image/png" sizes="32x32">',
Expand All @@ -12,4 +25,5 @@ export default {
sidebar: false,
toc: false,
pager: false,
dynamicPaths: providerPaths
};
Loading

0 comments on commit d8f034d

Please sign in to comment.