In my program I am getting tweets from twitter for a specific query. I want to calculate how frequent people tweet about this topic. Up to now what I did is;
- I got the dates of two tweets and found the difference
- sum up those differences and divided it to number of tweets.
However, there is a problem which is the number of tweets can be odd so every time I can’t get two tweets and this situation may give me wrong answer.
So what can I do for this problem? Or is there a better way to find how frequent people tweet?
I am using twitter4j.
Currently, you’ve got a complicated way of finding the mean average 😉
Your algorithm can be simplified to “Take the date difference between the first and last tweets, and divide by the number of tweets”.