Blockchain Data Science and Metabase

Why use Metabase for blockchain analytics?

Here at Anyblock Analytics, we choose Metabase as our primary blockchain visualization tool because it enables business users to answer their questions themselves, rather to wait for precious developer time. This is possible because of the simple Metabase point and click editor so that no SQL query language needs to be used (but it can).

The other great feature is the ease of sharing Metabase blockchain dashboards publicly or with the respective shareholders. The link to do so is generated with two clicks and the graphs can just as easily be embedded into websites or users’ internal applications.

What is Metabase in general?

“Metabase is an open source business intelligence tool. It lets you ask questions about your data, and displays answers in formats that make sense, whether that’s a bar graph or a detailed table.
Your questions can be saved for later, making it easy to come back to them, or you can group questions into great looking dashboards. Metabase also makes it easy to share questions and dashboards with the rest of your team.”

Source: Metabase Website

How to create a Metabase blockchain dashboard?

  1. Start: Ask a question

2. Choose the way of asking your question

  • Simple question is meant for simple requests of data (generally not really helpful with our blockchain data model)
  • Customized questions are recommended if you want to easily filter and summarize your data (recommended for beginners / business users)
  • Native Queries has to be written in SQL which requires at least basic knowledge in that language (recommended for advanced users / developers

3. Pick your “starting data” (meaning to choose our supported blockchain as the source, see our list of networks on our Network Status Page)

Hint: It is also possible to pick previous questions as data for your next question (Find them here: “Saved questions”)

4. Now you can start to filter, summarize and sort your data (the following screenshot shows the editor for customized question)

5. After you’ve picked your data, you are now able to visualize the results

6. Configure your visualization in different formats

Example: Blockchain analytics to create Metabase dashboard for The Energy Origin — TEO

At the beginning it is essential to be aware of

  • what are the objectives of your dashboard,
  • what you will require to build your dashboard,
  • and how you will achieve these objectives.

The goal of the TEO dashboard was to provide a visualization of the events happening on the TEO smart contract and to analyze them as detailed as possible without knowing the source code or any documentation. General information about the project is available on the website of The Energy Origin — TEO.

The first step is to determine the blockchain on which the project runs. TEO uses the Energy Web Chain (EWC) of the Energy Web Foundation. The EWC is one of over 22 different blockchain in the Anyblock Index, which contains many public blockchains but is also available for enterprise consortia blockchains such as this one.

After the address of TEO had been identified, it is necessary to find out if the ABI for this address is available, as this represents the only way to be able to see what is happening. The Anyblock Index uses the contract’s ABI to translate the hexadecimal raw blockchain data into human-readable event names and formats numbers with the right decimal format.

Once the two requirements, address and ABI, are in place, all events taking place on TEO can now be analyzed and visualized.

This custom question leads to the following diagram by visualizing the out coming data.

After this time-series chart of all events is done, two fundamental questions immediately come to mind: What do these events represent and who are the addresses which are executing these events?

To answer this question, the next challenge is: How can the individual events be analyzed? This required decrypting the individual certificates of the events, which was only possible as a SQL question, as the parameters are saved in an array in our SQL blockchain data model:

Using this query, it was now possible to filter the number of unique addresses per event via Metabase. For example, it was possible to identify the unique addresses that send out events on TEO.

Finally, all events are shown in a time-series stacked line chart, and also the unique addresses behind the different events are displayed on the dashboard. The viewer is therefore provided with aggregated information about the entire time-span of the smart contract activity, and an additional table about the latest events on TEO provides real-time monitoring capabilities.

Link to the continuously updated online dashboard.

Our dashboards can just as easily include the possibility to drill-down on the data with filters.

This enables for example to limit the data shown in the dashboard to a certain interval of dates, show the activities of individual user addresses or check the status of certain transactions. You can find some examples for our interactive dashboards on our website.

We hope you found this little tutorial on blockchain data science with Metabase useful.

If you have any questions about blockchain analytics and data science in general, want to exchange some tricks working with Metabase or would like insights into a particular smart contract — we’d love to hear from you!

Interested or questions?

Freddy Zwanzger
+49 6131 3272372

Follow us:
Twitter, LinkedIn,
Medium, YouTube

Originally published at on May 4, 2020.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store