Skip to content

Releases: uclatommy/tweetfeels

Hotfix

10 Nov 15:52
Compare
Choose a tag to compare
  • Fix compatibility with Python 3.7
  • Updated pandas function call to remove the deprecation warning.

0.4.0

13 Mar 00:49
Compare
Choose a tag to compare

Added

  • Improved interface for TweetData.fetchbin.
    • A new parameter empty allows you to enable returning empty bins.
    • The return type is now a TweetBin instead of a tuple.
  • Improved interface for TweetFeels.sentiments generator.
    • A new parameter nans allows you to enable a nan sentiment value to be returned when data is missing.
    • The return type is a Sentiment object.

Hotfix

09 Mar 04:38
Compare
Choose a tag to compare
  • Adds the missing interface for parameterizing the real-time sentiment.

0.3.0

06 Mar 06:59
Compare
Choose a tag to compare
  • Adds a generator to tweetfeels to generate sentiment values in series
  • Allows user to change the bin size for the real-time sentiment calculations.

Hotfix

27 Feb 00:46
Compare
Choose a tag to compare
0.2.1

0.2.0

27 Feb 00:57
Compare
Choose a tag to compare

The following features were added:

  • Additional pos, neu, and neg dimensions added to tweet data
  • Datetime is now stored in data as a datetime object rather than string
  • Tweetfeels will now attempt to reconnect to twitter when the connection is interrupted
  • Improved data handling for stream data.

This release changes the format of the sqlite3 database which keeps the history of all tweets. As a result, you will need to convert any databases that were created with the 0.1 version. This can be done like so:

from tweetfeels import TweetData, Tweet
import time

def to_dict(row):
    ts = time.strftime('%a %b %d %H:%M:%S +0000 %Y', row.created_at.to_pydatetime().timetuple())
    return {
        'id_str': row.id_str, 'created_at':ts, 'text':row.text,
        'favorite_count':str(row.favorite_count), 'favorited':str(row.favorited),
        'lang':'en', 'retweet_count':str(row.retweet_count), 'source':row.source,
        'user':{'friends_count':str(row.friends_count), 'followers_count':str(row.followers_count),
        'location':row.location}
        }

if __name__ == "__main__":
    old_db = TweetData('feels-0.1.sqlite')
    new_db = TweetData('feels-0.2.sqlite')

    for df in old_db.all:
        for row in df.itertuples():
            t = Tweet(to_dict(row))
            new_db.insert_tweet(t)

Update the filenames for the old_db and new_db accordingly.