umitkaanusta / Reddit Detective
Licence: mit
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more
Stars: ✭ 129
Programming Languages
python
139335 projects - #7 most used programming language
Labels
Projects that are alternatives of or similar to Reddit Detective
Neo4j
Graphs for Everyone
Stars: ✭ 9,582 (+7327.91%)
Mutual labels: graph, database, neo4j, graph-database
Friend.ly
A social media platform with a friend recommendation engine based on personality trait extraction
Stars: ✭ 41 (-68.22%)
Mutual labels: api, social, social-network
Graph
Graph is a semantic database that is used to create data-driven applications.
Stars: ✭ 855 (+562.79%)
Mutual labels: graph, database, data
Data Science Best Resources
Carefully curated resource links for data science in one place
Stars: ✭ 1,104 (+755.81%)
Mutual labels: api, analytics, database
Bio4j
Bio4j abstract model and general entry point to the project
Stars: ✭ 113 (-12.4%)
Mutual labels: graph, database, graph-database
Metabase
The simplest, fastest way to get business intelligence and analytics to everyone in your company 😋
Stars: ✭ 26,803 (+20677.52%)
Mutual labels: analytics, database, data
Libneo4j Client
neo4j-client -- Neo4j Command Line Interface (CLI)
Stars: ✭ 121 (-6.2%)
Mutual labels: graph, neo4j, graph-database
Locopy
locopy: Loading/Unloading to Redshift and Snowflake using Python.
Stars: ✭ 73 (-43.41%)
Mutual labels: etl, database, data
Voten
The code that powers voten.co
Stars: ✭ 1,215 (+841.86%)
Mutual labels: social, social-network, reddit
Movies Javascript Bolt
Neo4j Movies Example with webpack-in-browser app using the neo4j-javascript-driver
Stars: ✭ 123 (-4.65%)
Mutual labels: graph, neo4j, graph-database
Social Amnesia
Forget the past. Social Amnesia makes sure your social media accounts only show your posts from recent history, not from "that phase" 5 years ago.
Stars: ✭ 656 (+408.53%)
Mutual labels: api, reddit, social-media
Octo Cli
CLI tool to expose data from any database as a serverless web service.
Stars: ✭ 653 (+406.2%)
Mutual labels: api, database, data
Opensource Socialnetwork
Open Source Social Network (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. It is available in 16 international languages.
Stars: ✭ 710 (+450.39%)
Mutual labels: social, graph, social-network
Eliasdb
EliasDB a graph-based database.
Stars: ✭ 611 (+373.64%)
Mutual labels: graph, database, graph-database
Indradb
A graph database written in rust
Stars: ✭ 1,035 (+702.33%)
Mutual labels: graph, database, graph-database
Tensorbase
TensorBase BE is building a high performance, cloud neutral bigdata warehouse for SMEs fully in Rust.
Stars: ✭ 440 (+241.09%)
Mutual labels: analytics, database, data
Movies Java Bolt
Neo4j Movies Example application with SparkJava backend using the neo4j-java-driver
Stars: ✭ 66 (-48.84%)
Mutual labels: graph, neo4j, graph-database
Cog
A Persistent Embedded Graph Database for Python
Stars: ✭ 90 (-30.23%)
Mutual labels: graph, database, graph-database
reddit-detective: Play detective on Reddit
pip install reddit_detective
reddit-detective represents reddit in a graph structure using Neo4j.
Created to help researchers, developers and people who are curious about how Redditors behave.
Helping you to:
- Detect political disinformation campaigns
- Find trolls manipulating the discussion
- Find secret influencers and idea spreaders (it might be you!)
- Detect "cyborg-like" activities
- "What's that?" Check
reddit_detective/analytics/metrics.py
for detailed information
- "What's that?" Check
Installation and Usage
- Install Neo4j 4.1.0 here
- Neo4j uses Cypher language as its query language. Knowing Cypher dramatically increases what you can do with reddit-detective Click here to learn Cypher
- Install reddit-detective with
pip install reddit_detective
- Note: Version 0.1.2 is broken, any other version is fine
Code Samples
Creating a Reddit network graph
import praw
from neo4j import GraphDatabase
from reddit_detective import RedditNetwork, Comments
from reddit_detective.data_models import Redditor
# Create PRAW client instance
api = praw.Reddit(
client_id="yourclientid",
client_secret="yourclientsecret",
user_agent="reddit-detective"
)
# Create driver instance
driver = GraphDatabase.driver(
"url_of_database",
auth=("your_username", "your_password")
)
# Create network graph
net = RedditNetwork(
driver=driver,
components=[
# Other relationship types are Submissions and CommentsReplies
# Other data models available as components are Subreddit and Submission
Comments(Redditor(api, "BloodMooseSquirrel", limit=5)),
Comments(Redditor(api, "Anub_Rekhan", limit=5))
]
)
net.create_constraints() # Optional, doing once is enough
net.run_cypher_code()
net.add_karma(api) # Shows karma as a property of nodes, optional
Finding interaction score
# Assuming a network graph is created and database is started
# Interaction score = A / (A + B)
# Where A is the number of comments received in user's submissions
# And B is the number of comments made by the user
from reddit_detective.analytics import metrics
score = metrics.interaction_score(driver, "Anub_Rekhan")
score_norm = metrics.interaction_score_normalized(driver, "Anub_Rekhan")
print("Interaction score for Anub_Rekhan:", score)
print("Normalized interaction score for Anub_Rekhan:", score_norm)
Output:
Interaction score for Anub_Rekhan: 0.375
Normalized interaction score for Anub_Rekhan: 0.057324840764331204
Finding cyborg score
# Assuming a network graph is created and database is started
# For a user, submission or subreddit, return the ratio of cyborg-like comments to all comments
# A cyborg-like comment is basically a comment posted within 6 seconds of the submission's creation
# Why 6? Can't the user be a fast typer?
# See reddit_detective/analytics/metrics.py for detailed information
from reddit_detective.analytics import metrics
score, comms = metrics.cyborg_score_user(driver, "Anub_Rekhan")
print("Cyborg score for Anub_Rekhan:", score)
print("List of Cyborg-like comments of Anub_Rekhan:", comms)
Output:
Cyborg score for Anub_Rekhan: 0.2
List of Cyborg-like comments of Anub_Rekhan: ['q3qm5mo']
Running a Cypher statement
# Assuming a network graph is created and database is started
session = driver.session()
result = session.run("Some cypher code")
session.close()
Upcoming features
- [ ] UserToUser relationships
- A relationship to link users with its only property being the amount of encounters
- Having ties with the same submission is defined as an encounter
- [ ] Create a wrapper for centrality metrics of Neo4j GDSC (Graph data science library)
Inspirations
List of works/papers that inspired reddit-detective:
authors: [Sachin Thukral (TCS Research), Hardik Meisheri (TCS Research),
Arnab Chatterjee (TCS Research), Tushar Kataria (TCS Research),
Aman Agarwal (TCS Research), Lipika Dey (TCS Research),
Ishan Verma (TCS Research)]
title: Analyzing behavioral trends in community driven
discussion platforms like Reddit
published_in: 2018 IEEE/ACM International Conference on Advances in
Social Networks Analysis and Mining (ASONAM)
DOI: 10.1109/ASONAM.2018.8508687
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].