#100DaysOfCode in Python Transcripts
Chapter: Days 58-60: Twitter data analysis with Python
Lecture: Second + third day: practice projects

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Welcome back to the second day of the Twitter API lesson. And in this video, I will show you a couple of ideas and projects you could be working on.
0:12 The one we prefer, specifically, is how to make your #100DaysOfCode daily tweet. I mean, if you're doing the challenge properly,
0:20 you should tweet out every day your progress, which is a great way to share your progress and work and also have that extra push to do it.
0:27 To be accountable. And, so, we made a script when we did the 100 days to automatically tweet out our progress.
0:35 And, obviously, it uses the Twitter API to automate that. As you noticed in the lessons, we did mostly get, this would be a post request to the API,
0:47 so that would be a nice extension. And this is a related article, "How To Build a Twitter Bot". Basically, how to automate Twitter.
0:55 A very useful tool to have. Then there is this three-part code challenge you can do, which we broke down by getting the data
1:05 and do some Twitter data analysis to find out about similar tweeters. Again, you will be working with Twitter API data
1:12 and look at what Twitter users are similar. So, that could be interesting. And we have number seven, which is a Twitter sentiment analysis.
1:20 For this, you don't have to know about, like, very sophisticated machine learning libraries. Back in the day, we used TextBlob.
1:28 It was quite easy to use. Though your analysis would still be a bit more intelligent. So, you can do one or more of these challenges.
1:36 And here are some extra links if you're more interest in testing how to test an API, here's an article about parsing Twitter geo-data
1:47 and mocking API calls. So that could be interesting for you to look at how to use the patch object to mock the Twitter API, or Tweepy, in this case.
1:58 And so, this could be another thing you could be working on. You could even combine it with the Slack API. For example, to post to a channel every time
2:07 your domain gets, or whatever search term, gets mentioned, and we did that here, so this is our own 100 Days Of Code repository.
2:17 And Day 20, we had this domain mention script. So you can take this, adjust it to your needs, or build it up from scratch.
2:25 And as you see here, we used another library, Twython, which is also very nice to talk with the Twitter API.
2:34 And we use the Twython streamer to look at Twitter data in real time. So, the other thing that you can do, which is very interesting,
2:41 is look at Twitter's streaming API and combine that with Slack. It would be a very cool project to work on.
2:47 Another option is to export your Twitter archive. That'll get you a CSV file. And then Day 37, you should have learned about
2:55 parsing CSV, so you could also do that to get a similar Twitter archive report with some stats. One other example, we did a guest post
3:06 the other day on Real Python. Another thing you could do is read through this article and see how you can use the
3:13 Twitter API to convert tweets of a particular handle into a nice web app. So, those are quite some projects and examples.
3:22 You can look through them and take whatever interests you. The goal, really, is to get more practice using the Twitter API with Python.
3:31 And, with that said, don't forget to have fun, and keep calm, and code in Python.


Talk Python's Mastodon Michael Kennedy's Mastodon