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

Map Reddit Account Overlap Locally with RedLens

Build a local Reddit network map from shared threads, export an edge table with SQL, and distinguish account overlap from evidence of coordination.

The RedLens Project

For public Reddit research, network mapping means defining accounts or communities as nodes, then connecting them through an observable relationship: shared threads, shared subreddits, replies, or repeated content. It is not computer-network discovery, and an account connection is not automatically evidence of coordination.

This workflow builds an account-overlap map in RedLens, then uses SQL to produce a dated edge table. The output answers “Which accounts commented in the same archived threads?”—not “Who controls these accounts?”

Define what each connection means

Choose the relationship before collecting data:

Map Nodes Connection means
Shared-subreddit map Accounts Both have archived activity in a subreddit
Shared-thread map Accounts Both commented under the same post
Reply map Accounts One replied to a comment by the other

These relationships are not interchangeable. Two accounts commenting under the same post may never interact directly.

RedLens’s built-in account matrix counts distinct shared subreddits and distinct co-commented threads. Its pair-counting code does not impose a time-distance threshold or measure text similarity. Read it as an overlap map, not a test for posting “in lockstep.” Coactivity implementation.

1. Collect a bounded discussion sample

With RedLens installed, work in a dedicated directory and use a new database for this investigation. The following is an illustrative scope, not a reported finding: posts mentioning kernel in two Linux communities, plus their comment threads.

redlens --version
redlens --db kernel-map.sqlite track kernel-map \
--query kernel \
--subreddits linux,linuxquestions \
--sources none \
--days 90 \
  --comments

redlens --db kernel-map.sqlite show --topic kernel-map --json

--sources none disables subreddit discovery, keeping this new topic within the explicitly supplied communities. --days 90 sets the trailing post-collection window; --comments requests comments under matched posts. These flags are supported by the CLI.

The important boundary: this is not a search of every Reddit comment containing “kernel.” Topic tracking finds matching posts within a subreddit set, then fetches their threads. Those comments need not contain the keyword. Comment collection skips posts whose stored comment count is zero, and an unreachable thread can be skipped silently without stopping the pull. Progress counts and an absence of warnings do not establish complete thread coverage. Topic collection code.

RedLens uses the Arctic Shift mirror for these archived public records, not a live official-API feed. Record collection time separately from activity time; mirror coverage can differ from current Reddit. Project design.

For a keyless workflow, ensure no LLM key is configured in the environment or configuration file: track automatically runs a relevance-scoring pass when a key is present, and comments under posts flagged off-topic are not requested. Tracking and filtering implementation.

Keep the command, installed version, collected subreddit set, and collection warnings with your investigation notes. Preserve the database snapshot used for analysis if you plan to collect more data later.

2. Inspect the built-in overlap matrix

redlens --db kernel-map.sqlite serve --title "Kernel discussion overlap"

The dashboard runs locally and lets you inspect the records behind matrix cells. See the local dashboard guide for the browsing workflow.

Check the display limits before interpreting an apparently isolated account or missing connection. In the implementation checked on October 14, 2026, the network view uses:

  • Up to 40 accounts, selected by total archived post and comment activity within the applicable scope.
  • Up to 60 rows in the shared-subreddit and co-commented-thread sections.
  • Cohort labels, when supplied, to restrict the matrices to labeled accounts. A cohorts.csv file next to the database can be loaded automatically.

Those are display/query limits, not evidence that no other accounts or relationships exist. Without cohort labels, the matrices draw from the database’s authors; they are not automatically restricted to one topic or one month. Network data layer, account selection, and CLI sidecar defaults.

3. Produce a dated edge table with SQL

Open the read-only SQL explorer on a different port if the dashboard is still running:

redlens --db kernel-map.sqlite explore --port 8001

Select the SQL tab. The query below uses August 2026 as an example analysis window. Change the two dates to your study period. It returns pairs sharing at least two threads, alongside each account’s distinct-thread total and a normalized overlap score.

