Onosendai icon indicating copy to clipboard operation
Onosendai copied to clipboard

Track and display feed stats

Open haku opened this issue 11 years ago • 0 comments

As a user who scrolls past ~500 tweets a day I would like to track and visualise the post-rates of each column over time Because I am strange like that

The precise data structure to generate needs some more thinking, but something like: (pseudo SQL)

create table col_stats (
  col_id int,
  epoch_hour long,
  count int
)

After each fetch, for each epoch hour that has fully elapsed, query tweets table and add counts to stats table. That is only 8760 rows per column per year, so can easily keep a good amount of history.

e.g. per hour counts for a column over last day:

select time/60/60 as eh, count(*) from tw where colid=0 group by eh order by time desc limit 24;

haku avatar Mar 26 '13 10:03 haku