Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Analyze Your Smart City: Build Sensor Analytics with OGC SensorThings API

409 views

Published on

This webinar is a hands-on tutorial to develop a sensor analytics application using the SensorThings API. SensorThings API offers a rich set of query functions that can be the basis for analytics. This tutorial will uncover these query functions.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Analyze Your Smart City: Build Sensor Analytics with OGC SensorThings API

  1. 1. #3: Analyze Your Smart City - Build Sensor Analytics with OGC SensorThings API Dr. Steve Liang, Ph.D., P.Eng. Founder and CEO, SensorUp Inc. Associate Professor, University of Calgary Click here for webinar recording Click here for source codes
  2. 2. About Dr. Steve Liang ๏ Associate Professor, Geomatics Engineering, Uni. Calgary ๏ AITF-Microsoft Industry Research Chair on Open Sensor Web (2011~2014) ๏ Chair OGC SensorThings API Standard Working Group ๏ Rapporteur, ITU-T SG12/11 on Internet of Things Test Specifications ๏ Founder and CEO, SensorUp Inc
  3. 3. About SensorUp ๏ We are a leader in Sensor Web and IoT Platforms. ๏ We offer innovative and comprehensive SensorThings solutions. ๏ We are proud member of Eclipse and Open Geospatial Consortium
  4. 4. News - SensorThings API Press Release
  5. 5. News - OGC SensorThings High-Chart and Data-Table (HCDT) Library http://www.sensorup.com/sensorthings-high-chart- and-data-table-hcdt/
  6. 6. News - Calgary air quality update
  7. 7. News - Calgary air quality update
  8. 8. Useful Resources Step #1: SensorThings Playground http://pg.sensorup.com Step #2: SensorThings Scratchpad http://scratchpad.sensorup.com
  9. 9. What will be covered in this webinar series Sense Your Smart City: Connect Environmental Sensors to SensorThings API Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorThings API Analyze Your Smart City: Build Sensor Analytics with SensorThings API Build Interoperable Smart City Applications Effortlessly
  10. 10. Today’s learning outcomes ๏ Review of SensorThings entities (ISO 19156 O&M) ๏ Pie chart of air quality readings (good, moderate, unhealthy) ๏ Comparison of max and min temperature readings ๏ Comparison of air quality of each station in the past week ๏ Show all air quality sensors within certain distance from a location ๏ Show all air quality sensors that are NOT within a polygon
  11. 11. Why build your IoT application with open standards? Future Proof and Proven Working Leverage years of R&D efforts for FREE!!
  12. 12. Today we will use SensorUp’s air quality monitoring system in Calgary as an example. http://example.sensorup.com/v1.0
  13. 13. What do you need? Any text editor A modern browser (Chrome in this webinar) A JSON viewer plugin (JSONView in this webinar)
  14. 14. GitHub https://github.com/SensorUp/Webinars
  15. 15. IMPORTANT We are using Highstock.js today. Highstock/Highchart is open source and free for non-commercial uses. But it is NOT free for commercial uses.
  16. 16. Acknowledgement Thanks to Mariam Dost for preparing today’s tutorials’ source codes.
  17. 17. The data model AirBox The Air in My Backyard • Plant Tower G3 • DHT22 • Particulate Matter 2.5 • Relative Humidity • Air Temperature My Backyard
  18. 18. Analytics Steps (Data Mining Steps) 1.Data Cleaning 2.Data Integration 3.Data Selection 4.Data Transformation 5.Data Mining 6.Pattern Evaluation 7.Knowledge Presentation OGC SensorThings API
  19. 19. #1: Percentage of Good, Moderate and Unhealthy Air Quality Readings
  20. 20. #1: Percentage of Good, Moderate and Unhealthy Air Quality Readings # of Good Results # of All Results # of Moderate Results# of Unhealthy Results
  21. 21. EPA Air Quality Index
  22. 22. Get the number of “unhealthy” readings, i.e., greater than or equal to 35.5, from SensorThings API http://example.sensorup.com/v1.0/ Datastreams(3505)/Observations? $filter=result ge 35.5 http://example.sensorup.com/v1.0/ Datastreams(3505)/Observations? $filter=result gt 35.5&$top=1
  23. 23. Get the number of “modest” readings, i.e., between 13 and 35.5, from SensorThings API http://example.sensorup.com/v1.0/ Datastreams(3505)/Observations? $filter=result lt 35.5 and result ge 13&$top=1
  24. 24. Pie Chart of Air Quality Readings
  25. 25. #2: Daily max and min temperature of the past week
  26. 26. Get a day’s maximum result value http://example.sensorup.com/v1.0/ Datastreams(4207)/Observations? $filter=day(phenomenonTime) eq 16 and month(phenomenonTime) eq 8 1. Get the Observations on August 16
  27. 27. Get a day’s maximum result value http://example.sensorup.com/v1.0/ Datastreams(4207)/Observations? $filter=day(phenomenonTime) eq 16 and month(phenomenonTime) eq 8&$orderby=result desc&$top=1&$select=result,phenomenonTime 2. Get the Observation with the largest result value on August 16
  28. 28. Get a day’s minimum result value http://example.sensorup.com/v1.0/ Datastreams(4207)/Observations? $filter=day(phenomenonTime) eq 16 and month(phenomenonTime) eq 8&$orderby=result asc&$top=1&$select=result,phenomenonTime Get the Observation with the smallest result value on August 16
  29. 29. A different chart of the daily max and min temperature of the past week
  30. 30. #3 Plot the worst air quality of each station in the past week 1. Get a list of the air quality Datastreams
  31. 31. #3 Plot the worst air quality of each station in the past week 2. Get the worst air quality result from each Datastream
  32. 32. #4 Find all air quality sensors within certain distance from a location
  33. 33. #4 Find all air quality sensors within certain distance from a location $filter=(geo.distance(location, geography’POINT(-114.00+50.99)’) lt 10000)& $orderby=id desc click here for an example
  34. 34. #4 Find all air quality sensors within certain distance from a location
  35. 35. #5: Find all sensors that are outside of a polygon
  36. 36. #5: Find all sensors that are outside of a polygon $filter=st_disjoint(location, geography'POLYGON ((…))’)&$orderby=id desc
  37. 37. GitHub https://github.com/SensorUp/Webinars
  38. 38. Next Week Build Interoperable Smart City Applications Effortlessly

×