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