Analyze Real-time Polygon Blockchain Data with Google BigQuery

Hosted by Google Cloud as a financial services public dataset, the Polygon blockchain dataset has been listed in the Google Cloud Marketplace, and can be found here.

Polygon aims to serve as an internet-of-blockchains for Ethereum, bringing massive scale to Ethereum via the Polygon SDK, supporting both standalone blockchains and secured blockchains.

This dataset is part of a larger effort to make cryptocurrency data available in Google BigQuery through the Google Cloud Public Datasets program. The program is hosting a number of real-time cryptocurrency datasets, with plans to expand offerings to include additional distributed ledgers. You can find these datasets by searching for “crypto” in the GCP Marketplace. For analytics interoperability, Google has designed a unified schema that allows all Bitcoin-like datasets to share queries.

This public dataset is hosted in Google BigQuery and is included in BigQuery’s 1TB/mo of free tier processing. This means that each user receives 1TB of free BigQuery processing every month, which can be used to run queries on this public dataset. Watch this short video to learn how to get started quickly using BigQuery to access public datasets.

What is BigQuery?

Google BigQuery makes it simple to query on-chain data in a simple, organized manner on the cloud using standard SQL syntax. You can think of it like a massive indexer that allows you to perform powerful data analysis. You are also able to perform the same or similar queries on multiple blockchains at once and compare them, or track cross-chain activity on interoperable tokens.

Some possibilities unlocked using Google BigQuery on the Polygon Dataset include the ability to:

  • Monitor gas costs over time
  • Monitor a smart contract’s calls and activity
  • Multi-Chain Analysis for SDKs like the Polygon SDK
  • Integrate with traditional financial record processing systems
  • Determine the most active/popular tokens, contracts, or applications on Polygon
  • Audit groups of transactions

Sample Queries to get started with Polygon Data on BigQuery:

  1. You can find out the number of active addresses on Polygon by running this simple query.
# Calculate Active Monthly EOA's from Polygon Transactions
#standardSQL
SELECT
DATE(TIMESTAMP_TRUNC(block_timestamp, MONTH, "UTC")) AS month,
COUNT(DISTINCT from_address) AS active_addresses
FROM `public-data-finance.crypto_polygon.transactions`
GROUP BY month
ORDER BY month DESC

After running the query, you will get the results which can then be exported as CSV/to Google Sheets for further analysis. You can also proceed to use Google Data Studio to generate interactive visualizations based on this data, by clicking on the ‘Explore Data’ button.

Using Google Data Studio to Visualize Query Results

Blockchain analytics platform Nansenalready built a Polygon dashboard that you can check out here.

Example of using BigQuery for Polygon Datasets

Interested in learning more about how the data from these blockchains were brought into BigQuery? Looking for more ways to analyze the data? Check out the Google Cloud Big Data blog post and try the sample queries to get started.

Who made this happen?

It has been a pleasure to work with Helix TechnologiesNansen, and the Google Cloud Developer Relations team on this project.

We look forward to seeing how the vibrant developer community at Polygon uses this powerful platform to bring further utility to their Dapps!

Other relevant links:

About Polygon

Polygon is the first well-structured, easy-to-use platform for Ethereum scaling and infrastructure development. Its core component is Polygon SDK, a modular, flexible framework that supports building and connectingSecured Chains like Plasma, Optimistic Rollups, zkRollups, Validium etc and Standalone Chains like Polygon POS, designed for flexibility and independence. Polygon’s scaling solutions have seen widespread adoption with 350+ Dapps, ~121M txns and ~1M+ unique users.

If you’re an Ethereum Developer, you’re already a Polygon developer! Leverage Polygon’s fast and secure txns for your Dapp, get started here.

More from the Polygon Blog
EY and Polygon to co-develop Ethereum scaling solutions for enterprises and launch Polygon Nightfall - a privacy-focused Rollup

EY, a global professional services and technology firm, is collaborating with Polygon on building and implementing scaling and enterprise solutions for the Ethereum ecosystem. As part of this collaboration, EY and Polygon will work on Polygon Nightfall, a public, privacy-focused Rollup. In addition to this, EY will offer its other flagship blockchain products on Polygon […]

Read More
Polygon: First Scaling Solution for Coinbase

The Protocol team was recently established at Coinbase to work on scaling Ethereum through integration with L2 and other ETH scaling solutions. The Coinbase team plans to integrate Polygon PoS as their first scaling solution for Coinbase. The Coinbase Protocol team is an experienced group of engineers at Coinbase focused on contributing to scaling blockchains and […]

Read More
Hermez Network is Joining Polygon and Becoming Polygon Hermez via the First Full-Blown Merger of Two Blockchain Networks

We are proud and excited to announce that Hermez, one of the most prominent zero-knowledge (ZK) cryptography-based scaling projects and teams, will be joining Polygon. Starting today, we will initiate the process of merging Hermez into the Polygon ecosystem, where it will be operating under the new name: Polygon Hermez. Polygon Hermez will become a part of […]

Read More
Polygon Presents BUIDL IT - India’s largest Web3 Hackathon !

Polygon is the biggest crypto project to be born out of India and is today one of the most adopted blockchains in the world. The project is very popular with developers and users alike, with 1200+ Dapps deployed and the highest daily active user count in the web3verse..   To further promote Web3 technology and culture […]

Read More
Amun Launches PECO Index Token Providing Exposure to Top Polygon Projects

Now there’s an easy and low-cost way to gain exposure to top Polygon-native projects, including Quickswap, DFYN, and Aavegotchi, via a single token Amun, a leader in DeFi index products, today announces the launch of the Polygon Ecosystem Index (PECO) token. Available through the Amun Platform, the PECO token is an index of the top […]

Read More
Growth of Polygon Developer Ecosystem Explosive, Alchemy Data Shows

We have covered the pace of growth of the Polygon ecosystem with blogs such as  OpenSea, and our Polygon User in Numbers. Today, we will look at the overall growth of the Polygon developer ecosystem.  Alchemy, a leading blockchain developer platform, is able to take a birdseye view on teams building on a number of […]

Read More
crossmenuchevron-down-circle