Video summary
Week 2 Reddit tutorial
Main summary
Key takeaways
Summary
The tutorial introduces Reddit’s community structure and demonstrates how to collect post data with PRAW, a Python library for working with Reddit.
How Reddit is organized
- Reddit’s communities are called subreddits, identified by names such as
r/Olympicsorr/India. - Users interact with posts through upvotes and comments. Comments can receive replies, creating multiple levels of discussion.
- Subreddits may have rules, moderators, and links to related communities, which can help users discover other subreddits.
- Flairs label posts by topic, much like hashtags on other social platforms.
- Posts can contain text, images, videos, or links to external sources.
Collecting Reddit data with PRAW
The demonstration walks through a basic collection workflow:
-
Create a Reddit application
- Log in to Reddit and open the application settings on the older Reddit interface.
- Choose Create an app, provide the requested details, and select script for a personal-use script application.
- Reddit provides credentials for authentication. The tutorial does not show the keys because they may reveal personal information.
-
Install and prepare the Python tools
- Use PRAW to connect to Reddit and pandas to organize the collected data in data frames.
- Authenticate PRAW using the application’s client ID and client secret, along with the Reddit password, username, and user-agent name.
- Keep credentials private.
-
Choose a subreddit and retrieve posts
- Create a subreddit object—for example, for
India. - Request a limited set of posts, such as the 100 “hot” posts.
- The tutorial also demonstrates using
allto retrieve posts across Reddit.
- Create a subreddit object—for example, for
-
Choose fields to collect
The example builds a record for each post with its:
- Title
- Subreddit
- Score (upvotes)
- ID
- URL
- Number of comments
- Creation time
- Body text
Some posts have no body text because they consist of media or external links.
-
Organize and inspect the results
- Store the post records in a dictionary and convert them into a pandas data frame.
- Use the data frame’s preview to inspect the first few records.
- In the demonstration, the top 100 posts from Reddit’s broad feed came from 93 distinct subreddits.
-
Save the data
- Save data frames to CSV files with pandas so the collected information remains available after closing the notebook.
- The tutorial reloads a saved file to check that the data can be read back. Minor formatting differences, such as missing-value representations, may occur.
Documentation and further exploration
- The tutorial points to the PRAW documentation for installation, OAuth authentication, Reddit instances, and available methods.
- A Reddit instance can expose account information and support other interactions.
- PRAW tutorials also cover tasks such as monitoring submissions and automatically replying with a bot.
- Searching the documentation for a data type—such as comments—can reveal methods for retrieving it from different Reddit feeds or contexts.
- The broader goal is to use Reddit data to study social-network activity and examine links to external sources such as news sites and Twitter.
Speakers and sources featured
- Speaker: One tutorial narrator; no additional speakers are identifiable in the subtitles.
- Sources and platforms: Reddit, the PRAW documentation (
praw.readthedocs.io), and Python/pandas as used in the demonstration.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.