incorporating weather into your data - webinar
TRANSCRIPT
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
The Power of PredictiveIncorporating Weather into Your Data
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
AgendaIntroduction
• A brief intro into who we are at Convergence Consulting Group• What Role Does Weather Play in Our Life
What is our Goal?• Estimate Restaurant Reservations based on the ‘Actual’ weather
forecast
How do we do it?• Collect our data• Build a prediction model• Visualize our results
Summary Results Resources
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Analytics empowering clients to see farther & go faster Vendor Agnostic – Data & analytics focus with leading technology expertise Business Value – Improve business processes via analytic solutions Partner Approach – Trusted advisor, credible, objectiveOur People – Experienced, passionate, professionals Flexible Solutions – Managed Services, Project Delivery, SaaS, BICoE
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Core Capabilities
INFORMATION MANAGEMENT
Data Integration
Data Architecture
Data Governance
Data Warehousing
STRATEGY & MANAGEMENT
Strategic Roadmap
Rapid Prototyping
BI&A Center of Excellence
Cloud Migration
Tool Rationalization
Managed Services
BI & ADVANCED ANALYTICS
Reporting & Dashboards
Performance Management
Descriptive Analytics
Diagnostic Analytics
Predictive Analytics
Prescriptive Analytics
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data ScientistArchitect for over 10 yearsMS Predictive Analytics, Northwestern UniversitySAP Reporting and Analytics Speaker, SAPInsider and ASUGConnect with me on LinkedIn or follow me on twitter @TheAhmedSherif
Meet Your Speaker
Ahmed SherifConvergence Consulting Group
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
IntroductionThere are many things that we can predict, weather wasn’t always one of them.
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
IntroductionWeather affects our actions and can be costly for business
• Customer foot traffic in stores• Predict online sales – increase in poor weather• Power outages - need to close business• Order fulfillment – shipping, travel
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
How likely are you to cancel your fine dining restaurant reservation if it starts to rain?
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Case Study - Restaurant
• Analyzing reservation data• Fine Dining Restaurant• Multiple restaurants• Located throughout North America
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
ObjectiveWe want to estimate what the percentage of a reservation cancellation is depending on the forecast that day, or even more specifically, that hour.
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
What tools are we going to usePython
• Data Preparation• Data Analysis• Predictive Modeling
IBM Cognos Analytics• Dataviz!
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data PreparationPandas is a popular open source analytics library library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data Preparation: pandasPandas is a fast and efficient Data Frame for data manipulation and data merging
Reservations (5,000 From Restaurant)
Weather (http://api.weather.com/)
Combined Data Sources
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data Preparation: pandas
Demo
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data AnalysisWe need to get an idea of what’s in our table (dataframe)
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data AnalysisLet’s look at overall Reservation Status
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data AnalysisLet’s look at Status by Weather conditions
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data AnalysisLet’s look at Status by City/Restaurant
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data Analysis: Let’s simplifyStatus
• Cancellations = ‘Cancelled’ or ‘No Show’• Completed = ‘Completed’
Weather• Nice Weather = ‘Fair’• Poor Weather <> ‘Fair’
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Data Analysis: Simplified
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Let’s build our predictive modelLogistic Regression model
• Why Logistic?• We are only interested in two outcomes
Probability• Pass/Fail• Heads/Tail• Reservation Cancelled/Reservation Kept
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Let’s build our predictive modelAssumptions
We are only focusing on Weather ConditionsGood or Bad Weather Grouping onlySpecific weather conditions can provider for a more in depth lookNo focus on Wind Speed or other weather predictors
Not focusing on non-weather related predictors
MottoAll Models are wrong, but some are useful!
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Survey
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Let’s build our predictive model
Demo
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Prediction ScoresPrediction Scores for Cancellation Rates
• 2nd Column is for Positive Cancellation Rate• Scores stored in arrays
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Prediction ScoresScores can then be formatted into a dataframe and joined to the the Restaurant Name
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
VisualizeWe can upload our results into Cognos Analytics and Visualize Further
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Visualize
We can do a quick and dirty visualization just to confirm if we are seeing any significant discrepancy between cancellations for different cities or
RAINSHINE
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Visualize
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Visualize
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
Visualize
Demo
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
ResultsPredict Future Cancellations We can now predict which restaurants in which cities will likely face higher cancelations rates based on selected weather outcomes. Knowing this will empower restaurant Managers to:• Accept additional walk-ins• Deploy marketing efforts• Adjust staffing• Limit inventory
S E E F A R T HER. G O F A S TER. 2502 North Rocky Point Dr. Suite 650 | Tampa, FL 33607 | O: 813.968.3238 | www.ccgBI.com
ResourcesPandas
http://pandas.pydata.org
Logistic Regression Analysishttps://en.wikipedia.org/wiki/Logistic_regression
Cognos Analyticshttps://www.youtube.com/watch?v=PtiD-AUDNBU45-Video Playlist
National Oceanic and Atmospheric Administrationhttp://www.ncdc.noaa.gov
Weather API scraperhttps://weather.com/
Q & A
Thank you!
www.ccgBI.com
813.265.3239
Convergence Consulting Group
@ccgbi | @TheAhmedSherif
A copy of the recorded webinar and presentation will be emailed to you shortly. Please feel free to email any remaining questions to Caroline Wright at [email protected]
Contact us for: Videos used for Demo!Python Scripts used for AnalysisWill send you a dropbox link to download