I have a small data set of all the retweets in Mongodb. I want to count the average retweet of all the tweets.
I can do that in Python but I was wondering if I can do that in one command in Mondodb.
This is what I have got so far.
db.getCollection('raw_tweets').aggregate([
{"$group" : {_id:"$retweeted_status.id_str", count:{$sum:1}}}
])
This would count all the retweets. However, I want to average that number. Not sure if it's possible?