Data Science Tutorials
Below are the slides, exercises, and code for the data science workshops that I teach at the Institute for Quantitative Social Science at Harvard University.
Introduction to Python
Python is a widely used, general purpose programming language. It features a large user community and a number of useful libraries and frameworks for a wide range of tasks. This tutorial introduces the elements of Python that are commonly used for data cleaning, analysis, visualization, and other applications. Instructions are also provided for setting up a development environment on a personal computer. This tutorial is intended for researchers who are new to programming. No experience is required.
Introduction to Web Scraping With Python
Web scraping is a method of extracting and restructuring information from web pages. This tutorial introduces techniques for web scraping using the popular Python libraries BeautifulSoup and Requests. Exercises include accessing websites, parsing information, and storing data in a CSV file. This tutorial is intended for researchers who are new to web scraping, but are familiar with Python or have completed the Introduction to Python tutorial.
Introduction to Using APIs With Python
An application programming interface (API) is a tool that allows computers to communicate and share information. For researchers, APIs can be useful for accessing data or services from firms, organizations, or government agencies. This tutorial introduces techniques for working with APIs to retrieve data from sources such as Google Maps, using the popular Python library Requests. This tutorial is intended for researchers who are new to working with APIs, but are familiar with Python or have completed the Introduction to Python tutorial.