Watchful11

Separate dump files for the top 20k subreddits

Feb 27th, 2023
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. I've gotten a number of requests for subreddit specific dump files extracted from the monthly dumps. So I've extracted out the top twenty thousand subreddits and uploaded them as a torrent so they can be individually downloaded without having to download the entire set of dumps.
  2.  
  3. https://academictorrents.com/details/c398a571976c78d346c325bd75c47b82edf6124e
  4.  
  5. # How to download the subreddit you want
  6.  
  7. This is a torrent. If you are not familiar, torrents are a way to share large files like these without having to pay hundreds of dollars in server hosting costs. They are peer to peer, which means as you download, you're also uploading the files on to other people. To do this, you can't just click a download button in your browser, you have to download a type of program called a torrent client. There are many different torrent clients, but I recommend a simple, open source one called [qBittorrent](https://www.qbittorrent.org/).
  8.  
  9. Once you have that installed, go to the [torrent link](https://academictorrents.com/details/c398a571976c78d346c325bd75c47b82edf6124e) and click download, this will download a small ".torrent" file. In qBittorrent, click the plus at the top and select this torrent file. This will open the list of all the subreddits. Click "Select None" to unselect everything, then use the filter box in the top right to search for the subreddit you want. Select the files you're interested in, there's a separate one for the comments and submissions of each subreddit, then click okay. The files will then be downloaded.
  10.  
  11. # How to use the files
  12.  
  13. These files are in a format called zstandard compressed ndjson. ZStandard is a super efficient compression format, similar to a zip file. NDJson is "Newline Delimited JavaScript Object Notation", with separate "JSON" objects on each line of the text file.
  14.  
  15. There are a number of ways to interact with these files, but they all have various drawbacks due to the massive size of many of these files. The efficient compression means a file like "wallstreetbets_submissions.zst" is 5.5 gigabytes uncompressed, far larger than most programs can open at once.
  16.  
  17. You can extract the files yourself with 7Zip. You can install [7Zip from here](https://www.7-zip.org/) and then [install this plugin](https://github.com/mcmilk/7-Zip-zstd) to extract ZStandard files, or you can directly install the modified 7Zip with the plugin already from that plugin page. Then simply open the zst file you downloaded with 7Zip and extract it.
  18.  
  19. Once you've extracted it, you'll need a text editor capable of opening very large files. I use [glogg](https://glogg.bonnefon.org/) which lets you open files like this without loading the whole thing at once.
  20.  
  21. As an alternative, if you want to save the data in a different format or extract out lines matching specific filters (keyword searching, or dates, etc), you can use a python script like the examples I [have here](https://github.com/Watchful1/PushshiftDumps). This lets you iterate through each comment/submission in the file without having to extract the whole thing.
  22.  
  23. If you have a specific use case and can't figure out how to extract the data you want, send me a DM, I'm happy to help put something together.
  24.  
  25. # Api script
  26.  
  27. In addition to the dump files, pushshift offers an API with powerful filtering options. The main limitation is that it takes quite some time to download a substantial amount of data. If you have a use case that doesn't cleanly align to specific subreddits, take a look at my [api download script here](https://github.com/Watchful1/Sketchpad/blob/master/postDownloader.py). Again I'm happy to work with you to build something for a specific use case.
  28.  
  29. # Can I cite you in my research paper
  30.  
  31. This data is originally collected by Pushshift. Extracted, split and re-packaged by me, u/Watchful1. And hosted on academictorrents.com.
  32.  
  33. Having never published a paper myself, I'm not very familiar with the correct format for citing, but I would recommend including all three.
  34.  
  35. If you do complete a project or publish a paper using this data, I'd love to hear about it! Send me a DM once you're done.
  36.  
  37. # How can I donate as thanks
  38.  
  39. I don't take donations, but you can donate to the [organization behind pushshift here](https://www.paypal.com/US/fundraiser/charity/3521050) so they can continue hosting and collecting more data like this.
  40.  
  41. # Note
  42.  
  43. This data is currently from the begining of reddit to the end of December 2022. I will update it with a new torrent every 6 months.
Add Comment
Please, Sign In to add comment