ben carls l_tron

21
@L_Tron_CTA: A Friendly Bot with an Eye on Chicago’s ‘L’ Ben Carls

Upload: ben-carls

Post on 06-Apr-2017

47 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Ben carls l_tron

@L_Tron_CTA: A Friendly Bot with an Eye on Chicago’s ‘L’Ben Carls

Page 2: Ben carls l_tron

The Chicago Transit Authority (CTA) operates the ‘L’ (elevated)

• Overwhelming amount of data exists for describing the system

• CTA Twitter account is still operated by a person in a control room

• Could we do better?

Page 3: Ben carls l_tron

A Twitter bot sends out timely information

Pulls data from sources

Analyzes data, finds what’s important

Creates sentence and posts it to Twitter

Page 4: Ben carls l_tron

Famous examples

Page 5: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 6: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 7: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 8: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 9: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 10: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Page 11: Ben carls l_tron

Wealth of structured data exists for the ‘L’ amongst other things in Chicago

Okay! Okay! Most of this is irrelevant! How do I quickly find out what actually matters?

Page 12: Ben carls l_tron

What kinds of events impact train travel and are worth mentioning? Chicago Cubs’ games?

Daily ridership for Addison Stop (Red), right where the Chicago Cubs play

Page 13: Ben carls l_tron

Random forest modeling ridership showed baseball mattered, bot tweets it

Trained on 2011-2013, tested on 2014-2015

Here used day of the week and day of the year as features

Page 14: Ben carls l_tron

Random forest modeling ridership showed baseball mattered, bot tweets it

Trained on 2011-2013, tested on 2014-2015

Here used day of the week, day of the year, and if there was a Cubs game that day as features

Page 15: Ben carls l_tron

‘L’ Tron works 24/7 on an EC2 instance

Find what the person wants

Compare data to timetable and look for delays

Search for other events (e.g. baseball), compare to ridership model

Thread 1: Every 5 minutes

Query CTA server for data via API

Thread 2: Someone talks to ‘L’ Tron

Look for data from Thread 1 to respond with

Page 16: Ben carls l_tron

What should I tweet to my audience?

Find a line delay > 5 minutes?No

Is there a baseball game?Yes

No

Does the system look okay?

NoYes

YesTweet it out!

Tweet it out!

Tweet it out!

Tweet it out!

Following from Thread 1:

Page 17: Ben carls l_tron

Language generation starts with a large, human-written corpus

"[route_name] line trains on their way toward [destination] are running roughly [delay_minutes] [minute_s]late.”"[route_name] line trains on their way toward [destination] have fallen roughly [delay_minutes] [minute_s]behind schedule.”"[route_name] line trains on their way to [destination] are running roughly [delay_minutes] [minute_s] late.”"[destination] headed [route_name] line trains have fallen roughly [delay_minutes] [minute_s] behind schedule.”"[destination] bound [route_name] line trains are running roughly [delay_minutes] [minute_s] behind schedule.”"[destination] bound [route_name] line trains have fallen roughly [delay_minutes] [minute_s] behind schedule.”

Each tweet template is categorized for a particular use case

Page 18: Ben carls l_tron

A template is chosen at random and filled in as needed

"[destination] bound [route name] line trains are running about [delay_minutes] [minute_s] behind schedule."

”O’Hare bound Blue line trains are running about 12 minutes behind schedule."

If a delay of 12 minutes is found on the O’Hare bound Blue line, those details are inserted into the template

Page 19: Ben carls l_tron

‘L’ Tron - CTA is alive and tweeting!

Page 20: Ben carls l_tron

I lived here

I worked here

Page 21: Ben carls l_tron

High-resolution imaging detectors for particles and 3D data visualizations

Looking for the Higgs boson at Fermilab