mo-mittal commited on
Commit
fb44eb6
1 Parent(s): 09cb084

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reddit Political Discourse Dataset
2
+
3
+ ## Data Source
4
+
5
+ **Pushshift Archive**: [Pushshift](https://the-eye.eu/redarcs/) is a social media data collection, analysis, and archiving platform that has collected Reddit data since 2015, offering real-time updates as well as historical data dating back to Reddit's inception.
6
+
7
+ ## Dataset Description
8
+
9
+ This dataset is a curated collection of posts from 9 prominent US politics-oriented subreddits known for their wide range of political views. The selected subreddits include: r/politics, r/democrats, r/Conservative, r/The_Donald (now banned), r/SandersForPresident, r/JoeBiden, r/LateStageCapitalism, and r/socialism.
10
+
11
+ ## Data Collection
12
+
13
+ The dataset comprises the top posts from the selected subreddits for each year starting from 2014. The raw data files from Pushshift were processed to enhance manageability and accessibility.
14
+
15
+ ## Dataset Structure
16
+
17
+ Each row in the dataset represents a single post and includes the following columns:
18
+
19
+ - Author
20
+ - Created UTC
21
+ - Domain
22
+ - Title
23
+ - Selftext
24
+ - Subreddit
25
+ - Score
26
+ - Number of Comments
27
+ - Ups
28
+ - Downs
29
+ - Permalink
30
+ - Is Self
31
+ - URL
32
+ - Subreddit Subscribers
33
+ - Upvote Ratio
34
+ - Is Original Content
35
+ - Media
36
+ - Selftext HTML
37
+ - Author Flair Text
38
+ - Link Flair Text
39
+ - Image Text (generated feature, explained below)
40
+
41
+ ## URL Content Processing
42
+
43
+ The dataset includes a URL attribute, which can point to an image or an external article. The content from these URLs is processed to extract textual information, which enriches the dataset with additional context for each post. Here's an overview of how the URLs are handled:
44
+
45
+ 1. **Image URLs**: For URLs that point to images (identified by their file extension), the image is downloaded to a local directory. Each image is then validated to ensure it is properly formatted and not corrupt. If valid, optical character recognition (OCR) is performed on the image using `pytesseract`, converting any text in the image into a string.
46
+
47
+ 2. **Article URLs**: For URLs presumed to point to articles (not ending in typical image file extensions), a heuristic is applied to extract meaningful text directly from the URL itself. This involves parsing the URL's path, extracting segments, and replacing common URL encodings (such as hyphens and underscores) with spaces to form a readable string.
48
+
49
+ 3. **Text Inclusion**: The extracted text, whether from images or article URLs, is then associated with the corresponding post entry in the dataset. This provides an expanded dataset where users can analyze not only the metadata of the Reddit post but also content referenced by external links.
50
+
51
+ This process is designed to handle a wide range of content types and to be robust against common issues such as download errors or invalid image files. It enhances the dataset by providing a more comprehensive view of the post's content and the discourse it is a part of.
52
+
53
+ ## Impact
54
+
55
+ The political discourse on Reddit provides a rich landscape for research. This dataset not only contains textual content but also images (linked via the 'url' attribute) and sometimes links to external articles, offering a diverse mix of content that can help analyze and understand the propagation of political discourse.
56
+
57
+ ## Limitations
58
+
59
+ The dataset is a subset of top posts and does not represent the entirety of posts within the selected subreddits. Comments can potentially be harvested using the 'permalink' attribute and OAuth procedures, which may be included in future updates. Some images and articles have not been processed due to authentication issues with Imgur and other cases where content has been removed or banned.
60
+
61
+ ## License
62
+
63
+ ## Citation
64
+
65
+ ## Changelog
66
+
67
+ ## Contact Information