Getting Started with Dune Analytics: First Dashboard
Dune Analytics is a powerful, community-driven platform for querying, visualizing, and sharing blockchain data. Whether you’re a data analyst, developer, researcher, or crypto-enthusiast, Dune allows you to transform raw on-chain events into compelling dashboards in minutes. This extensive guide walks you through the entire process of setting up your first dashboard, from account creation to publishing and best practices.
1. Prepare Your Environment
1.1 Create a Dune Account
- Visit dune.com.
- Sign in with GitHub, Discord, or email. A free tier is available for public dashboards.
- Verify your email and explore the Dune Documentation.
1.2 Understand the Data Schema
Dune’s public schemas expose tables for Ethereum, Polygon, Optimism, and more. Before querying, review the schema explorer on the Dune UI or consult the official docs:
(Schemas Overview).
| Network | Key Tables |
|---|---|
| Ethereum | blocks, transactions, erc20.logs, erc721.token_transfers |
| Polygon | blocks, transactions, erc20.transfers |
| Optimism | blocks, transactions, optimistic.messages |
2. Writing Your First Query
2.1 Use the Query Editor
In the Dune interface, click New Query. The editor supports PostgreSQL-flavored SQL. Start with a simple query to count daily transactions:
-- Daily Ethereum Transactions
SELECT
date_trunc(day, block_time) AS day,
COUNT() AS tx_count
FROM
ethereum.transactions
GROUP BY day
ORDER BY day
Click Run to preview results. Adjust LIMIT or filters as needed. You can explore more SQL examples.
3. Visualizing the Data
3.1 Chart Types
Select from line charts, bar charts, area charts, tables, maps, and custom Vega. For our daily transactions example:
- Choose Line Chart.
- Assign day to the X-axis and tx_count to the Y-axis.
- Customize colors and axis labels under Settings.
3.2 Styling Annotations
Use the styling panel to set line thickness, interpolation, and date ticks. Add annotations to highlight events such as fork upgrades or hard forks.
4. Building the Dashboard
4.1 Create and Arrange Panels
- Click New Dashboard and give it a meaningful title (e.g., “Ethereum Daily Activity”).
- Drag and drop your query results as panels.
- Resize and reposition for a clean, logical flow.
4.2 Add Text, Images, and Links
Provide context with text blocks. Embed images or logos by hosting them externally:
ltimg src=https://example.com/logo.png alt=My Project Logo style=height: 40pxgt
5. Publishing Sharing
Once your dashboard is complete, click Publish. On the free tier, dashboards are public. Paid plans allow private or team-restricted dashboards. Copy the shareable link or embed code:
ltiframe src=https://dune.com/your_dashboard/embed width=100% height=600 style=border: nonegtlt/iframegt
6. Best Practices Tips
- Cache Strategically: Use
__time_bucket()or caching hints to speed up expensive queries. - Modular Queries: Split complex logic into Common Table Expressions (
WITHclauses). - Reusability: Tag queries and reference them across dashboards.
- Documentation: Annotate SQL with comments and use text panels to explain methods.
- Community Channels: Engage on Dune Discord and follow @DuneAnalytics.
7. Further Resources
Embark on your data journey with Dune Analytics today. The blockchain never sleeps—and neither does the opportunity to uncover its stories.
Leave a Reply