Code Monkey home page Code Monkey logo

getting-data's Introduction

logo Getting Data: HTTP, APIs, and Webscraping

Learning Objectives

At the end of this session, you will:

  • Have a clear understanding of how APIs work, and why they are increasingly prevalent
  • Know how HTTP protocol works
  • Gain first hand experience using your very first API
  • Learn the basics of webscraping
  • Webscrape your first page
  • Develop an exposure to various Python development tools (Spyder, Jupyter Notebooks)

Lesson Materials

Introduction

Our intro deck is here

HTTP

Our discussion of how HTTP works is here.

Using Our First API!

Visit the API we'll be using here: www.omdbapi.com

The .py file (that we used in Spyder) to make requests and use our very first API (gasp!) is available here

OR

Chuck Norris API: link

Scraping

We'll now discuss scraping.

Our first example page is this page. We'll use this script in Spyder.

Live Scraping

The moment we've (I've) been waiting for: live scraping.

http://www.opentable.com/washington-dc-restaurant-listings

Let's use this notebook. We're going to stop before the Selenium portion, given time constraints. I welcome you to complete the remainder of the notebook independently. :)

NOTE: when scraping websites, not all elements are static. We need a solution. We may not have time to cover headless browsers, but I will leave this Jupyter notebook available for you.

Bonus

Use Your Second API - the Department of Commerce API!

Use this .py file to work with the Dept of Commerce API!

For this part of the lesson, we're going to want to use a few tools:

Additional Resources

getting-data's People

Contributors

josephofiowa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.