39
7/28/2011 Check-in and Waffles Ben Lee - @benlee Data and Explore! Friday, July 29, 2011

Foursquare Data and Explore Final

Embed Size (px)

DESCRIPTION

On Thursday, 7/28, @benlee gave a talk at the Check-in and Waffles developer event at foursquare SF covering our unique data and the Explore recommendation engine.If you love data as much as we do, join us (@injust, @rathboma, @benlee, @maxsklar and @chimeracoder) on foursquare's data team

Citation preview

Page 1: Foursquare Data and Explore Final

7/28/2011 Check-in and Waffles Ben Lee - @benlee

Data and Explore!

Friday, July 29, 2011

Page 2: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Overview

• Data intro

• Explore recommendation engine

• Technology stack

• More infographics

Friday, July 29, 2011

Page 3: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Data model at a glance

Check-ins

Users

Venues

@

8 PM“Lobster roll!”

Friday, July 29, 2011

Page 4: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Data model at a glance

> 10 million

> 15 million

> 750 million> 3 million / day

Check-ins

Users

Venues

@

8 PM“Lobster roll!”

Friday, July 29, 2011

Page 5: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Our data

• Human mobility patterns

• Explicit geo-spatial/temporal data

• Many ways to interpret, filter, slice, visualize

Friday, July 29, 2011

Page 6: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Growth

Friday, July 29, 2011

Page 7: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Wall Street Journal Study

• Week of Jan 21, 2011

• Firehose of ~10.9 million checkins

• Examined NYC vs SF Bay area

Friday, July 29, 2011

Page 8: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

WSJ NYC Heatmp

Friday, July 29, 2011

Page 9: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

WSJ SF Heatmap

Friday, July 29, 2011

Page 10: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

WSJ factoids• NYC vs SF Bay Area

• Male vs Female

• Women check into sushi, libraries, karaoke more

• Men check into burgers, tech startups, gay bars more

• 50/50 split on mexican, ramen, beaches, desserts

• http://graphicsweb.wsj.com/documents/FOURSQUAREWEEK1104/

Friday, July 29, 2011

Page 11: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Explore

• Social recommendation engine

• Leverage check-in data

Friday, July 29, 2011

Page 12: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Coffee?

• Realtime recommendations

• Time of day

• Previous checkins

• Friend history

• User history

Friday, July 29, 2011

Page 13: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Time of day

• Relevant for the time of day, day of week

• Affinities for different categories at different times

• Per-venue check-in distribution over time is useful

Friday, July 29, 2011

Page 14: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Tartine Bakery

Friday, July 29, 2011

Page 15: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

DNA Lounge

Friday, July 29, 2011

Page 16: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Blue Bottle

Friday, July 29, 2011

Page 17: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Previous checkins

•We are not unique snowflakes

•Median user checks-in at to a place that their social circle has been to before > 60%

repeat checkin %

Friday, July 29, 2011

Page 18: Foursquare Data and Explore Final

Friend history

• Social justification

•Call out “similar” friends

• Surface their tips

Friday, July 29, 2011

Page 19: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

User history

• Places I’ve been

Friday, July 29, 2011

Page 20: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

User history

•Highlight places “similar” to places I’ve been

Friday, July 29, 2011

Page 21: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Venue similarity

People that go to Blue Bottle, also go to:

Friday, July 29, 2011

Page 22: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Venue similarity

People that go to Tartine, also go to:

Friday, July 29, 2011

Page 23: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Computing similarity

Incredibly SparseMatrixU

sers

VenuesNYC Food sample

Friday, July 29, 2011

Page 24: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Computing similarity

Incredibly SparseMatrixU

sers

Venues vi vj

for all i,jsim(vi, vj)

Venue similarity

Take a flavor of co-occurrence based similarity

Friday, July 29, 2011

Page 25: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Computing similarity

Incredibly SparseMatrixU

sers

Venues

ui

uj

for all i,jsim(ui, uj)

User similarity

Friday, July 29, 2011

Page 26: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Similarity pipeline

• Input: Mongo dumps on S3 or HDFS

• Java mapreduces via Hadoop / Elastic Mapreduce

• Load output into Mongo for serving

Friday, July 29, 2011

Page 27: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Mapreduce overviewvisited venues map

reduce

vi, vj

vi, vj

vi, vj

user

emit “all” pairs of visited venues for each user

Sum up each user’s score contribution to this pair of

venues

score

score

key

key

score scorescore ...

...

final score

Friday, July 29, 2011

Page 28: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Putting it all together

User’s check-in history

Friends’ check-in history, similarity

Nearby relevantvenues

Similar Venues

MOAR Signals

< 200 ms

Friday, July 29, 2011

Page 29: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Explore performance

• Track behavior over time

•Measure improvements

• Run experiments

Model updated

Friday, July 29, 2011

Page 30: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Explore in the future

• We’ve just started!

• New controls

• Beyond here/now

Friday, July 29, 2011

Page 31: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Data Stack

• MongoDB (production)

• Amazon S3, Elastic Mapreduce

• Hadoop

• Hive

• Flume

• R/RStudio

Friday, July 29, 2011

Page 32: Foursquare Data and Explore Final

6/28/2011 Big Data Camp Ben Lee - @benlee

Hive interface

Text

Friday, July 29, 2011

Page 33: Foursquare Data and Explore Final

6/28/2011 Big Data Camp Ben Lee - @benlee

Rudest cities

Friday, July 29, 2011

Page 34: Foursquare Data and Explore Final

6/28/2011 Big Data Camp Ben Lee - @benlee

Boca is Nice!

Friday, July 29, 2011

Page 35: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Happiness analysis• Aditya Mukerjee’s awesome work

• Happy

• “woohoo!” SF

• “i love you, bone-in filet. so, so much.” NYC

• Sad

• “stupid at&t and no reception” SF

• “fuck mondays” NYC

Friday, July 29, 2011

Page 36: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and WafflesFriday, July 29, 2011

Page 37: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

*pocalypse• A tradition of hyperbole

• Snowpocalypse 2011

• Heatpocalypse 2011

• NY State senate passes marriage equality 6/24 Marriage Equalitocalypse

Friday, July 29, 2011

Page 38: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Aditya’s Equalitocalypse gephi viz

Friday, July 29, 2011

Page 39: Foursquare Data and Explore Final

Ben Lee - @benlee7/28/2011 Check-in and Waffles

Love data?

• Join the team!

• http://foursquare.com/jobs

Friday, July 29, 2011