บทนำสู่ข้อมูล IoT

การวิเคราะห์ข้อมูล IoT ด้วย Python

Matthias Voppichler

IT Developer

ภาพรวมของคอร์ส

  • เก็บและวิเคราะห์ข้อมูล IoT
  • รวบรวมข้อมูล
    • API Endpoints
    • Data Streams
  • แสดงภาพข้อมูล
  • รวมชุดข้อมูล
  • ตรวจจับรูปแบบ
  • แจ้งเตือนด้วยโมเดล ML
การวิเคราะห์ข้อมูล IoT ด้วย Python

IoT คืออะไร?

IoT == Internet of Things

  • เครือข่ายของอุปกรณ์ที่เชื่อมต่อกัน
  • วัดและเก็บข้อมูล
  • โต้ตอบกับสภาพแวดล้อม
การวิเคราะห์ข้อมูล IoT ด้วย Python

อุปกรณ์ IoT

อุปกรณ์เชื่อมต่อทั่วไป

  • กุญแจอัจฉริยะ
  • เทอร์โมสตัทเชื่อมต่อ
  • เซนเซอร์อุณหภูมิ

Temperature sensor

อุปกรณ์เชื่อมต่อในอุตสาหกรรม

  • เครื่องจักรเชื่อมต่อ
  • หุ่นยนต์ / Cobots
  • ติดตามพัสดุ

Industrial robots / Robotic arms

การวิเคราะห์ข้อมูล IoT ด้วย Python

รูปแบบข้อมูล IoT

  • http / json
  • plain text
  • binary data
  • XML
  • โปรโตคอลเฉพาะทาง
การวิเคราะห์ข้อมูล IoT ด้วย Python

การรับข้อมูล

  • Data streams
  • รวบรวมจากอุปกรณ์
  • API endpoints
การวิเคราะห์ข้อมูล IoT ด้วย Python

การรับข้อมูล - requests

import requests
url = "https://demo.datacamp.com/api/temp?count=3"
r = requests.get(url)
print(r.json())
[{'timestamp': 1536924000000, 'value': 22.3},
 {'timestamp': 1536924600000, 'value': 22.8},
 {'timestamp': 1536925200000, 'value': 23.3}]
print(pd.DataFrame(r.json()).head())
       timestamp  value
0  1536924000000   22.3
1  1536924600000   22.8
2  1536925200000   23.3
การวิเคราะห์ข้อมูล IoT ด้วย Python

การรับข้อมูล - pandas

import pandas as pd
df_env = pd.read_json("https://demo.datacamp.com/api/temp?count=3")

print(df_env.head())
            timestamp  value
0 2018-09-14 11:20:00   22.3
1 2018-09-14 11:30:00   22.8
2 2018-09-14 11:40:00   23.3
print(df_env.dtypes)
timestamp    datetime64[ns]
value               float64
dtype: object
การวิเคราะห์ข้อมูล IoT ด้วย Python

มาฝึกกันเถอะ!

การวิเคราะห์ข้อมูล IoT ด้วย Python

Preparing Video For Download...