Skip to content
◉RedLens Get RedLens on GitHub
Public Discussion Analysis

Choose Network Mapping Tools by What Your Reddit Edges Mean

Use RedLens, SQLite, Gephi and NetworkX to map public Reddit discussion locally, with a reproducible edge definition and clear limits.

The RedLens Project

For public Reddit research, choose network mapping tools by the relationship you want to inspect—not by how impressive the graph looks. An account posting in a subreddit, replying to another account, and sharing the same link are three different relationships. They should not become interchangeable edges.

This guide covers discussion networks, not tools that discover routers or map IT infrastructure. The practical starting point is a local account–subreddit map: archive a scoped topic with RedLens, turn its records into an edge table with SQLite, and inspect that table in Gephi.

Which tool fits which step?

Tool Input and action Useful output Main boundary
RedLens Archive public users or topic-matching posts; inspect local matrices SQLite archive, local dashboard, standalone HTML reports Its topic “net” is a collection scope, not evidence of relationships between accounts
SQLite Select records and aggregate an explicit relationship Reproducible edge table You define the network; SQL does not infer intent
Gephi Desktop Import nodes and edges; apply layouts, filters and graph metrics Interactive graph and saved project Visual proximity is not a separate behavioral observation
NetworkX Build and transform graphs in Python Scripted analysis, including account projections Projection weights must be interpreted according to the function used

RedLens documents local SQLite storage, matrix-based network inspection and HTML reporting. Gephi provides graph import, layouts, filtering and statistics. NetworkX’s weighted bipartite projection connects nodes through shared neighbors. These tools cover different stages rather than replacing one another. See the RedLens project documentation, Gephi quickstart and NetworkX projection reference.

1. Define the map before collecting

For this example:

  • Account node: a username appearing as an author of an included post.
  • Subreddit node: a community hosting an included post.
  • Edge: that account authored at least one included post in that community.
  • Weight: number of included posts for that account–community pair.
  • Window: September 1–30, 2026, UTC.
  • Exclusions: blank authors, [deleted], AutoModerator and automod, case-insensitively. This is an explicit exclusion list, not a filter for all bots.

This is a bipartite network: two kinds of nodes, with edges between the kinds. It maps observed participation in topic-matching posts. It does not map friendships, readers, votes or coordination.

Keep comments out of this first map. Adding them would change the activity being counted and would require a separate inclusion rule.

2. Collect an explicit subreddit scope

With RedLens installed, run this example collection command. The package configuration requires Python 3.11 or newer. The CLI and schema below reflect project code available on October 14, 2026.

redlens --version
redlens --db reddit-network.db track solar-panels \
--query "solar panel,photovoltaic" \
--subreddits solar,energy,RenewableEnergy \
  --sources none --days 180 --yes
redlens --db reddit-network.db show --topic solar-panels --json

Use a new database file for this example. The topic name is a local handle. The query supplies comma-separated alternatives; --sources none disables subreddit discovery so the initial scope is explicit. The 180-day collection window is relative to the run date, so it includes September when run on October 14, 2026—not indefinitely. These flags are defined in the CLI.

Record the version, run date, command and any reported failures. Arctic Shift has no global full-text search in this workflow: RedLens searches within its stored subreddit net. Repeating an unchanged topic collection is incremental; a wider net, longer window or changed keyword set triggers a full-window pull. Existing topic scopes accumulate, so --subreddits does not replace an old net. See the tracking implementation.

No LLM key is required. If one is configured, tracking automatically attempts relevance classification, sending post titles and body snippets to the configured LLM service. For a keyless workflow, leave that integration unconfigured. Otherwise, record the model and configuration: stored verdicts affect which matches this query includes. The relevance-filter implementation shows the submitted fields and stored verdicts.

3. Export a graph-ready edge table

RedLens’s ordinary CSV export contains archived records, not this aggregated graph. The following query creates the edge table explicitly from its post, topicpost and topic fields in the data models.

Open the separately installed SQLite command-line shell from the directory containing your database:

sqlite3

Then enter:

.open --readonly reddit-network.db
.headers on
.mode csv
.once account-subreddit-edges.csv
SELECT
  'u:' || lower(p.author_username) AS Source,
  'r:' || lower(p.subreddit_name) AS Target,
  COUNT(*) AS Weight,
  'Undirected' AS Type
FROM post AS p
JOIN topicpost AS tp ON tp.post_id = p.post_id
JOIN topic AS t ON t.id = tp.topic_id
WHERE t.name = 'solar-panels'
  AND tp.relevant IS NOT 0
  AND p.created_utc BETWEEN
      (strftime('%s', '2026-09-01') + 0)
      AND (strftime('%s', '2026-10-01') + 0 - 1)
  AND trim(p.author_username) != ''
  AND lower(p.author_username) NOT IN
      ('[deleted]', 'automoderator', 'automod')
GROUP BY lower(p.author_username), lower(p.subreddit_name)
ORDER BY Source, Target;
.quit

The prefixes prevent an account and a subreddit with the same name from becoming one node. The relevance condition retains unscored matches and excludes explicit false verdicts, matching RedLens’s default relevance rule. The date boundaries select September only, regardless of additional archived history.

SQLite documents read-only opening and CSV output, and its date functions use UTC. Preserve the query alongside the CSV and the underlying archive. Stop collection while producing the final export and checking its records so the handoff remains consistent.

4. Inspect in Gephi—or project in NetworkX

In Gephi Desktop, import the CSV into the Edges table through Data Laboratory. Verify Source and Target, parse Weight numerically, and confirm undirected edges. Gephi requires source and target IDs and otherwise defaults edge type to directed, according to its CSV import documentation. For this edge-only import, enable Create missing nodes so Gephi creates the account and subreddit nodes from those IDs; the CSV import tutorial illustrates that option.

Check a few edge weights against the archived posts before applying a layout. If the CSV contains no edges, check collection failures and query filters before attempting an import. Save the .gephi project as well as any presentation export. For inspecting the records inside RedLens instead, use the local dashboard workflow.

If you need an account-only graph, NetworkX can project the bipartite graph onto account nodes. Its default weighted_projected_graph weight counts shared neighboring subreddits, not shared posts or the sum of the original activity weights. Two accounts connected through three subreddits therefore have weight three under that definition, regardless of how often they posted there. The function reference specifies this behavior.

What the map supports

A strong participation edge means many included posts. A projected account edge means shared communities. Neither establishes coordinated activity.

Coordination research starts with a behavioral hypothesis and constructs features around it—for example, shared content combined with timing. The original study Uncovering Coordinated Networks on Social Media warns that popular shared features can generate false positives; its case studies use Twitter data, not a validated RedLens benchmark.

Treat this map as a way to select records for review. An absent edge means no included post was found—not that an account never participated there. Query terms, mirror coverage, collection failures and relevance filtering all limit the observed network.

Keep usernames local unless naming them is necessary, and apply the ethical public-history review guidelines before sharing. Label the result accurately: topic-matching participation observed in selected subreddits during September 2026, not a complete Reddit network or a list of coordinated accounts.