Here is an extract of a recording of r/all:
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)
interval_sec=10
as it takes a couple of seconds for the API to collect the data. 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.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)