Loading...

How to Get Datasets from Reddit

By Team WayScript

From cryptocurrency to gaming, Reddit has become a huge mega forum with many diverse communities. For those of you who want to pull data from Reddit, WayScript's visual drag and drop programming language allows you to do this easily.

With WayScript's Reddit module, you can get information about a Reddit user, a subreddit, your own Reddit account, and so much more. Follow along this tutorial to build your own multipurpose Reddit Dataset program in a few minutes.

Ever wanted to track your Karma, Gold Status, or the Number of Subscribers you have over time? This first example will teach you how to build a Reddit Account Data Tracker. You will have all your desired data in an organized spreadsheet, and your program will run daily to get new updates for you!

Building from Scratch

Step One

Drag and drop a 'Trigger' into your recipe.

Since we want our program to be automated, set the 'Trigger Type' to 'Time' and 'Run program every' to 'Day'. These settings will run our program daily.

Step Two

Drag and drop the 'Reddit' module into your recipe.

Select a 'Mode' from the 'Reddit' module.

Each mode extracts different types of data from Reddit. Some of these modes include 'Data About My Account', 'Search a Subreddit', 'Data About Other Users', 'Get Posts from Other Users', 'Get Comments from Other Users', etc. In this tutorial, I will be getting data about my account.

Select the 'Outputs' you want on your spreadsheet. Each 'Mode' will have different outputs since different types of data are being collected.

For this tutorial, I will 'Select All' the outputs.

Step Three

Since we want to put all the information we collected into a spreadsheet, drag and drop the 'Excel' module into your recipe.

Set the 'Mode' to 'Write File' and set a name for your spreadsheet. I will call the spreadsheet 'RedditAccountData.xlsx'. If you would like a clean spreadsheet with the latest data every time you run your program, then set the 'Write Mode' to 'Replace File'. Otherwise, you can set it to 'Add to File' to append data.

We now want to determine which outputs from the 'Reddit' module we want on our spreadsheet. You are free to select which data you want on your spreadsheet. In this tutorial, I will select all the variables we got from the 'Reddit' module.

Step Four

Go back into your 'Trigger' and activate it. This will run your program and ensure that it runs daily.

Done!

Awesome! You have now completed your program, and you can run it from your dashboard or straight from the recipe builder.

Get Results

Your excel file will appear after running the program. In this tutorial, I collected data about my account. The following excel sheet contains:

  • Public Description
  • Karma
  • Comment Karma
  • Link Karma
  • Number of Subscribers
  • Account Has Gold
  • If you set your 'Write Mode' to 'Add to File', then your spreadsheet will collect data over time. A neat thing you can do with aggregated data is forming a line plot based on the numbers. Below is a spreadsheet with a line plot of how much Karma was gained in the past 60 days.

    Modifications

    Remember, the data you collect is very versatile. You can always change the type of data you want from the 'Reddit' Module and get a completely new program.

    In this example, I decided to collect data on the subreddit r/programming. I changed the 'Mode' of the 'Reddit' module to 'Search a Subreddit'.

    Keep in mind that if the outputs from the 'Reddit' module are lists, you will need a 'Loop' to loop over each individual element in the lists.

    The data I collected from this program include:

  • Number of Subscribers
  • Active Accounts
  • Subreddit Description
  • Post Titles
  • Date of Post
  • Post Text
  • Post Author
  • Number of Upvotes
  • Number of Comments
  • Post Reddit URLs
  • Post Link URLs