Skip to content

jonathan-stein/Subreddit-Recommender

Repository files navigation

Subreddit-Recommender

  1. The code will return the 5 most similar subreddits to an inputted twitter account. A Twitter user who is unfamiliar with reddit can use this code to explore subreddits they are interested in.
  2. The code scrapes the most recent 3000 tweets of the input Twitter user. It also scrapes the titles of the top 50 posts within the 500 most subscribed subreddits. It compiles this information into a CSV, where we use a TFIDF vectorizer along with the Cosine similarity function from the Pandas library to compare the similarities between the tweets and the titles of the subreddits along with the similarities between the subreddits themselves. The five most similar subreddits are returned.
  3. A machine will need to have Numpy, Pandas, Scikit-learn, Tweepy, Scipy, and PRAW to run the code. These can be installed through pip. The user will also need API keys for Twitter and Reddit. Since we do not have a running web app, we have provided the keys in the attached file on Piazza. The executable is python3 run_recommender <twitter_handle>. It will take a few minutes to return a result.
  4. Jonathan Stein did the Twitter scraper as well as the TFIDF vectorizer. Ian Cabacungan did the reddit scraper and wrote this documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages