Exploratory Data Analysis & Visualization, Spring 2015: Intro to APIs and examples in Python Yu Tian, Christine Lee March 31, 2015.

Slides:



Advertisements
Similar presentations
12-CRS-0106 REVISED 8 FEB 2013 PRESENTS vTools Voting: Getting Voter List.
Advertisements

Microsoft Office Illustrated Fundamentals Unit C: Getting Started with Unit C: Getting Started with Microsoft Office 2010 Microsoft Office 2010.
Starter for 10 Unit 12: Twitter Transform IT SFT12_Twitter.
Author Instructions How to upload a full session proposal with abstracts – two step process.
The Fastest Growing Mobile Marketing Platform on the Planet!
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE Tutorial How to get started.
Introduction To Windows NT ® Server And Internet Information Server.
Soni Sarin, Gina Striffolino, Chioma Ihekweazu, Mary Rhee December 7, 2010 ENGL 393.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 21: Publishing Your Pages on the Web.
How to make it easy for you customers to find and research you and your services!
Section 13.1 Add a hit counter to a Web page Identify the limitations of hit counters Describe the information gathered by tracking systems Create a guest.
AppExchange Partner Academy- Building Your Application Listing By Jesse Dailey.
PASSWORD MANAGEMENT MADE EASY A Project Play Date - September 26, 2008 Beth Carpenter, Library Services Manager, Outagamie Waupaca Library System.
Core Publisher: Station Administrator Tools. Training 1: Site Administration Training 2: Programs Training 3: Content Tagging Training 4: Creating Posts.
Level 2 IT Users Qualification – Unit 1 Improving Productivity
December 10th Inservice Presenter: Linda Lopresti 9-10 English Department (K112) Contact Info: twitter:
Microsoft Office Communicator A General Introduction.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
Integrating with UCSF’s Shibboleth system
Objective To create a professional, affordable, and easy to use website Create a user friendly interface with accessibility and effortless navigation.
Office of Educational Technology School District of Philadelphia Introduction to Sites Google Sites This presentation is available at
Level 2 IT Users Qualification – Unit 1 Improving Productivity Chris.
BI Funcasts The Mac-Guyver Techniques BI - The Mac-Guyver Techniques : Office Sharepoint Excel Services Gunter Staes –
JavaScript – Quiz #9 Lecture Code:
SPAM Settings. The ExchangeDefender Admin Site is a powerful tool that gives you access to all of the benefits ExchangeDefender has to offer, from the.
Downloading and Installing Autodesk Revit 2016
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
Google Apps (Education Edition) A step guide to a successful deployment January 10 th, 2008 California Technology Assistance Project
Level 2 IT Users Qualification – Unit 1 Improving Productivity JACK GOODING.
Social Media 101 An Overview of Social Media Basics.
USER MANUAL USER MANUAL 21 June TABLE OF CONTENTS System Description4 How It Works?5 PLUGIN Maxxbooking Plugin6-7 Hotel Info & Description8-9 Availability.
Soni Sarin, Gina Striffolino, Chioma Ihekweazu, Mary Rhee December 7, 2010 ENGL
Aviary’s Myna Audio Editor A more innovative, free, online audio editing program.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
© 2008 General Parts International, Inc. Written permission is required to copy or forward to anyone other than the intended recipient. TeammateTime Store.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Level 2 IT Users Qualification – Unit 1 Improving Productivity Carl.
Satisfy Your Technical Curiosity 27, 28 & 29 March 2007 International Convention Center (ICC) Ghent, Belgium.
Building consumer apps with Azure AD B2C
TRUSTED CHOICE. SPROUT SOCIAL PRICING 3 Custom plan for MARC Based off of previous clients with a similar number of pages and around 500 profiles -
Personal Branding. Objectives How do you see yourself? How do others see you? What is your personal brand?
Trimantra Software Solution Offshore Software Development Outsourcing Company Visit :
Kwiksites Instant Website Creation Guide by Arvic Search Services Inc /20/2012Arvic.
Your Choices, Your Future A simple guide. All applications for 6 th form places, college courses and apprenticeships will be made through one website.
Website Tools & Resources Navy League of the United States Citizens in Support of the Sea Services Building an Online Presence for Your Council What is.
How to Make Yourself More Secure Using Public Computers and Free Public Wi-Fi.
1 Terminal Management System Usage Overview Document Version 1.1.
Seamlessly customize and update content for each and every location.
Defining Networking Chapter 2.
Core ELN Training: Office Web Apps (OWA)
Social Network.
BASIC API ON WEBSITE.
Introduction to gathering and analyzing data via APIs Gus Cavanaugh
EXHIBITOR PRE-SHOW MARKETING CHECKLIST
Westmidland Websites Birmingham Office
Beyond the BDC\BCS Model
Data Virtualization Tutorial… OAuth Example using Google Sheets
HISTORY Of API.
AppExchange Partner Academy- Building Your Application Listing
New Integration FEATURES Presented By: LOGAN CASHWELL.
to the Fort Worth Chamber’s Member Information Center
Using K2 applications How can users interact with K2 applications?
Please thank our sponsors!
Overview of features for new and returning users
ARCHITECTURE OVERVIEW
Interactive Schedule Builder
Microsoft Office Illustrated Fundamentals
Transition Readiness Review
Concord Products Online
Power BI Embedded for Fun and Profit
Presentation transcript:

Exploratory Data Analysis & Visualization, Spring 2015: Intro to APIs and examples in Python Yu Tian, Christine Lee March 31, 2015

