Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Adventure Works IoT Demo

Similar presentations


Presentation on theme: "An Adventure Works IoT Demo"— Presentation transcript:

1 An Adventure Works IoT Demo
Moving beyond sales data

2 Martin John Madsen, Ph.D. Senior Data Analytics Consultant
15+ years’ experience working with data gathering, analysis, and predictive analytics

3 Device Data or Enterprise Data
Where do I find IoT data that I can use for demos? Device Data or Enterprise Data

4 Bikes Components Clothes Accessories

5 AdventureWorks IoT Project
GPS Receiver Latitude/Longitude Time Accelerometer Impact/Crash Mobile Transmitter

6 Hot Cold Data Stream: Real-time alerts
Internet of Things Connectivity Data Analytics Things Action Hot Data Stream: Real-time alerts Data Stream: Patterns and trends Cold Microsoft IoT Webinar 2016

7 Simulating IoT Data

8 Data Simulation Source
CSV Export from SSMS: about 2200 rows SELECT fc.ProductKey, fc.CustomerKey, fc.OrderDateKey, fc.ShipDateKey, fc.SalesOrderNumber, REPLACE(dc.AddressLine1, ',' ,' ') AS AddressLine1, dc.AddressLine2, dg.City, dg.StateProvinceName, dg.EnglishCountryRegionName FROM FactInternetSales AS fc JOIN DimCustomer AS dc ON fc.CustomerKey=dc.CustomerKey AND fc.ProductKey IN ( 220, 221, 222 ) JOIN DimGeography AS dg ON dc.GeographyKey=dg.GeographyKey fc ProductKey CustomerKey OrderDateKey ShipDateKey SalesOrderNumber FactInternetSales dc CustomerKey GeographyKey AddressLine1 AddressLine2 DimCustomer dg GeographyKey City StateProvinceName EnglishCountryRegionName DimGeography

9 Python Data Enrichment: Geocoding
Python Data Enrichment: Geocoding from geopy.geocoders import GoogleV3 geolocator=GoogleV3(api_key='<GoogleAPIKey goes here>’) location = geolocator.geocode(x['AddressLine1'] + ',’ + x['AddressLine2'] + ',’ + x['City'] + ',’ + x['StateProvinceName'] + ',’ + x['EnglishCountryRegionName'])

10 Python Data Enrichment: Rider Characteristics
Python Data Enrichment: Rider Characteristics Average Speed Speed Consistency Average Trip Distance Days Between Rides

11 Python Data Simulation: Trip Simulation
Python Data Simulation: Trip Simulation Pick a total trip distance Take a step in a random direction with random helment acceleration Did we travel the total distance? no no Did we crash? Pick a trip start datetime Pick a trip average speed End the trip and Save yes Have we quit using the helmet? yes no Change to a new user yes

12 Python Data Simulation: Sample Trip
Python Data Simulation: Sample Trip … Repeat 660,000 times iotID string DateTime string Latitude float Longitude float StepDistance float AccelerometerMag float tripID string

13 Azure Stream Analytics
Hot Data Stream: Real-time alerts IoT Data Source Azure IoT Hub Azure Stream Analytics Iot/Power BI Tutorial

14 Hot Data Stream Dashboard

15 Azure Stream Analytics
Hot Data Stream: Real-time alerts Azure Blob Storage IoT Data Source Azure IoT Hub Azure Stream Analytics

16 Cold Data Stream: Patterns and trends Azure Blob Storage Enterprise
Hadoop Processing Data Analysis HDInsight Tutorial

17 Cold Data Stream: Patterns and trends Python Output Hadoop Processing
190 million entries – 660,000 trips Python Output Hadoop Processing Data Analysis Enterprise Data

18 Code/Technical Layout
tripdata (Hortonworks Tutorial) tripdata tripdataInt iotkey string tripID string eventDateTime string eventLat float eventLon float eventDist float eventAccMag float iotKey string tripID string starttime string endtime string cLat double cLon double TotalDistance double MIN MAX AVG AVGSUM

19 Code/Technical Layout
tripdata tripdataaccInt iotkey string tripID string eventDateTime string eventLat float eventLon float eventDist float eventAccMag float SELECT iotkey, tripid, eventdatetime AS maxacctime, eventaccmag AS maxacc FROM (SELECT eventdatetime, eventaccmag, row_number() OVER (PARTITION BY iotkey,tripid ORDER BY eventaccmag DESC) AS r FROM iotdata.tripdata) t WHERE r = 1; iotKey string tripID string accMaxTime string accMax double

20 Code/Technical Layout
iotKey string tripID string starttime string endtime string cLat double cLon double TotalDistance double tripdataFinal tripdataInt iotKey string tripID string tripStartTime string tripEndTime string tripDistance double cLat double cLon double tripMaxAcc double tripMaxAccTime string JOIN iotKey string tripID string accMaxTime string accMax double tripdataaccInt

21 Code/Technical Layout
tripdataFinal iotKey string tripID string tripStartTime string tripEndTime string tripDistance double cLat double cLon double tripMaxAcc double tripMaxAccTime string Making ODBC Connections

22 Business Stories Time Tracking Data Geotag Data Accident Data
Leveraging IoT data Time Tracking Data Accident Data Geotag Data Questions at this point – solicit audience ideas for use cases, generate feedback and discussion at this point.

23 Traditional Enterprise Data

24 IoT Enriched Data

25 IoT Enriched Data New Product Releases

26 Traditional Enterprise Data

27 IoT Enriched Data Warranty cost > (0.11) Production cost

28 Traditional Enterprise Data

29 IoT Enriched Data Market average distance per person

30 Accident Data Geotag Data Time Tracking Data

31 Questions?

32 Other Resources GitHub Repository: YouTube Channel: LinkedIn: IoT Demo resources Python Resources Hadoop/SQL Server Resources ODBC Connector Tutorial DAX/PowerQuery Resources

33 DimProductSubcategory
DAX/Tabular Design FactInternetSales TripdataFinal WorldCitiesGeoCodes DimCustomer MarketComparison DimGeography Calendar DimProduct DimProductCategory DimProductSubcategory


Download ppt "An Adventure Works IoT Demo"

Similar presentations


Ads by Google