-
Notifications
You must be signed in to change notification settings - Fork 0
/
observablehq.config.js
31 lines (26 loc) · 1.08 KB
/
observablehq.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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">',
root: "src",
theme: [
"parchment",
"dashboard"
],
style: "style.css",
header: ({ title, data, path }) => `<a href="/">🏠 Home</a> | <a href="/metrics">📈 Metrics</a> | <a href="/faq">❓ FAQ</a>`,
footer: ({ path }) => `Data used in this dashboard comes from the <a href="https://filecoindataportal.xyz/">Filecoin Data Portal</a>. <a href="https://github.com/filecoin-project/filecoin-storage-providers-market/blob/main/src${path}.md?plain=1">View Page Source</a>`,
sidebar: false,
toc: false,
pager: false,
dynamicPaths: providerPaths
};