https://www.rickydata-indexer.com/tools/qos-subgraph-data-download
![image](https://private-user-images.githubusercontent.com/183191692/399763472-74adf48b-3f04-42b8-93f3-75cf1cb4dbfe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzE4OTksIm5iZiI6MTczOTIzMTU5OSwicGF0aCI6Ii8xODMxOTE2OTIvMzk5NzYzNDcyLTc0YWRmNDhiLTNmMDQtNDJiOC05M2YzLTc1Y2YxY2I0ZGJmZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQyMzUzMTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYmU5YTc4MTlkOTUwYTBlZjc1NjJjMTFkOTFlZjE3OTA0MDMwYTg2ODczODlkOWU1ZTU4NjMzN2RmNGY5NjI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Laf2DuL_DwFJLu5dsN1v4n5PnT6_MNO3eHKwNeKCd5A)
An interactive R Shiny dashboard that visualizes query volume data from The Graph Protocol's QoS subgraph. The dashboard provides insights into subgraph usage patterns, query volumes, and performance metrics across different chains.
- Real-time data fetching from The Graph's QoS subgraph
- Interactive visualizations using Plotly
- Multiple views including:
- Top subgraphs by query volume
- Query volume trends over time
- Chain-specific analytics
- Raw data access with export capabilities
- Filtering capabilities by chain ID
- Auto-refreshing data cache (30-minute intervals)
- R (>= 4.0.0)
- RStudio (recommended for running R Markdown files)
- Required R packages:
- flexdashboard
- shiny
- dplyr
- ggplot2
- DT
- lubridate
- plotly
- scales
- pins
- httr
- jsonlite
- Clone this repository:
git clone https://github.com/yourusername/subgraph_query_volume.git
cd subgraph_query_volume
- Install required R packages:
install.packages(c(
"flexdashboard",
"shiny",
"dplyr",
"ggplot2",
"DT",
"lubridate",
"plotly",
"scales",
"pins",
"httr",
"jsonlite"
))
-
Get an API key from The Graph:
- Visit The Graph's website
- Create an account or log in
- Navigate to your dashboard
- Generate an API key
-
Set up your environment:
- Create a
.Renviron
file in your home directory:echo "THEGRAPH_API_KEY=your_api_key_here" >> ~/.Renviron
- Restart R/RStudio for the environment variable to take effect
- Create a
- Open the
download_dashboard.Rmd
file in RStudio - Click "Run Document" or use the keyboard shortcut (Ctrl+Shift+K on Windows/Linux, Cmd+Shift+K on macOS)
- The dashboard will open in a new window or your default browser
The dashboard will automatically:
- Check for existing data in
subgraph_data.csv
- Fetch new data if the existing data is older than 30 minutes
- Display interactive visualizations and data tables
The dashboard caches data in a CSV file (subgraph_data.csv
) to improve performance and reduce API calls. This file is automatically:
- Created on first run
- Updated when data is older than 30 minutes
- Excluded from git tracking (via .gitignore)
Contributions are welcome! Please feel free to submit a Pull Request.