Interesting Twitter Data

It is probably fairly well known, but new to me, so sharing. Going through my twitter settings, I stumbled across the option to pull your personal tweet archive. They put together an archive with a nice HTML interface to browse them. More interesting is that each day’s worth of tweets is an very parseable JS file (2008_05.js) with entries like this:

{
  "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
  "entities": {
    "user_mentions": [],
    "media": [],
    "hashtags": [],
    "urls": []
  },
  "geo": {},
  "id_str": "820985823",
  "text": "break from ontology class...nothing new so far :(",
  "id": 820985823,
  "created_at": "2008-05-27 00:00:00 +0000",
  "user": {
    "name": "James Birchfield",
    "screen_name": "birchsport",
    "protected": false,
    "id_str": "14919086",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/942449706436911105/5-DiYQxG_normal.jpg",
    "id": 14919086,
    "verified": false
  }
}
2 Likes

Here are the steps, for those interested: https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive

3 Likes

TY @jeremy for sharing the link…that would have been useful for me to do in the first place. :slight_smile:

Another guide to extract tweets and do sentimental analysis on those. We can use tweepy wrapper around twitter API.

1 Like