analytics: a practical guide - harvard university · applied analytics guide the "applied...

41
ANALYTICS: A PRACTICAL GUIDE TOM SCHENK JR. CHIEF DATA OFFICER, CITY OF CHICAGO @CHICAGOCDO SEAN THORNTON PROGRAM ADVISOR, CIVIC ANALYTICS NETWORK @THORSEAN

Upload: others

Post on 31-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

ANALYTICS: A PRACTICAL GUIDE

TOM SCHE NK JR .CHIE F DATA OFF ICE R , C ITY OF CHICAGO

@CHICAGOCDOSE AN THORNTON

PROGRAM ADV ISOR , C IV IC ANAL YT ICS NE TWORK@THORSE AN

Page 2: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Source: techplan.cityofchicago.org

IN CHICAGO, WE BELIEVE THAT THE POWER OF TECHNOLOGY IS DRIVEN

BY THE PEOPLE WHO USE AND BENEFIT FROM IT.

Page 3: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

APPLIED ANALYTICS GUIDEThe "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze, and address important problems with the advanced use of data. When implemented, the process can lead to new operational methods that enhance operational efficiency and effectiveness, as well as improve quality of life for residents.

Page 4: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

1. IDENTIFY PROBLEM

Page 5: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,
Page 6: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

The objective for this research project is to order inspections to increase the speed of finding critical violations at retail food establishments.

Optimizing Inspections

Page 7: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Image adapted from Michael Mooney’s Little Chicago (CC-BY 2.0).

Page 8: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

2. RANK PROBLEMS

Page 9: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,
Page 10: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

3. DEEP DIVE

Page 11: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

© 2015 PBS Newshour

Page 12: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

4. DATA ACQUISITION

Page 13: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Chicago leveraged the #opendata portal to share data with external researchers, leveraging the city’s premiere method of sharing data and saving time on data-sharing agreements to create #predictions.

Using #opendata

Page 14: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

DATA SOURCES

Food Inspection

History

License Number

Business Licenses

Date

Weather

Date & Location

Crime

Garbage Cart Requests

Sanitation Complaints

Page 15: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

5. MODEL DEVELOPMENT

Page 16: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

MODEL

Inspection Data

Food Inspection History

Historical Data

- Business Licenses- Inspectors- Weather- Sanitation- Crime- Garbage Carts

Model

PredictionLasso and Elastic-Net Regularized Generalized Linear ModelsR’s glmnet package

ModelObject

Page 17: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Establishments with previous critical or serious violations

Three-day average high temperature

Nearby garbage and sanitation complaints

Nearby burglaries

Whether establishments has tobacco or alcohol license

Length of time since last inspection

Length of time establishment has been operating

Inspector assigned

The model predicts the likelihood of a food establishment having a critical violation, a violation most likely to lead to food borne illnesses. Over a dozen #opendata sources were used to help define the model. Ultimately, ten different variables proved to create #predictions of critical violations.

Significant Predictors

Page 18: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

6. MODEL REVIEW

Page 19: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

• The first model was built using data prior to 2014, and tested in early 2014

• The second model was built in response to the first• Completed in the summer of 2014• Tested in November based on actual inspection results from

September and October

TEST / TRAIN FRAMEWORK

Training Period

Not Used

Test Period

Sept 2011 – Feb 2014 Sept 2014 – Oct 2014

A model is built on historicallyavailable data

The model is tested on futuredata

Page 20: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

7. PILOT & EXPERIMENT

Page 21: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

• The first model was built using data prior to 2014, and tested in early 2014

• The second model was built in response to the first• Completed in the summer of 2014• Tested in November based on actual inspection results from

September and October

TEST / TRAIN FRAMEWORK

Training Period

Not Used

Test Period

Sept 2011 – Feb 2014 Sept 2014 – Oct 2014

A model is built on historicallyavailable data

The model is tested on futuredata

Page 22: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

8. PILOT EVALUATION

Page 23: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

The #predictions revealed an opportunity to find deliver results faster. Within the first half of work, 69% of critical violations would have been found by inspectors using a data-driven approach. During the same period, only 55% of violations were found using the status quo method.

Critical violations

Data-driven Status quo0%

10%

20%

30%

40%

50%

60%

70%

Page 24: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

The food inspection model is able to deliver results faster.After comparing a data-driven approach versus the status quo, the rate of finding violations was accelerated by an average of 7.4 days in the 60 day pilot. That means the #predictions led to more violations would be found sooner by inspectors.

IMPROVEMENT

7 days

Page 25: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

OPTIMIZING FOOD INSPECTIONSDiscovering critical violations sooner rather than later reduces the risk of patrons becoming ill, which helps reduce medical expenses, lost time at work, and even a limited number of fatalities.

Page 26: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

9. OPERATIONALIZING MODEL

Page 27: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

PREDICTION AND APPLICATIONCurrent Licenses

Current Business Licenses

Current Data

- Business Licenses- Inspectors- Weather

- Sanitation- Crime- Garbage Carts

Historical Model

ModelObject

Current Businesses+

Current Prediction Score

Shiny Application

Page 28: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

The data science team has built a website which lets CDPH prioritize inspections based on projected risk.

Page 29: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

10. CHECK-IN

Page 30: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

http://chicago.github.io/food-inspections-evaluation/

Page 31: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

PARTNERSHIPS TO FIT YOUR NEEDS

Page 32: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Chicago has a large, vibrant, productive, civic community. This is led by Chicago residents interested in technology and society. Smart Chicago Collaborative and non-profits provide assistance and city officials regularly engage in meetups and other activities. This group has produced several helpful apps.

Community

Page 33: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,
Page 34: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

CIVIC COLLABORATION

DePaul Student Interns ChiHackNight

Page 35: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

CLEAR WATERFORECASTING CHICAGO’S WATER QUAL ITY

Page 36: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

Total hours dedicated to this project through volunteers, Chi Hack Night, and students.

1,000 HOURS

Page 37: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

GITHUB PUNCH CARD

Page 38: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

FIND OPERATIONAL PARTNERS

Page 39: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,
Page 40: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

LEAD SAFE API

Lead Safe API

Page 41: ANALYTICS: A PRACTICAL GUIDE - Harvard University · APPLIED ANALYTICS GUIDE The "Applied Analytics Guide" is a 10-step process that the City of Chicago follows to identify, analyze,

THANK YOU

Contact Info:

Websites:Tom Schenk Jr.Chief Data Officer, City of ChicagoSean ThorntonProgram Advisor, Harvard University

@[email protected]

data.cityofchicago.orgdigital.cityofchicago.orgopengrid.iotechplan.cityofchicago.orgspeakerdeck.com/tomschenkjr