DataVisuals.XYZ
  1. Home
  2. Guides
  3. Network graphs of replies, reposts and mentions

X data

Network graphs of replies, reposts and mentions

How to build a readable network graph from X replies, reposts and mentions: what nodes and edges mean, sizing, communities, and how to untangle a hairball.

By DataVisuals TeamUpdated 5 min read

A network graph draws accounts as dots (nodes) and interactions as lines between them (edges). For X data, the edges are usually replies, reposts, quotes or mentions, and the picture answers questions a bar chart can't: who talks to whom, which groups form around a topic, and which accounts connect groups that otherwise wouldn't meet.

They are also the easiest chart to get wrong. Feed a few thousand interactions into a layout algorithm and you get a "hairball," a dense knot that looks impressive and says nothing. The useful version takes more decisions and less data.

Nodes, edges and what an edge means

Start by writing down, in one sentence, what an edge is. "A replied to B at least once in October" is a different network from "A reposted B" or "A mentioned B." Replies suggest conversation. Reposts suggest amplification, and they tend to form star shapes around a few big accounts. Mentions are a mix of both, plus a lot of noise from tagging.

Mixing edge types in one graph is rarely a good idea. If you must, use one color per type and keep it to two.

Then decide on direction and weight:

  • Direction: replies and reposts go from one account to another. Drawing arrows helps in small graphs and turns into clutter in large ones. Often it's enough to size nodes by incoming edges and skip the arrowheads.
  • Weight: count how many times each pair interacted and store it on the edge. Weight is what you will filter on later, and it can set line thickness.
AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTplYTJlZjk3ZC01NTcxLTQyMzYtODUwNi1mMDdjY2Q5ZjZjZTUAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaFlnBd3fgWu9k0ekx7VthRAAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpiYTRkNzk2YS1iZDU0LTRmNjgtODNlYy1k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ouAFBlue cluster: design accountsGreen cluster: data accountscoral = most repliesnode size = replies received
Fig. 1 A small reply network around one account. Node size shows replies received, edge thickness shows how often a pair interacted, and two clusters sit on either side.

Sizing nodes

Node size should encode one number, and the legend or caption should say which. Common choices:

  • Replies or mentions received (in-degree). Shows who draws attention.
  • Number of distinct accounts connected (degree). Shows who is broadly connected.
  • Betweenness, a measure of how often an account sits on the shortest path between others. Shows bridges between groups.

Follower count is tempting, but it says nothing about this network. A big account that never replied to anyone in your sample should not dominate the picture. Size by area, not radius, or the largest nodes will look far more important than they are.

Communities

Community detection algorithms (Louvain and Leiden are the usual ones) group nodes that connect more with each other than with the rest. Coloring nodes by community is often the most useful thing a network graph does: you can see that the replies to a product launch came from two separate crowds, say developers and designers, who barely interacted with each other.

Treat communities as a starting point. The algorithm doesn't know what the groups are; you name them by reading the accounts in each one. Keep the number of colors small (four or five at most) and fold tiny communities into a grey "other." The color guide explains why more categorical colors than that stop working.

Hairballs and how to simplify them

A network of 2,000 accounts and 10,000 edges will not be readable at any layout setting. The fix is to show less, deliberately, and say what you removed.

AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTowMGQ4NzFjOS0yNzI2LTRiMTUtOGVlMi02MDQ4NDgwYmRhYWYAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaH/i1jDUa1GgdrJ9wnzlFqoAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo0YmRhNDA5YS03MDI4LTRkOTgtYTBkNS0wZmEwNDg4NGEyODFscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAGSx5t/TJ605yCkR5MMhXFVjb1fCpy2Zf8BSaeK9MWzyFlsEgqHWq9qjdI8pdS0FgOoQitKr+q5ch37T+zH9yE=Filtering a hairball by edge weightAll 101 edgesHairballEdges of weight 3+ (26)36 accounts, three groups
Fig. 2 The same reply network twice. Keeping only pairs that interacted three or more times turns the tangle into three groups you can read.

Three filters do most of the work:

  • Filter by edge weight. Drop pairs that interacted only once. One-off replies are often noise, and removing them cuts most of the edges while keeping the structure.
  • Top-N nodes. Keep the 50 or 100 accounts with the most connections and drop the rest. Good for a "who matters in this conversation" view.
  • k-core. Keep only accounts with at least k connections inside the remaining network, repeating until nothing changes. A 3-core or 5-core strips away the loosely attached edge and leaves the densely connected center.

After filtering, remove isolated nodes, rerun the layout, and label the 10 or 15 most important accounts directly. Labels on every node turn into a second hairball.

Rule of thumb: if you can't name what a cluster is after looking at its top five accounts, the graph needs more filtering.

Layout

Force-directed layouts (ForceAtlas2, Fruchterman-Reingold) pull connected nodes together and push others apart. They are the default for social networks and work well once the graph is filtered. Keep in mind that position means only "close to the things it connects to"; the x and y axes have no meaning, so never add them.

Layouts are partly random. Run it a few times, and if you publish a series of graphs (say, one per month) fix the positions of recurring accounts so readers can compare.

Tools

Gephi is the common choice for exploring a network by hand. It is free, runs on the desktop, and has layout algorithms, community detection and filters built in. NetworkX, a Python library, is better when you want the process scripted and repeatable: build the graph from your data, compute weights, degrees, k-cores and communities, then export the result to Gephi or draw it with a plotting library. Both read and write the standard graph file formats, so mixing them is normal.

For a final published image, simple matters more than interactive. A static, labeled picture of the filtered network usually tells the story better than a zoomable hairball.

Getting the data

Reply, repost and mention networks need to know who interacted with whom, which a basic analytics export doesn't contain. The account's own analytics lists your posts and their totals; it doesn't list the accounts that replied. For network data, use the official X API, which returns posts with the IDs of the post or account they reply to, quote or mention. Access is paid and its rules change, so check the current terms and the limits on what you can store and publish.

Never scrape X to build a network. It breaks the platform's rules, and publishing a graph of named private accounts raises its own questions. For anything public, consider showing only accounts above a size threshold, or anonymizing the rest.

Checklist

Decision Write it down as
Edge meaning "A replied to B, October 1 to 31"
Edge weight Number of interactions per pair
Node size In-degree, degree or betweenness, named in the caption
Filter "Pairs with 3+ interactions, 5-core"
Colors Communities, four or five at most
Labels Top 10 to 15 accounts only

Questions

What tools can draw a network graph of X conversations?

Gephi is a free desktop application built for exploring and laying out networks. NetworkX is a Python library for building and analyzing them, often paired with Gephi or a plotting library for the final picture.

Where does the reply and mention data come from?

From the official X API, which returns posts with fields saying which post or account they reply to, quote or mention. Your own analytics export lists your posts but not who replied to them, so it is not enough for a network on its own.

How do I fix a graph that is just a tangle of lines?

Remove weak edges first, for example keeping only pairs that interacted three or more times. Then keep the top accounts by connections, or use a k-core filter to keep only the densely connected center.