What we aim to go over today:  Overview to APIs. Why should we care?  How do APIs work?  Indeed.com API quick example with Python/R  Demo of Yelp API with Python/R - 1 -

- 2 - What are APIs?  API stands for Application Programming Interface – a way for applications to talk to each other. APIs are the secret plumbing of the web. They are a way to get the functionality of an application (such as Twitter, Facebook) without visiting the website for that application.  Why is it valuable? Websites are designed to cater to human's strengths. Yet, what happens when you face a very time-intensive task, like copying the contact info for a thousand customers from one site to another? You would love to delegate this work to a computer so it can be done quickly and accurately. The solution is an API. API is the tool that makes a website's data digestible for a computer. Through it, a computer can view and edit data, just like a person can by loading pages and submitting forms.

- 3 - Interfaces & servers APIs create standards for what kind of information applications expect to receive from other applications, and from user interfaces.  One interface might talk to several applications. One application might talk to several interfaces. For example, twitter.com is just one interface for twitter; facebook.com is just one interface for facebook.  (It helps to remember that the API is simply another program running on the server.)

sides in an integration of an API: client & server When two systems (websites, desktops, smartphones) link up through an API, we say they are "integrated." In an integration, you have two sides, each with a special name. One side we have already talked about: the server. This is the side that actually provides the API. The other side is the "client." This is a separate program that knows what data is available through the API and can manipulate it, typically at the request of a user. A great example is a smartphone app that syncs with a website. When you push the refresh button your app, it talks to a server via an API and fetches the newest info.

- 5 - An example: smartphone app pizza parlor API  APIs receive “calls” that tell them: –Who you are –What you want the API to do –What it needs to know in order to do that  Example: In this scenario, the pizza parlor API is the server and the smartphone app is the client. A customer uses the app to choose a pizza and then hits a button to place the order. As soon as the button is pressed, the app knows it needs to make a request to the pizza parlor API.

- 6 - Why APIs matter Before 2010 the concept of API use is not widespread…  Projected Open API Growth Rate (Source: Craig Burton and Phil Windley)

- 7 - Why APIs matter Why do companies open up API use? 1) APIs let your product grow faster than you can build it. Twitter’s case: anyone who wants to build a better product/app with our platform, go ahead -  What happened then: Many developers then built apps/businesses with the Twitter API  What this meant: 1.Twitter users have different ways to access the Twitter system through different apps; 2. The developer ecosystem enabled / help drive growth of the Twitter platform to where it is today. 2) APIs might be important for product launches. Examples: - Google+ in its first 2 years; - Bitly’s bundle product didn’t have an API and hence lost developers’ interest early on.

- 8 - Limitations with API use Some key limitations:  Not every platform or company has an API, or useful API. Examples: Google+ in its first 2 years; Bitly’s bundle product  Some APIs may have limitations or restrictions to full data access Example: LinkedIn’s API will be restricting full access to select partners  If you are developing an app/business on a platform’s API, you may be at the mercy of that company’s API policy and agendas

- 9 - APIs made it possible for data to be exchanged in ways that weren’t possible before OAuth lets an application interact with a platform on behalf of a user. Application: Favstar.fm Platform: Twitter User: You

Oauth example: Syncing AmEx card with Foursquare to unlock savings  AmEx uses Foursquare on your (user’s) behalf. Which means AmEx can access your Foursquare data, but NOT that Foursquare can access your AmEx data. Application: AmEx Platform: Foursquare User: You

Authentication We know who the client and server are, and we know they speak in specific data formats to understand each other. Knowing how to talk, though, leaves an important question: how does the server know the client is who it claims to be? Key terms:  Authentication: process of the client proving its identity to the server  Credentials: secret pieces of info used to prove the client's identity (username, password...)  Basic Auth: scheme that uses an encoded username and password for credentials  API Key Auth: scheme that uses a unique key for credentials

Authentication There are several techniques APIs use to authenticate a client. These are called authentication schemes. Let's take a look at two of these schemes now.  Basic Authentication - only requires a username and password. Why does using the same username and password to access the API and manage the account is not ideal? There may be times when the client should have different permissions than the account owner. Take for example a business owner who hires a contractor to write a program that uses an API on their behalf. Trusting the contractor with the account credentials puts the owner at risk because an unscrupulous contractor could change the password, locking the business owner out of their own account.  API Key Authentication - API Key authentication is a technique that overcomes the weakness of using shared credentials by requiring the API to be accessed with a unique key. In this scheme, the key is usually a long series of letters and numbers that is distinct from the account owner's login password. The owner gives the key to the client, very much like a hotel gives a guest a key to a single room.

Demo: Indeed.com API request  A web search on indeed.com  Indeed API’s available parameters

APIs receive “calls” that tell them: - Who you are - What you want the API to do - What it needs to know in order API call in Python – using an example from a Github repo –create a free Publisher account to receive an API key and access tools to receive job data –define required parameters

API result output from Python converted to a csv table

Now, the fun part – mapping API data onto geographic map in R  How to visualize Indeed job search results in an interesting way?  Packages used in R: Leaflet

On selecting map tiles / creating custom base maps on Mapbox  Insert text here –Insert text here

Indeed job search results mapped with Leaflet package in R

Zooming in..

References for this presentation Sources for some of the case examples an illustrations in the section on Intro to APIs: –Matt LeMay, “The What and Why of APIs” –Zapier, Introduction to APIs -