- What is a Subgraph?
- Filter Groups
- Account Lists
What is a Subgraph?
The subgraph component provides a mechanism to pull data into the Graph Visualization. There are two main ways of selecting data - Filter Groups and Account Lists. Finally, we provide Display options that let you customize what data has been selected and specify a Timeframe across which to pull the data.
Let’s get started with Filter Groups!
The Configure Filters panel provides an interface for creating Filter Groups. The purpose of filter groups are to specify parameters to pull data into the Subgraph. There are two main types of parameters - account and transaction - and several subtypes to select from.
There are two options for filtering data - a range slider and a text entry.
The Range slider finds all data that falls within the dark purple are on the slider. For instance, in the above example, the Range slider would select for all accounts with Algo Holdins between 200 and 800.
The Text entry allows you to isolate accounts with specific values. In the above example, this would be selecting for accounts with an ASA Holdings of 200, 500, 800, and 1000. In this case, ASA Holdings refers to the specific token balance being analyzed.
Multiple Filter Groups
Each Filter Group works by finding the overlap between the different selected features. For instance, if you had an Algo Holdings range filter setup for all values between [200, 800] and you had a Unique Tokens text filter setup for 10 and 20, then the Subgraph would identify accounts that have and algo balance between between [200, 800] AND have 10 or 20 unique tokens. The same logic applies for the transaction parameters with the difference being that these parameters act on transaction data.
Finally, you are allowed to create as many Filter Groups as you would like. Each Filter Group pulls in a different set of data, therefore you do not have to worry about any filter logic in one group affecting filter logic in another group. In query terms, each Filter Group represents an AND operation between the different parameters, while the combination of Filter Groups represents an OR operation.
Filter Group Parameters
|ASA Holdings||Account||The total amount of token holdings a given account has. For instance, if you’re analyzing the BirdBot network, token amount would be in BIRDS|
|Algo Holdings||Account||The total amount of algorand holdings a given account has.|
|Account Age||Account||The age of the account in days.|
|Degree||Account||The number of unique neighbors the account has transacted with.|
|Unique Tokens||Account||The total number of unique tokens an account has. For instance, if the account holds BIRDS and SMILE, it would have 2 unique tokens.|
|Transaction Amount||Transaction||The total amount transacted for between accounts within a given block.|
|Num Transactions||Transaction||The total number of transactions between accounts within a given block.|
|Min Round||Transaction||The first round during which two accounts transacted.|
|Max Round||Transaction||The last round during which two accounts transacted.|
The Show Accounts panel provides the option for selecting data based on specific accounts using Account Lists. There are two ways of adding lists:
- You can create Global Account Lists using the panel on the right in the main view (you can read more about how to do this in the Account List section) OR
- You can directly upload your Account Lists into the Show Accounts panel by selecting the upload button.
At its core, an Account List is just a list of account addresses. You can activate the lists by dragging them into the Visible Account Lists section.
In the above example, the following lists would be added to the Subgraph - Bird - AirDrop, Headline - Users, and Smile - Fraudsters.
You can additionally specify a color for the accounts in the list. For instance, the Bird - AirDrops accounts whill appear green in the Subgraph. You can change the color by selecting the icon and using the color picker as demonstrated below.
In addition to adding accounts to the Subgraph, you can also add neighbors of accounts to the Subgraph by adjusting the Neighbor Degrees slider. Setting the slider to 1st Degree pulls in all accounts that have transacted with the accounts specified in your Visible Account Lists. Setting the slider to 2nd Degree pulls in all accounts that have transacted with the specified accounts and their neighbors.
For instance, if Account A sent a transaction to Account B which sent a transaction to Account C, then Account B would be considered a 1st Degree account and Account C would be considered a 2nd Degree account.
In addition to specifying the degree, you can also specify the color of these accounts. For instance, in the above example, all 1st Degree accounts would appear orange, while all 2nd Degree accounts would appear blue.
The Apply Filter toggle allows for you to apply the Filter Groups you created in the Configure Filters panel to the neighbors pulled into the graph. For instance, suppose you created a Filter Group specifying Transaction Amount between [5, 100], then the neighbors that get added to the graph will have particpated in a transaction with an amount within that range.
We will discuss more details about Account Lists in its own section!
The Customize Display panel provides methods for further refining data added to the Subgraph by Filter Groups and Account Lists. There are two main methods for doing this - Display Options and Display Time Frame.
There are three different Display Options to select from: Include Algo Transactions, Hide Graph Floaters, and Hide Liquidity Pools.
|Include Algo Transactions||Specified whether to include Algorand Transactions in addition to the Default Token transactions.|
|Hide Graph Floaters||A graph floater is defined an account that has no edges within the Subgraph. Selecting this option will hide these accounts from the visualization.|
|Hide Liquidity Pools||We have a growing list of identified Liquidity pools. These accounts tend to congest the graph visualization. Selecting this option will hide these accounts from the visualization.|
Display Time Frame
The Display Time Frame component allows for you to select time frame across which to pull the transaction data. There are three different types of time frames: Pre-defined Window, Custom Window, and Custom Range. Details of each are specified below.
|Previous Day||A sliding window that will pull in all transaction data across the previous day.|
|Previous Week||A sliding window that will pull in all transaction data across the previous week.|
|Previous Month||A sliding window that will pull in all transaction data across the previous month.|
|Previous Year||A sliding window that will pull in all transaction data across the previous year.|
|Custom Range||Allows you to specify specific dates across which to pull the transaction data.|
|Custom Window||Allows you to specify a specific sliding window. For when the pre-defined windows don’t fit the specific need.|
This wraps up the Subgraph overview. Continue on to learn more about each individual component!