All Projects → 1-Sisyphe → reddit-hot-recorder

1-Sisyphe / reddit-hot-recorder

Licence: MIT license
Records the activity (comments and karma) on the hot page of a Reddit sub and prepare an animated data visualisation.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to reddit-hot-recorder

bitrate-plotter
Plots a graph showing the bitrate every second or the bitrate of every GOP, for a video or audio file.
Stars: ✭ 15 (-83.15%)
Mutual labels:  plot, matplotlib
Adjusttext
A small library for automatically adjustment of text position in matplotlib plots to minimize overlaps.
Stars: ✭ 731 (+721.35%)
Mutual labels:  plot, matplotlib
nodeplotlib
NodeJS plotting library for JavaScript and TypeScript. On top of plotly.js. Inspired by matplotlib.
Stars: ✭ 115 (+29.21%)
Mutual labels:  plot, matplotlib
matplotlib-haskell
Haskell bindings for Python's Matplotlib
Stars: ✭ 80 (-10.11%)
Mutual labels:  plot, matplotlib
publib
Produce publication-level quality images on top of Matplotlib
Stars: ✭ 34 (-61.8%)
Mutual labels:  plot, matplotlib
Tensorflow Plot
📈 TensorFlow + Matplotlib as TF ops
Stars: ✭ 285 (+220.22%)
Mutual labels:  plot, matplotlib
Vapeplot
matplotlib extension for vaporwave aesthetics
Stars: ✭ 483 (+442.7%)
Mutual labels:  plot, matplotlib
Rustplotlib
A Rust's binding of matplotlib
Stars: ✭ 31 (-65.17%)
Mutual labels:  plot, matplotlib
Matplotlib4j
Matplotlib for java: A simple graph plot library for java with powerful python matplotlib
Stars: ✭ 107 (+20.22%)
Mutual labels:  plot, matplotlib
Itermplot
An awesome iTerm2 backend for Matplotlib, so you can plot directly in your terminal.
Stars: ✭ 1,267 (+1323.6%)
Mutual labels:  plot, matplotlib
heatmaps
Better heatmaps in Python
Stars: ✭ 117 (+31.46%)
Mutual labels:  plot, matplotlib
sarviewer
Generate graphs with gnuplot or matplotlib (Python) from sar data
Stars: ✭ 60 (-32.58%)
Mutual labels:  plot, matplotlib
mltb
Machine Learning Tool Box
Stars: ✭ 25 (-71.91%)
Mutual labels:  plot, matplotlib
Mongit
💾 Mongo-esque Reddit-based Database!
Stars: ✭ 20 (-77.53%)
Mutual labels:  reddit
Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python
In this repository, You can find the files which implement dimensionality reduction on the hyperspectral image(Indian Pines) with classification.
Stars: ✭ 63 (-29.21%)
Mutual labels:  matplotlib
2021 course dev-rougier
NumFocus Academy - Matplotlib (beginner)
Stars: ✭ 54 (-39.33%)
Mutual labels:  matplotlib
joypy
Joyplots in Python with matplotlib & pandas 📈
Stars: ✭ 418 (+369.66%)
Mutual labels:  matplotlib
ggquiver
R package for quiver plots in 'ggplot2'
Stars: ✭ 38 (-57.3%)
Mutual labels:  plot
ofxHistoryPlot
Visualize value history on a configurable graph
Stars: ✭ 40 (-55.06%)
Mutual labels:  plot
reddit-opinion-mining
Sentiment analysis and opinion mining of Reddit data.
Stars: ✭ 15 (-83.15%)
Mutual labels:  reddit

reddit-hot-recorder

What is it?

  • My first published python project :)
  • A script that collects metadata from a Reddit's subreddit hot section, at regular intervals, and turns it into a serie of charts, to be animated.

Here is an extract of a recording of r/all:
r/all example

How does it work?

  • The hotcollect module takes care of collecting the data and can save it into a json.
  • The hotplot module uses the collected data to generate a serie of charts.
  • The final step requires a software to turn the serie of charts (.png files) into a movie or a .gif.
required:
  • matplotlib
  • numpy
  • PRAW

Examples:

from hotcollect import collect_data
from hotplot import plot_collec
data_collec = collect_data(sub='france',maxposts=10,interval_sec=30,
                           duration_min=5,feedback=True,savefile='france.json')
plot_collec(data_collec)
  • This script will watch the top 10 posts of r/france during 5 minutes, every 30 seconds.
    note: You should not go below interval_sec=10 as it takes a couple of seconds for the API to collect the data.
  • It will save the collected data in france.json.
  • It will print the following feedback:
1/10 snapshot recorded on Nov 16 2017 11:37:37
2/10 snapshot recorded on Nov 16 2017 11:38:09
  • plot_collec(data_collec) will generate 10 .png to be turned into a .mp4.
    On linux, I use ffmepg to turns the serie of .png into a .mp4, as follow:
ffmpeg -start_number 1 -framerate 24 -i %04d.png output.mp4

If your local time doesn't match the local time of your viewers, you can correct the timestamp of your collected data by using offset_timestamp(data_collec, delta_hours).

For example, if I live in Europe and want to plot for american viewers (-7 hours compared to my local time):

from hotcollect import collect_data, offset_timestamp
from hotplot import plot_collec
data_collec = collect_data(sub='all',maxposts=10,interval_sec=30,
duration_min=5,feedback=False)
for data in data_collec:
    data = offset_timestamp(data, -7)
plot_collec(data_collec)

And finally:

  • feel free to comment my code, declare issues, propose changes, etc.
    It was a learning exercise for me, both on Python and on using GitHub.
  • it's under MIT licence which mean that you can do whatever you want with it, if I understood correctly.
    Don't do evil though, if ever you find a way to do evil things with it...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].