Conquer Social Media through the Twitter API
Learn how to access widely available social media data using APIs and apply it to the stock market!
Watch PromoFirst things first: What even is an API?
API stands for Application Programming Interface. It helps you get in contact with a program or website and grab information that they are offering you, for free. Its aim is to connect you to another program.
APIs are available on most modern websites (Youtube, Twitter, Facebook, etc), and provide an easy way to integrate the websites functionalities into your code.
You can think of it as using Facebook to log in to another website, or using Google Maps locations to track where a restaurant is on a reviews website.
API's condense all the code from all these huge websites down to usable pieces of data that you can grab for yourself.
The API that we will focus on in this course is the Twitter API, and we will be using it to mine tweets about a specific event.
Social media, especially twitter, is becoming a hot topic among many investors, as its trends can often predict behavior of the stock market.
Why?
Because Twitter is so speedy. People tweet live events as they are happening, and this news travels so fast - faster even than the stock market can react sometimes.
So, naturally, I thought this would be super cool to investigate. That is why this course will focus on how Twitter data can be live-streamed, and will feature a worked example of the event of the Yahoo hack from December 14th, 2016 (1 billion accounts were compromised).
"This course starts from the A,B,C's and then goes into depth step-by-step. Although the course is for absolute beginners, those who want to learn more about the Twitter-API can benefit from taking the course as well. As far as I have experienced, Max used a good approach by tackling the social media analysis. if you have beginning level python knowledge and you are an aspiring data science, I would definitely recommend taking this course. This course gives you basic knowledge about using API's, plotting figures, and extracting and filtering meaningful data from a social media platform."
- Faisal Ghaffar, Data Scientist (PhD Scholar)
Course Curriculum
-
StartWhat are APIs? (8:42)
-
PreviewPrerequisite Libraries (4:00)
-
StartGetting your Twitter Credentials for Authentication (2:42)
-
StartTwitter Time Limitations (3:16)
-
PreviewA Short Intro to Plotting with Matplotlib-Pyplot (10:58)
-
PreviewSending Your First Request to the Twitter API (13:35)
-
StartDealing with Data in the Response (16:25)
-
StartGetting Tweets from a Specific Time (11:04)
-
StartGetting All Tweets by Moving Backwards in Time (17:42)
-
StartFiltering for English Tweets and Picking Out Keywords (12:33)
-
StartIdentifying Relevant Tweets and Keeping Track of Data (15:43)
-
StartSetting Up for Plotting the Mined Data from Twitter (16:47)
-
StartAdjusting the Maximum Time and Adding Ticks to Our Graph (10:21)
-
StartAnalyzing the Relevant Data (11:11)
-
StartStreaming Live Twitter Data and Outlook for the Next Steps (14:13)
Frequently Asked Questions
Your Instructor
In June 2016, I graduated with a degree in Physics, but instead of delving into a life of research and the lab, I decided to explore other possible options for my life and career.
I found myself more and more drawn towards programming, data mining, data processing, and data analytics. So I decided to teach myself Python, C, C++, Machine Learning, Data Science, Web-Scrapping, APIs, and Data Mining.
Now, I work as a Data Scientist for an e-sports company (total dream job).
So, I thought I would turn the tables and teach you all the knowledge I've been able to gather to make you the ultimate programmer or data scientist.
I have over 9,000 students on various platforms learning programming and data science - join them and get started with your project!