Closed ryancallihan closed 5 years ago
So this table will be keyed with a composite of [text, date]
CREATE TABLE top_terms (subject TEXT, count INTEGER, total_sent REAL, type INTEGER, date DATE, avg_sent REAL, PRIMARY KEY(subject, date))
Also, this is probably best done using a SELECT INTO
statement, if that's supported by SQLite. Otherwise, there's a whole unnecessary serialisation/deserialisation step into python objects and back. A timed job would only need to run once a day.
It would be useful to be able to see a summary of tweets throughout the day/week/month/etc.
Basically, there are a couples ideas:
Save top terms for the day:
Save top tweets:
Save the highest weighted tweets from the day. This could also be done throughout the day. (Once an hour, for example)