VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
Analytics at Motorola: Motorola journey to enable self-serve analytics that leverage Google tools and API
1. motorola confidential
Analytics at Motorola
Motorola journey to enable self-serve
analytics that leverage Google tools
and API
http://www.gatewayanalyticsnetwork.com/b125-home
Dr Patrick Deglon
Director of Engineering,
Analytics Area Tech Lead
Motorola Mobility
pdeglon@motorola.com
pdeglon
2. motorola confidential
What my friends think
I do
What my mum thinks
I do
What the Execs
think I do
What I think I do What the Execs
wants me to do
What I really do
About Patrick
3. motorola confidential
...
Overview of Motorola Business
About Us
Motorola exists to invent, build and deliver
the best mobile devices on the planet,
improving the lives of millions of people.
5. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda
6. motorola confidential
How do we see Analytics at Motorola?
Provide easy access to data &
insights to drive the business
towards our goal*:
Raw Data
Business Datasets
Visualization
Driving Insights &
Recommendation
* Motorola exists to invent, build and deliver the
best mobile devices on the planet, improving the
lives of millions of people.
Enablers:
● Self-serve with low barrier to
data and know-how
● High data quality & trust
● Deep understanding of
customer & device behavior
● Feedback loop to improve user
experience & device
performance
● Strong data stewardship
7. motorola confidential
Our Big Data Environment
Instrumentation
with user consent
Android Settings
Motorola Privacy
☐ Help Improve Motorola Products (On/Off)
Moto Care (On/Off)
Motorola
Cloud
Insights
Google Platforms
App Engine (large scale web servers)
Cloud Storage (large file storage)
Data Store (large real-time storage)
Big Query (public implementation of Dremel)
Compute Engine (virtual Linux servers)
…
8. motorola confidential
Google: A galaxy of open APIs and Tools…
App EngineBig Query
Compute Engine
Users Cloud Messaging
Analytics
Maps
Charts
Data Store
Cloud Storage
Cloud SQL
Drive
Docs
Translate
Predict
Mail
Data Store
Task Queue
Memcache
URL Fetch
Cloud End Point
Channel
Java
Python
Go
Mail
and many more ...
9. motorola confidential
• Big Query: Instrumentation
• Big Query: Server logs
• Big Query: SalesForce
• Big Query: External data
• Google Analytics
• Google Spreadsheets & CSV
Raw Data Business Datasets Visualization
• BigFeed (internal tool build
on App Engine to manage
BigQuery ETL)
• Compute Engine (ETL CRON
jobs)
• Google Spreadsheets &
Docs
• Tableau widget through a
Java web server
• Moto Insights (internal
tool bridging BigQuery
with Google Charts)
• Drive Insights (next
generation of Moto
Insights with Google Drive)
Data flows for Analytics
10. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda
11. motorola confidential
Daily Activations Report
How to provide a global
source of truth and
provide insights from
data points?
Existing Situation
- Numerous (conflicting) sources of truth
- Too many variations of same data cube
- “Table in your face” approach
- No global business definition
- No curation of manually entered data
- Report accessible on an internal portal
(through VPN)
- No mobile form factor
12. motorola confidential
Simplified Business Flow
Data Flow
Motorola Factory
# Shipments
Distribution Channels
# Sales
First Usage
# Activations
InsightsGoogle BigQuery
Motorola
Cloud
14. motorola confidential
• Assume sales follow a diffusion S-shape, i.e.
Description of the illustrative simulation
Marketing Word of mouth
ΔN
Nmax
N
• Add random noise to theoretical daily activations (Poisson)
• Simulated daily activations (sales) for United States, Canada,
Brazil, India, Russia, China, Germany and United Kingdom
with various launch date per region
ΔN = a (Nmax - N) + b N (Nmax - N)
15. motorola confidential
Step 1: Create a backbone table
SELECT
CAL_DT,
Country
FROM
ON A.Dummy=B.Dummy
WHERE
B.CAL_DT>=A.Launch_Date
motorola.com:sandbox:demo.backbone:
INNER JOIN
(
SELECT
Country,
CASE
WHEN Country IN ('United States','Canada') THEN '2013-08-01'
WHEN Country IN ('Brazil','Russia','India','China') THEN '2013-10-01'
ELSE '2013-12-01'
END AS Launch_Date,
GDP_USD/1e7 AS Scale,
1 AS Dummy
FROM
[motorola.com:sandbox:pdeglon.countries]
WHERE
Country IN ('United States','Canada','Brazil','Russia','India',
'China','Germany','United Kingdom')
) AS B
(
SELECT
CAL_DT,
1 AS Dummy
FROM
[motorola.com:sandbox:pdeglon.calendar]
) AS A
X
BACKUP
16. motorola confidential
Step 2: Calculate KPI value over time
SELECT
CAL_DT,
Country,
‘Phone 123’ AS Model,
INTEGER(Scale*
EXP(-POW( -150,2)/2/POW(75,2))
/(75*SQRT(2*PI()))
) AS Daily_Activations
FROM
[motorola.com:sandbox:demo.backbone]
motorola.com:sandbox:demo.baseline:
DATEDIFF(TIMESTAMP(CAL_DT),TIMESTAMP(Launch_Date))
...
Normal Distribution:
BACKUP
17. motorola confidential
Step 3: Add Random Noise
SELECT
CAL_DT,
Model,
Country,
INTEGER(
Daily_Activations + SQRT(Daily_Activations) *
SQRT(-2*LN(RAND()))*COS(2*PI()*RAND())
) AS Daily_Activations
FROM
[motorola.com:sandbox:demo.baseline]
motorola.com:sandbox:demo.simulation:
Normal (Gaussian) Random Number
(mu=0, sigma=1)
(pseudo) Poisson distribution for
N=Daily_activation
BACKUP
18. motorola confidential
Step 4: Final Pivot for report
SELECT
CAL_DT,
SUM(Daily_Activations) AS Total,
SUM(CASE WHEN Country IN ('United States','Canada') THEN Daily_Activations ELSE 0 END) AS NA,
SUM(CASE WHEN Country IN ('Brazil','Russia','India','China') THEN Daily_Activations ELSE 0 END) AS BRIC,
SUM(CASE WHEN Country IN ('Germany','United Kingdom') THEN Daily_Activations ELSE 0 END) AS EU,
SUM(CASE WHEN Country='United States' THEN Daily_Activations ELSE 0 END) AS UnitedStates,
SUM(CASE WHEN Country='Canada' THEN Daily_Activations ELSE 0 END) AS Canada,
SUM(CASE WHEN Country='Brazil' THEN Daily_Activations ELSE 0 END) AS Brazil,
SUM(CASE WHEN Country='Russia' THEN Daily_Activations ELSE 0 END) AS Russia,
SUM(CASE WHEN Country='India' THEN Daily_Activations ELSE 0 END) AS India,
SUM(CASE WHEN Country='China' THEN Daily_Activations ELSE 0 END) AS China,
SUM(CASE WHEN Country='Germany' THEN Daily_Activations ELSE 0 END) AS Germany,
SUM(CASE WHEN Country='United Kingdom' THEN Daily_Activations ELSE 0 END) AS UnitedKingdom
FROM
[motorola.com:sandbox:demo.simulation]
WHERE
CAL_DT<CURRENT_DATE()
GROUP BY 1
ORDER BY 1 DESC
BACKUP
35. motorola confidential
Schedule process & QA
Refresh Data (H-3)
Automated QA Checks
Area Leads check the numbers
Alert Email to Operation Center
Errors
Preliminary Email (H-2)
No Errors
Final Emails (H)
No Complains
Revisit QA rules
Complains
Correct Data & RerunCorrect Data & Rerun
36. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda
37. motorola confidential
Moto Insights
How to provide insights to
executive-on-the-go with a
robust system where new report
take seconds to create?
Existing Situation
- Require VPN
- New Report take weeks
to create
- New features take
months to develop
- Team spend more time
resolving defects than
developing new features &
reports
38. motorola confidential
Demo Moto Insights
Moto Insights
App Engine
Data Source:
Big Query
Report
Meta Data:
Datastore
Tracking:
Datastore
Users Access:
Google Users
(email) +
Datastore (role)
Moto Insights
Web portal
Moto Insights
Android App
44. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda
45. motorola confidential
Drive Insights
How to promote self serve and
democratize Analytics within the
company while maintaining
quality (data & insights) as well
as managing Big Data access?
Existing Situation
- Reports are produce by a
centralized team
- Insight needs are rapidly changing
- In the eyes of our internal
customers, long lead time on report
evolution
Key assumption: Business community can become
SQL literate with the help of trainings, tutorials and
documentation on a Data Wiki (Confluence)
46. motorola confidential
Demo Drive Insights (Moto Insights V2)
Drive Insights
App Engine
Data Source:
Big Query
Data Source:
Google Analytics
iFrame Source:
Tableau Server
iFrame Source:
Google Documents
Report
Meta Data:
Google Drive
(Text file with
JSON)
Report
Meta Data:
Datastore
(Report copy &
usage tracking)
Users Access
Control:
Google Users +
Drive Sharing
Google Drive
Moto Insights
Android App
Drive Insights
Web portal
56. Example: Campaign Measurement
Campaigns
•Campaign Id
•Campaign Name
•Time range
•Set of Countries
•Set of Products
KPI
•Date
•Country
•Product
•KPI[]
X
Trend
•Campaign Id
•Date
•Total of KPI[]
Summary
• Campaign Id
•Campaign Name
• Impact Measurement[]
• Statistical Error[]
Time
Series
Analysis
57. Extract of a Drive Insights report
Campaign
Window Real data on
truncated axis
59. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda
60. motorola confidential
BigFeed: in-house App Engine ETL tool
How to address complexity,
transformation and partitioning?
Existing Situation
- Queries across the entire dataset
- Required more complicated queries
which limited self serve…
- Became inefficient as the volume
grew….
- Lacked comprehensive partitioning
scheme
61. motorola confidential
“BigFeed is an internal application that provides API and services to
build, run and monitor execution of BigQuery queries”
• Provides a generic framework to develop specific datasets quickly
• Focus is on Query
• Provides URL based access to run BQ to BQ ETL
• Platform agnostic
• Can run feeds on demand
What is BigFeed?
62. motorola confidential
Why Do a BigFeed?
1. Simplicity - enable simpler queries for the user community. Foster self serve
2. Performance
3. Cost → Scanning less data
4. Need to run a query repetitively → Ongoing analysis
5. Single point of optimization
63. motorola confidential
• Overview of Analytics at Motorola
• Daily Email: Reporting with Google Spreadsheet + BigQuery
• Moto Insights: Reporting with App Engine + BigQuery
• Drive Insights: Reporting with App Engine + BigQuery + Google
Analytics + Google Drive
• Big Feed: ETL with App Engine & Big Query
Agenda