Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Science for Web3

You're reading from  Data Science for Web3

Product type Book
Published in Dec 2023
Publisher Packt
ISBN-13 9781837637546
Pages 344 pages
Edition 1st Edition
Languages
Author (1):
Gabriela Castillo Areco Gabriela Castillo Areco
Profile icon Gabriela Castillo Areco

Table of Contents (23) Chapters

Preface Part 1 Web3 Data Analysis Basics
Chapter 1: Where Data and Web3 Meet Chapter 2: Working with On-Chain Data Chapter 3: Working with Off-Chain Data Chapter 4: Exploring the Digital Uniqueness of NFTs – Games, Art, and Identity Chapter 5: Exploring Analytics on DeFi Part 2 Web3 Machine Learning Cases
Chapter 6: Preparing and Exploring Our Data Chapter 7: A Primer on Machine Learning and Deep Learning Chapter 8: Sentiment Analysis – NLP and Crypto News Chapter 9: Generative Art for NFTs Chapter 10: A Primer on Security and Fraud Detection Chapter 11: Price Prediction with Time Series Chapter 12: Marketing Discovery with Graphs Part 3 Appendix
Chapter 13: Building Experience with Crypto Data – BUIDL Chapter 14: Interviews with Web3 Data Leaders Index Other Books You May Enjoy Appendix 1
Appendix 2
Appendix 3

Marketing Discovery with Graphs

Data has played a pivotal role in marketing, empowering decision-making, and optimizing resource allocation for impactful campaigns. However, the inherent pseudonymity and complexities of blockchain data pose challenges for marketing teams where extracting maximum value is, in many cases, an ongoing opportunity.

One of the main applications that’s used by marketing teams is clustering, which involves organizing groups with shared interests for customer segmentation. This technique was very successful primarily in social networks, facilitating recommendation systems for products and fostering new connections.

Similar to social networks, blockchain data, with its wealth of transactions, holds immense potential to deduce preferences from a few interactions. Label classification is another valuable use case, allowing marketing teams to identify and target communities within the blockchain effectively. By discerning communities, data scientists...

Technical requirements

In this chapter, we will utilize the networkx library, a Python library that’s used for working with networks or graphs. It offers a range of tools and functions for creating, manipulating, and analyzing networks. This library facilitates node creation, adding information, and providing algorithms for analyzing and exploring networks, such as finding the shortest paths, calculating centrality measures, and detecting communities.

If you have not worked with networkx before, it can be installed using the following code snippet:

pip install networkx

The documentation for networkx can be found at https://networkx.org/documentation/stable/index.html.

We will also use Gephi, a free open source tool for graph plotting. Gephi is a user-friendly tool that’s designed for visualizing and exploring graphs and networks. It assists users in gaining insights and analyzing complex relationships within graph data.

With Gephi, we can import data from...

A primer on graphs

According to Innar Liiv, “Network science, sometimes considered a subfield of data science and sometimes an independent academic field, is a set of techniques, methods, and tools to study patterns in networked structures.” An example of a network is the image of the London underground map:

Figure 12.1 – An overview of Beck’s design for the London underground map (source: https://en.wikipedia.org/wiki/File:Beck_Map_1933.jpg found under fair use)

Figure 12.1 – An overview of Beck’s design for the London underground map (source: https://en.wikipedia.org/wiki/File:Beck_Map_1933.jpg found under fair use)

In our exploration of networks and graphs, we will use these terms interchangeably.

The study of networks has gained significant interest in recent years due to their ability to explain relationships between entities simply. As explained by Professor Matías Avila, “A network, also called a graph in the mathematical literature, is a collection of nodes where some pairs are connected by edges.

In this primer, we will explore fundamental concepts...

The dataset

The dataset comprises a series of transactions with destinations set to Binance or OpenSea. These entities are served by multiple addresses, and for the sake of simplicity, we have selected one among the many associated with them.

The Binance 14 address (0x28c6c06298d514db089934071355e5743bf21d60) represents a Binance hot wallet that is used to facilitate the connection between the centralized exchange and Ethereum. The funds in this wallet serve deposits and withdrawals outside of Binance.

On the other hand, the address for OpenSea, specifically Wyvern Exchange v2 (0x7f268357a8c2552623316e2562d90e642bb538e5), corresponds to the marketplace contract for OpenSea.

To replicate this dataset using Flipside, we can use the following query:

sql =SELECT from_address, to_address, tx_hash
FROM ethereum.core.fact_transactions
WHERE block_timestamp >= '2023-01-01T00:00:00.000Z'
  and   block_timestamp <= '2023-06-01T00:00:00...

Summary

In conclusion, this chapter delved into the fundamentals of graph networks, exploring various aspects such as node features, graph types, and their significance in data analysis. By understanding these foundational concepts, we laid the groundwork for further exploration and analysis of complex networks.

Expanding on this knowledge, we explored the characteristics of influential nodes within a graph formed by the interactions between two distinct communities --one centralized, such as Binance, and the other decentralized, such as OpenSea.

Marketing solutions are crucial in this stage of the Web3 economy. Companies such as Spindl are actively building tools to bridge the information and granularity gap between the Web2 and Web3 worlds. To achieve this, they are concentrating on attribution mechanisms that measure the actual impact of advertising on the protocols. Once attribution is achieved, it is needed to identify communities to target with campaigns. To aid this objective...

Further reading

To learn more about the topics that were covered in this chapter, take a look at the following resources:

  • Stamile, C., Marzullo, A., and Deusebio, E. (2021). Graph Machine Learning: Take graph data to the next level by applying machine learning techniques and algorithms. Packt Publishing.
  • Liiv, I. (2021). Data Science Techniques for Cryptocurrency Blockchains. Springer.
  • Spindl. (n.d.). Introduction: https://docs.spindl.xyz/spindl/overview/introduction.
lock icon The rest of the chapter is locked
You have been reading a chapter from
Data Science for Web3
Published in: Dec 2023 Publisher: Packt ISBN-13: 9781837637546
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}