Skip to content

pdiomede/subgraph-network-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Network Subgraph Metrics Dashboard

This Python project generates a dashboard and CSV report that show how many subgraphs are deployed per network on The Graph Network. It includes time-based metrics, daily snapshots, and a modern, responsive HTML interface.

Live Dashboard:
πŸ”— graphtools.pro/network

πŸ§ͺ This dashboard is part of Graph Tools Pro, a community-driven initiative to provide useful, independent analytics tools for The Graph ecosystem.


πŸ“Š Features

  • Daily fetch of subgraph counts per network
  • HTML dashboard with light/dark theme
  • CSV export of all network counts
  • 24-hour delta tracking (if yesterday’s snapshot exists)
  • Custom network logos
  • JSON snapshot stored daily with timestamp and counts
  • Full logs of script runs

πŸ“‚ Project Structure

πŸ“¦ network/

  • πŸ“œ fetch_network_metrics.py # Main script
  • πŸ“œ .env # Environment variables (not tracked)
  • πŸ“‚ logs/ # Timestamped log files
  • πŸ“‚ reports/
    • πŸ“œ index.html # Rendered dashboard
    • πŸ“œ network_subgraph_counts.csv # CSV report
  • πŸ“‚ metrics/ # JSON metric snapshots per day

πŸš€ How to Run

  1. Install dependencies: pip install requests python-dotenv

  2. Create a .env file: GRAPH_API_KEY=your_graph_api_key METRIC_SNAPSHOT_HOUR=8

  3. Run the script: python fetch_network_metrics.py

  4. Open reports/index.html in your browser to view the dashboard.

πŸ“Š Powered By

  • 🧠 The Graph
  • 🧩 Python 3.x, HTML5 + CSS
  • βš™οΈ Data sorting and light/dark theming via vanilla JavaScript