Build your ultimate AI agent
Course Description
As a data scientist, you will need to clean data, wrangle and munge it, visualize it, build predictive models and interpret these models. Before you can do so, however, you will need to know how to get data into Python. In the prequel to this course, you learned many ways to import data into Python: from flat files such as .txt and .csv; from files native to other software such as Excel spreadsheets, Stata, SAS, and MATLAB files; and from relational databases such as SQLite and PostgreSQL. In this course, you'll extend this knowledge base by learning to import data from the web and by pulling data from Application Programming Interfaces— APIs—such as the Twitter streaming API, which allows us to stream real-time tweets.The videos contain live transcripts you can reveal by clicking "Show transcript" at the bottom left of the videos.
The course glossary can be found on the right in the resources section.
To obtain CPE credits you need to complete the course and reach a score of 70% on the qualified assessment. You can navigate to the assessment by clicking on the CPE credits callout on the right.
Feels like what you want to learn?
Start Course for FreeWhat you'll learn
- Define JSON key-value structures and load such data into Python dictionaries
- Distinguish between Twitter’s REST and Streaming APIs and authentication with tweepy
- Identify appropriate Python modules and functions for importing web-based data
- Recognize the components of a URL and the flow of an HTTP GET request
Prerequisites
Curriculum
Course outline
1
Importing data from the Internet
The web is a rich source of data from which you can extract various types of insights and findings. In this chapter, you will learn how to get data from the web, whether it is stored in files or in HTML. You'll also learn the basics of scraping and parsing web data.
- Importing flat files from the web50 XP
- Importing flat files from the web: your turn!100 XP
- Opening and reading flat files from the web100 XP
- Importing non-flat files from the web100 XP
- HTTP requests to import files from the web50 XP
- Performing HTTP requests in Python using urllib100 XP
- Printing HTTP request results in Python using urllib100 XP
- Performing HTTP requests in Python using requests100 XP
- Scraping the web in Python50 XP
- Parsing HTML with BeautifulSoup100 XP
- Turning a webpage into data using BeautifulSoup: getting the text100 XP
- Turning a webpage into data using BeautifulSoup: getting the hyperlinks100 XP
2
Interacting with APIs to import data from the web
In this chapter, you will gain a deeper understanding of how to import data from the web. You will learn the basics of extracting data from APIs, gain insight on the importance of APIs, and practice extracting data by diving into the OMDB and Library of Congress APIs.
3
Diving deep into the Twitter API
In this chapter, you will consolidate your knowledge of interacting with APIs in a deep dive into the Twitter streaming API. You'll learn how to stream real-time Twitter data, and how to analyze and visualize it.
Intermediate Importing Data in Python
Course
Complete

