function findAggregateResults($query, $from_pg, $to_pg) { global $positive, $negative; $tweets = tweetCollector($query, $from_pg, $to_pg); foreach ($tweets as $tweet_id => $tweet_details) { findCatagory($tweet_id, $tweet_details["text"]); } arsort($positive); asort($negative); return $tweets; }
function collectTweets($query, $from_pg, $to_pg) { writeToCSV(tweetCollector($query, $from_pg, $to_pg), $query); }