Editorial illustration: Twitter Social Network Analysis: Reading Connections

Twitter Social Network Analysis: From Public Data to Network Interpretation

Twitter social network analysis examines relationships between accounts by representing them as nodes and their connections as edges. The key steps are to define a relationship, turn qualifying public records into a graph, calculate network measures, and interpret the results within the sample’s limits.

Chandnii7’s Twitter Network Analysis project illustrates a workflow using Twitter API data collection, Gephi visualization, and network measures such as degree distribution, clustering, betweenness, and closeness. [c1] Sentiment analysis can complement this workflow, but it answers a different question: the paper A reliable sentiment analysis for classification of tweets in social networks evaluates labels assigned to tweet text, not account connections. [c2]

Define What a Connection Means

Start with a question about relationships: which accounts receive replies, which accounts mention others, or how interactions connect groups within a selected conversation?

For a public-data study, write down the graph definition before collecting or interpreting records:

  • Nodes: accounts included in the study.
  • Edges: one specified relationship, such as an observed reply or mention.
  • Direction: for example, an edge from the reply author to the account receiving the reply.
  • Weight: the number of qualifying interactions during the observation window, if repeated interactions are counted.
  • Boundary: the dates, search terms, languages, and inclusion rules defining the sample.

These are design choices, not interchangeable defaults. A reply graph answers a different question from a follower graph. Likewise, an author-to-mentioned-account graph differs from a graph connecting accounts mentioned together in the same post. Do not merge relationship types without preserving labels that distinguish them.

Network Definition Worksheet

Complete this worksheet before building the graph:

Decision Record for your study
Research question What relationship or pattern are you investigating?
Public data source and permitted access method Which public records may you access, and how?
Observation window and time zone What start and end times apply?
Inclusion terms and languages Which records qualify?
Node definition Do both interaction authors and recipients become nodes?
Edge type and direction What creates an edge, and which way does it point?
Weighting rule Do repeated interactions increase an edge’s weight?
Duplicate and self-loop rules How will duplicate records and self-directed interactions be handled?
Known missing records What relevant records may be absent?
Publication and retention limits What will you retain or publish, and for how long?

Turn Interaction Records into a Graph

The following is a hypothetical teaching example, not a real collection result. A, B, and C are anonymous node labels.

Suppose the study includes five distinct public reply records within one observation window. Each edge points from the reply author to the recipient, both become nodes, and each qualifying reply contributes a weight of one.

Record Reply author Recipient
R1 A B
R2 A B
R3 B C
R4 C B
R5 A C

R1 and R2 are separate replies, not duplicate copies of one record. When repeated interactions are aggregated, they produce one A → B edge with weight 2.

Aggregated Edge Table

source target weight
A B 2
B C 1
C B 1
A C 1

This graph has three nodes, four directed edges, and five qualifying interactions. The edge count and interaction count differ because repeated replies have been combined.

Calculate Incoming and Outgoing Connections

For this example:

  • In-degree counts distinct accounts with an edge pointing to the node.
  • Out-degree counts distinct accounts to which the node points.
  • Weighted in-degree sums incoming reply counts.
  • Weighted out-degree sums outgoing reply counts.
Node In-degree Out-degree Weighted in-degree Weighted out-degree
A 0 2 0 3
B 2 1 3 1
C 2 1 2 1

A sample-bounded conclusion would be:

Within these five hypothetical reply records, B and C each receive replies from two distinct accounts, while B receives more replies in total. A replies to two distinct accounts, but receives no replies in this sample.

This describes observed connections. It does not establish that B is more influential than C, that A has no wider audience, or that any account agrees with another.

Read Network Measures Without Overclaiming

The Twitter Network Analysis project lists node and edge counts, degree distribution, clustering coefficient, betweenness centrality, and closeness centrality among its measures. [c1] Use the following distinctions when planning an interpretation:

Measure Analytical meaning Interpretation limit
Node and edge counts Size of the graph under your inclusion rules Not a count of the entire Twitter population
Degree Number of incident connections; separate incoming and outgoing connections in a directed graph Not automatically influence or audience reach
Weighted degree Sum of incident edge weights Repeated activity is not the same as many distinct participants
Clustering How connected an account’s neighbors are to one another Not evidence of agreement or coordinated intent
Betweenness Participation in shortest paths between other nodes A structural position, not proof that information actually traveled through that account
Closeness Proximity to other nodes in terms of graph distance Requires explicit handling of unreachable nodes

Before comparing scores, record whether the graph is directed, how weights are interpreted, and how disconnected components are handled. Specify the clustering definition used for a directed graph rather than assuming all implementations measure the same thing.

For path-based measures, do not silently treat interaction frequency as distance. A larger reply count represents more observed activity, not necessarily a longer path. Specify any weight-to-distance conversion or use an unweighted graph.

A defensible result describes an account as highly connected within this sampled graph, rather than declaring it universally influential.

Use Graphs to Explore, Not to Prove