WITH ut AS (
  SELECT DISTINCT author_username AS account, link_id AS thread
  FROM comment
  WHERE created_utc >= CAST(strftime('%s', '2026-08-01') AS INTEGER)
    AND CAST(strftime('%s', '2026-09-01') AS INTEGER) > created_utc
    AND lower(author_username) NOT IN
        ('', '[deleted]', '[removed]', 'automoderator')
    AND link_id != ''
),
sizes AS (
  SELECT account, count(*) AS thread_count
  FROM ut
  GROUP BY account
),
shared AS (
  SELECT a.account AS source, b.account AS target,
         count(*) AS shared_threads
  FROM ut AS a
  JOIN ut AS b
    ON a.thread = b.thread AND b.account > a.account
  GROUP BY a.account, b.account
)
SELECT s.source, s.target, s.shared_threads,
       a.thread_count AS source_threads,
       b.thread_count AS target_threads,
       round(
         1.0 * s.shared_threads /
         (a.thread_count + b.thread_count - s.shared_threads), 3
       ) AS jaccard
FROM shared AS s
JOIN sizes AS a ON a.account = s.source
JOIN sizes AS b ON b.account = s.target
WHERE s.shared_threads >= 2
ORDER BY jaccard DESC, shared_threads DESC, source, target;

The field names follow the RedLens comment schema. SQLite’s strftime('%s', ...) converts the boundary dates to Unix seconds; these boundaries use UTC. SQLite date documentation.

Each result row is an undirected edge. DISTINCT prevents repeated comments in one thread from inflating shared-thread counts. Jaccard is shared threads divided by the union of both accounts’ thread sets: it measures overlap relative to activity, not a probability of coordination.

The two-thread cutoff is an exploratory choice, not a validated classifier. Accounts with no qualifying edge disappear from this table. Comment dates—not matched-post dates—determine inclusion, and every denominator refers only to comments available in this archive. The query reads the entire comment table; keeping this investigation in a separate database prevents unrelated user or topic collections from entering it.

The explorer previews at most 1,000 result rows. It can therefore omit qualifying edges even though the SQL has no LIMIT. Use the SQLite shell for the full export rather than treating that preview as the complete network. Explorer implementation.

Save the query as kernel-edges.sql. With the SQLite command-line shell installed, start sqlite3, then enter:

.open --readonly kernel-map.sqlite
.mode csv
.once kernel-edges-2026-08.csv
.read kernel-edges.sql
.quit

These commands open the archive read-only and write the query results as CSV. The output columns follow the query’s SELECT order. SQLite shell documentation. Large threads can generate many account pairs, so start with a bounded sample.

4. Review connections before making claims

Use high-overlap pairs to prioritize inspection. Check whether the connection recurs across independent threads, whether comments are close in time, whether text or links repeat, and whether a scheduled event or popular discussion explains the pattern. Compare with similarly active accounts outside the candidate group.

Pacheco and colleagues’ coordination-network methodology recommends selecting behavioral traces, accounting for popular features, filtering noisy edges, and manually inspecting suspicious clusters. Its case studies use Twitter; they do not validate RedLens or this Reddit query as a coordination detector. Original research.

To produce a standalone dashboard snapshot:

redlens --db kernel-map.sqlite report \
--title "Kernel discussion overlap" \
  --anon -o kernel-network.html

--anon replaces account usernames with pseudonyms in the report’s embedded data. It does not make distinctive quoted text unsearchable, or pseudonymize the SQLite database and SQL-exported CSV. Review sensitive text before sharing either output.

Retain the dated SQL results separately: the HTML contains dashboard data, not the custom August-only edge table. The static report also captures only a bounded selection of pair evidence and profiles; some deeper drill-downs are unavailable. Report implementation.

A defensible finding stays close to the measurement: “These accounts shared archived discussion threads during the specified window.” Stronger claims about common control, payment, automation, or deceptive intent require additional evidence.