pixlmint / Reddit-Analysis

A program to save reddit data to csv files for analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reddit-Analysis

A program to save reddit data to csv files for analytics

Installation

  • Clone/ Download Repository
  • Make sure you have Python3^ installed, either globally or in a virtual environment

Setup

1. Make sure you have those plugins installed

You can install them by running

pip install {plugin name}

  • mysql-connector-python
  • pandas
  • plotly
  • praw
  • numpy
  • psutil

How to use:

  1. Create folder "Data" in root directory
-Reddit-Analysis
--Code
---Python scripts
--Data
---generated sub folders
  1. In "Code" folder rename file file "keys.default.txt", insert your account data:
personal
[Reddit API personal token]
secret
[Reddit API secret token]
password
[Reddit User Account password]
(if you want to connect to ftp server:)
ftp-password
[password]
  1. Run Script "Main".
  • Currently, it will first start the thread then download the 20 newest posts of the subreddits in the list at the very top.

Configurations:

SQL

This version of the program needs the connection to a mySql Database which runs on the user's machine (localhost) The name of the database is 'reddit_analysis', password is nothing.

Simple import "reddit_analysis.sql" and you're good to go.

Subreddits:

If you want data to different subreddits, just insert it into the array in main.py

Filter:

(depracated -> it now gets newest posts by default and updates them continually)

FTP:

Currently it points at my server, hosted on bplaced. To change this, go into ftp_writer.py

In there just configure the host and username. The next line in the code directs to the directory on the server where the files will be saved.

About

A program to save reddit data to csv files for analytics


Languages

Language:Python 94.8%Language:Dockerfile 5.1%Language:PHP 0.1%