The example project names Gephi as its visualization tool. That establishes its role in this particular workflow, not a requirement to use it for every analysis. [c1]

For a readable network figure, explain what node size, edge thickness, arrow direction, and color represent. Include the observation window and relationship type in the caption.

Treat visual separation as a prompt for investigation rather than a finding on its own. Before labeling a cluster as a community, inspect the underlying connections and explain the grouping method. Before describing a central node as a bridge, check whether that interpretation survives changes to the date range, inclusion rules, or treatment of repeated interactions.

Avoid labels such as “supporters,” “opponents,” or “coordinated actors” based solely on graph position. Prefer descriptions tied to observable records, such as “accounts connected by replies during the selected window.”

Test How Sampling Changes the Result

Missing records can alter the graph itself, not just reduce its size.

Consider another hypothetical example: a reply from X to Y contains your search keyword, but a related reply from Y to Z does not. A keyword-only sample may retain X → Y while omitting Y → Z. The sampled graph then lacks the path connecting X to Z through Y. Depending on the node-inclusion rules, Z may disappear entirely or remain in a separate component. Y’s apparent bridging position can change.

Use this mechanism to guide sensitivity checks:

  1. Identify a plausible omission. Explain which relevant interactions your collection rule could miss.
  2. Vary one boundary at a time. Compare different observation windows or inclusion terms using public records you are permitted to access.
  3. Rebuild the graph consistently. Keep edge definitions, duplicate handling, and metric settings unchanged unless they are the specific choice being tested.
  4. Compare the relevant finding. Examine centrality rankings, component membership, or the connections supporting a proposed bridge.
  5. Report stability or change. State whether the interpretation persists under the tested alternatives.

Do not assign a numerical bias estimate without evidence. Stability across a few variants also does not prove complete coverage; it only shows that the finding survived those particular checks.

Separate Network Structure from Sentiment

Network analysis concerns connections; sentiment analysis concerns labels assigned to text. A reliable sentiment analysis for classification of tweets in social networks evaluates K-nearest neighbor, decision tree, support vector machine, and naive Bayes on both two-class and three-class tweet sentiment datasets. [c2]

If your question involves both structure and language, keep the units separate. Store a sentiment label on the analyzed post, then document any rule used to summarize labels by account or group. Do not turn one negative post into a permanent account-level identity.

For a proposed sentiment workflow, reserve labeled examples for evaluation, inspect classification errors, and report the label definitions. Treat sentiment toward a topic as distinct from sentiment toward the account being mentioned.

The paper’s findings concern its experimental datasets, not guaranteed performance on a new topic, language, or observation window. This discussion relies on its public abstract; the article page identifies the full text as subscription content. [c2]

Report Findings with Clear Boundaries

Use a reporting format that separates observations from interpretations:

  1. Scope: identify the public records, observation window, and collection rules.
  2. Construction: explain nodes, edges, direction, weights, and exclusions.
  3. Observation: report the measured pattern in the sampled graph.
  4. Interpretation: describe what the pattern may suggest without assigning motives.
  5. Sensitivity: explain whether alternative windows or graph rules change the conclusion.
  6. Limits: identify missing records and how their absence could affect the reported pattern.

For example, replace “This account connects the conversation” with:

This account lies on shortest paths between groups in the sampled reply graph. Its position persisted under the tested observation windows, but replies excluded by the keyword rule may change that interpretation.

For publication, prefer aggregate summaries when account identification is unnecessary. Exclude private messages, restricted content, and attempts to infer sensitive personal traits.

Access and Outcome Limits

The repository describes API authentication and running notebook cells, but its README does not verify current API availability, permissions, code compatibility, or coverage for a new study. Confirm permitted access before collecting records. [c1]

Neither reference documents video views, watch time, completion rates, or a method for attributing those outcomes to network position. Network centrality is not a substitute for an unobserved performance metric. [c1] [c2]

FAQ

Is Twitter Social Network Analysis the Same as Sentiment Analysis?

No. The network project examines graph structure and network measures, while the research paper classifies tweet sentiment. A combined study should keep connections and text labels as distinct analytical variables. [c1] [c2]

Should Repeated Replies Count as Separate Edges?

That depends on your graph definition. In the hypothetical example above, separate replies between the same ordered pair of accounts are aggregated into one weighted edge. This distinguishes the number of distinct connections from the volume of interactions.

Can I Use the Repository’s Collection Steps Unchanged Today?

Do not assume so. Its README describes authentication and notebook execution, but does not establish current access requirements or compatibility. [c1]

Does High Centrality Prove That an Account Is Influential?

No. Centrality describes a structural position under specific graph rules. The example project includes centrality measures, but interpreting a score as influence requires evidence beyond the score itself. [c1]

Can These References Explain Twitter Video Performance?

Not directly. They cover network structure and tweet sentiment, not video-performance measurement. Such a conclusion would require separately documented outcome data and an analysis connecting it to the sampled interactions. [c1] [c2]

Sources