using apis for data science, justin johnson keen io
DESCRIPTION
"Using APIs for Data Science" will touch on the importance of analyzing more than page views, and how providing your employees and customers with deep analytics can benefit your business. Analytics doesn't have to be a big, hairy, and complicated ordeal. Using APIs can simplify the process of collecting, storing, and analyzing data - allowing all the complicated backend work to be done for you while providing the answers and insights needed to make better product and business decisions. Justin Johnson will give an overview to how APIs can be used for data science and how some of Keen IO's customers have used Keen's data collection and analysis APIs.TRANSCRIPT
![Page 1: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/1.jpg)
Data Science via API
Presented by Justin @ All Things API on 9/23/15
![Page 2: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/2.jpg)
Analytics is the discovery and communication of meaningful patterns in data.
![Page 3: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/3.jpg)
•Some context on big data & analytics
•What is the goal of your app?
•Event data
•Common analytics methods
•Analyze some data
AGENDA
![Page 4: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/4.jpg)
SOME CONTEXT ON BIG DATA AND ANALYTICS
![Page 5: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/5.jpg)
Every company is becoming a software company. Every software company is becoming a data company.
![Page 6: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/6.jpg)
Big Data and Analytics are kind of a thing right now.
![Page 7: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/7.jpg)
COOL DATA STORIES
![Page 8: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/8.jpg)
Johannes KeplerTycho Brahe
![Page 9: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/9.jpg)
![Page 10: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/10.jpg)
![Page 11: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/11.jpg)
![Page 13: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/13.jpg)
![Page 14: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/14.jpg)
John Snow figured out Cholera spreads through water. !No one believed him :(
![Page 15: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/15.jpg)
![Page 16: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/16.jpg)
APPLYING ANALYTICS TO YOUR BUSINESS
![Page 17: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/17.jpg)
Use analytics to measure progress toward a goal.
Use analytics to test new hypotheses.
Use analytics to explore.
![Page 18: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/18.jpg)
WHAT IS THE GOAL OF YOUR APP? !Examples: !Vine: reach 1M user-generated videos. !Spotify: increase conversions to paying subscriptions
EXERCISE 1! 1 MINUTE
![Page 19: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/19.jpg)
• Account creations
• Deploys
• Purchases
• App Launches
• Views
• Posts
• Shares/Tweets/Likes
A COMMON GOAL: ENGAGEMENT
![Page 20: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/20.jpg)
INTRODUCING EVENT DATA
![Page 21: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/21.jpg)
UID twitter handle age Account ID
773345 @hipsterhacker 29 443556
773346 @TNG_S8 27 432354
773347 @modernseinfeld 28 336658
773348 @elof 30 2115789
![Page 22: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/22.jpg)
{ "event": "death", "timestamp": "2013-05-23T1:50:00-0600", "cause": "creeper explosion", "enemy": { "type": "creeper", "power": .887, "distance_from_player": 3.43, "age": .6677, }, "player": { "UID": "99234890823", "experience": 8873729, "age": 338, "inventory": [“diamond sword”, “torches”] } }
![Page 23: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/23.jpg)
entity data event datastrict schema flexible schema
normalized denormalized
shorter wider
describes nouns describes verbs
describes now describes trends over time
updates appends
big data big big big data
![Page 24: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/24.jpg)
![Page 25: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/25.jpg)
ACTIONS: Signup, Login, Upgrade, Submit, Scroll, Send, Share, Search, Check-In, Vote, Update, Purchase, Level Up, Fail, Favorite, Vote, Crash, Rate, Start, Modify, Check, View, Capture
STATE INFO: User, Company, Organization, Team, Platform, Device, App, Level, Garden, Favorites, Interests, Inventory, Cart, Video, Location, Item, Record, Product, Account, Form, Picture, Story
MORE EXAMPLES
![Page 26: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/26.jpg)
ELEVATOR PITCH TECHNIQUE
• Describe your app to a stranger and listen to the words you use.
• Verbs are the actions you should record.
• Nouns are the important contextual information you should include in your data model.
• Most apps can be very robustly described by 5-10 key events and 5-10 key nouns.
![Page 27: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/27.jpg)
ANALYTICS DBCARS, TVs, ETC.
WEBSITES WEBSITES
CUSTOMERS
DASHBOARDSMOBILE APPS
queries
queries
queries
events
events
events
![Page 28: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/28.jpg)
Recall your goal from the previous exercise. !Think at least one event you can track to measure your progress toward that goal.
EXERCISE 2! 2 MINUTES
![Page 29: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/29.jpg)
!Get into groups of 4 and come up with a simple app idea or use an existing app as an example. !What are five key event’s that are important to track? !What properties that you would be useful to track for those events?
EXERCISE 3! 2 MINUTES
![Page 30: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/30.jpg)
COMMON ANALYTICS TECHNIQUES
![Page 31: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/31.jpg)
COUNTING!99% of analytics work involves what mathematical operation?
![Page 32: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/32.jpg)
MORE BASICS
• Count Unique • Sum • Average • Min • Max
![Page 33: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/33.jpg)
ADVANCED
• Statistical Analysis • Correlation Analysis • Predictive Analysis
![Page 34: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/34.jpg)
Fancy Terms for Counting Stuff
![Page 35: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/35.jpg)
DAU/MAU
![Page 36: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/36.jpg)
EXAMPLEWhat was the average revenue per active user last month?
1. Count the number of unique users who performed some action in June (2300)
2. Sum all of the purchases from June ($5564)
3. Divide 2 by 1 ($2.40)
![Page 37: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/37.jpg)
•Sorting data into buckets. Commonly used to sort users into groups.
•Examples: Gender, Age, Location, Department, Referrer, Version, Device
SEGMENTATION
![Page 38: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/38.jpg)
•Used to reduce the data set to which a query applies
•Use any of your event properties to do filtering.
•Example: Count the number of purchases events where item.category = “add-ons” and item.price > 100.
FILTERING
![Page 39: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/39.jpg)
21% more people clicked on the red button than on the green button!
A/B TESTING AKA SPLIT TESTING
![Page 40: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/40.jpg)
Which version of the form was more effective?
EXAMPLE OF SPLIT TESTING DATA
![Page 41: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/41.jpg)
opportunity!
LAUNCHED APP (720)
STARTED RECORDING (548)
FINISHED RECORDING (269)
UPLOADED (350)
FUNNELS
![Page 42: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/42.jpg)
A cohort is a group of people who share a common characteristic over a certain period of time.
AVERAGE INCOME FOR THE GRADUATION CLASSES OF 2010 VS 2011
20K
25K
30K
35K
40K
45K
50K
YEAR 1 YEAR 2 YEAR 3 YEAR 4 YEAR 5
20102011
COHORT ANALYSIS
![Page 43: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/43.jpg)
How many customers remain customers?
How many users came back a second time?
Do my customers value my product?
RETENTION
Measure retention by counting how many users did an action X days after their first usage.
![Page 44: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/44.jpg)
RETENTION ANALYSIS BY COHORT
![Page 45: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/45.jpg)
CHURN
How many users are we losing?
!
!
Churn is the total number of users you lost in a given timeframe, divided by the total number of users you had at the beginning of the timeframe.
![Page 46: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/46.jpg)
CHURN
Churn impacts growth & profits significantly.
![Page 47: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/47.jpg)
CUSTOMER LIFETIME VALUE(CLV, CLTV, LCV, LTV)
How much is a customer worth?
Monthly Revenue x Margin x Number of
MonthsCLV =
$100/mo x 25% x 10 monthsCLV = = $250
![Page 48: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/48.jpg)
How much did it cost to get that user? !
CAC = $ spent / number of users acquired !Include amount invested in marketing, advertising, and sales. !
Customer Acquisition Cost
![Page 49: Using APIs for Data Science, Justin Johnson Keen IO](https://reader033.vdocuments.us/reader033/viewer/2022060121/55941b1c1a28abf72b8b466c/html5/thumbnails/49.jpg)