{"id":50730,"date":"2021-02-17T00:00:00","date_gmt":"2021-02-17T08:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/"},"modified":"2025-11-14T07:54:26","modified_gmt":"2025-11-14T15:54:26","slug":"a-python-based-iot-data-dashboard-part-one","status":"publish","type":"post","link":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/","title":{"rendered":"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09"},"content":{"rendered":"<h2>\u5c0e\u5165\u3068\u76ee\u7684<\/h2>\n<h3>\u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9<\/h3>\n<p>IoT(\u30e2\u30ce\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8)\u30d3\u30b8\u30cd\u30b9\u306e\u591a\u304f\u306f\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u3067\u3042\u308a\u3001\u30ea\u30bd\u30fc\u30b9\u304c\u9650\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5927\u4f01\u696d\u3067\u3042\u3063\u3066\u3082\u614e\u91cd\u306a\u652f\u51fa\u6226\u7565\u306f\u6c7a\u3057\u3066\u640d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\u3084\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u306e\u30c4\u30fc\u30eb\u306f\u3001\u4e16\u306e\u4e2d\u306b\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f\u30012\u5206\u3054\u3068\u306b\u66f4\u65b0\u3055\u308c\u308b\u3079\u304d\u3044\u304f\u3064\u304b\u306e\u30c1\u30e3\u30fc\u30c8\u304c\u5fc5\u8981\u306a\u3060\u3051\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u304a\u91d1\u3092\u4f7f\u3046\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001\u79c1\u305f\u3061\u304c\u7528\u610f\u3057\u305f3\u3064\u306e\u30b7\u30ea\u30fc\u30ba\u306e\u3046\u3061\u3001\u30aa\u30fc\u30d7\u30cb\u30f3\u30b0\u306e1\u3064\u3067\u3059\u3002\u3053\u306e\u30b7\u30ea\u30fc\u30ba\u3067\u306f\u3001GridDB\u304b\u3089IoT\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u30013\u3064\u306e\u91cd\u8981\u306aIoT\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u8868\u793a\u3059\u308b\u30b7\u30f3\u30d7\u30eb\u306aPython\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u63d0\u4f9b\u3059\u308b\u30b3\u30fc\u30c9\u3092\u3082\u3068\u306b\u3001\u597d\u304d\u306a\u3060\u3051\u30c1\u30e3\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u305f\u308a\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30b7\u30ea\u30fc\u30ba\u306f\u3001\u4ee5\u4e0b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30fb\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0<\/li>\n<li>Python kivy\u3092\u4f7f\u3063\u305f\u30b7\u30f3\u30d7\u30eb\u306a\u30a2\u30d7\u30ea\u306e\u69cb\u7bc9<\/li>\n<li>\u30a2\u30d7\u30ea\u306e\u5b8c\u6210\u3068\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30a4\u30b3\u30f3\u306e\u8ffd\u52a0<\/li>\n<\/ul>\n<p>\u6700\u7d42\u7684\u306b\u306f\u3001\u5c0f\u3055\u304f\u3066\u3082\u72ec\u7acb\u3057\u305f\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30fb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3067\u304d\u3042\u304c\u308a\u3001\u6bce\u671d\u8d77\u52d5\u3057\u3066\u65e5\u4e2d\u306f\u305d\u308c\u3092\u4f7f\u3044\u7d9a\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30a2\u30d7\u30ea\u306f\u30bf\u30a4\u30e0\u30e9\u30b0\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3001\u307b\u307c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3057\u304b\u3082\u3042\u306a\u305f\u306f\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u3002<\/p>\n<h3>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308bPython\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u4f5c\u6210\u3055\u308c\u305f\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306f\u3001\u3042\u3089\u3086\u308bIoT\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u9001\u3089\u308c\u3066\u304f\u308b\u6a19\u6e96\u7684\u306a\u63a5\u7d9a\u30c7\u30fc\u30bf\u3092\u6a21\u5023\u3057\u3066\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u8a00\u3046\u3068\u3001\u305d\u306e\u3088\u3046\u306a\u30c7\u30d0\u30a4\u30b9\u306e\u5185\u90e8\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fSIM\u30ab\u30fc\u30c9\u304c\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u9001\u4fe1\u3059\u308b\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<p>\u63a5\u7d9a\u30c7\u30fc\u30bf\u306f\u901a\u5e38\u3001\u30b5\u30fc\u30d3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3084\u30b5\u30dd\u30fc\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3084\u7570\u5e38\u691c\u77e5\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3>\u76ee\u6a19\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30c7\u30fc\u30bf\u3092\u7167\u4f1a\u3057\u3066\u3001\u4ee5\u4e0b\u306e3\u3064\u306e\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30c7\u30fc\u30bf\u4f7f\u7528\u91cf<\/li>\n<li>\u30a4\u30d9\u30f3\u30c8\u306e\u6570<\/li>\n<li>\u30a2\u30e9\u30fc\u30c8\u306e\u6570<\/li>\n<\/ul>\n<p>\u3053\u3053\u3067\u306f\u3001\u300cPDP\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u4f5c\u6210\u300d\u30a4\u30d9\u30f3\u30c8\u3092\u4f8b\u306b\u6319\u3052\u3066\u8aac\u660e\u3057\u307e\u3059\u3002PDP\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/en.wikipedia.org\/wiki\/GPRS_core_network\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u306e\u30af\u30a8\u30ea\u309210\u5206\u3054\u3068\u306b\u5b9f\u884c\u3057\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<h3>\u624b\u6cd5\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3053\u3053\u3067\u306f\u3001Jupyter Notebook\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u6700\u7d42\u7684\u306a\u30b3\u30fc\u30c9\u3092Python\u306eIDE\u3067\u5b9f\u884c\u3057\u3066\u3082\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>\u524d\u63d0\u77e5\u8b58<\/h3>\n<p><a href=\"https:\/\/griddb.net\/ja\/blog\/using-python-to-interface-with-griddb-via-jdbc-with-jaydebeapi\/\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u3067\u306f\u3001Jupyter Notebook\u304b\u3089GridDB\u3092\u7167\u4f1a\u3059\u308b\u65b9\u6cd5\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u3044\u308b\u306e\u3067Jupyter Notebook\u306e\u4f7f\u3044\u65b9\u306b\u8a73\u3057\u304f\u306a\u3044\u65b9\u306f\u305c\u3072\u3054\u89a7\u306b\u306a\u3063\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u4e2d\u3067Jupyter\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u9032\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u672c\u7de8<\/h2>\n<h3>\u4e8b\u524d\u6e96\u5099<\/h3>\n<h4>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u306e\u30c7\u30fc\u30bf\u53d6\u5f97<\/h4>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001Python\u30d1\u30c3\u30b1\u30fc\u30b8 <strong>jaydebeapi<\/strong> \u3092\u7528\u3044\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u63a5\u7d9a\u3092\u78ba\u7acb\u3057\u3001<strong>WHERE<\/strong> \u53e5\u3092\u7528\u3044\u305fSQL\u30d9\u30fc\u30b9\u306e\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u76f4\u8fd11\u6642\u9593\u306e\u30c7\u30fc\u30bf\u306e\u307f\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001GridDB\u30cd\u30a4\u30c6\u30a3\u30d6\u306e\u95a2\u6570 <strong>TIMESTAMP_ADD()<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<a href=\"https:\/\/docs.griddb.net\/ja\/sqlreference\/sql-commands-supported\/#\u65e5\u6642\u95a2\u6570\">GridDB SQL\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\nimport pandas as pd\nimport jaydebeapi\n\nconn = jaydebeapi.connect(\"com.toshiba.mwcloud.gs.sql.Driver\",\n                          \"jdbc:gs:\/\/griddb:20001\/defaultCluster\/public?notificationMember:127.0.0.1:20001\",\n                          [\"admin\", \"admin\"],\n                          \"\/usr\/share\/java\/gridstore-jdbc-4.5.0.jar\",)\niot = ('''SELECT TIMESTAMP(timestamp) as timestamp, event, simid, data_usage\n          FROM IoT\n          WHERE TIMESTAMP(timestamp) &lt; TIMESTAMP_ADD(HOUR, NOW(), -1)''')\niotdf = pd.read_sql_query(iot, conn)\niotdf.head()\n<\/code><\/pre>\n<\/div>\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: right;\n    }\n  <\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th>\n        <\/th>\n<th>\n          timestamp\n        <\/th>\n<th>\n          event\n        <\/th>\n<th>\n          simid\n        <\/th>\n<th>\n          data_usage\n        <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>\n          0\n        <\/th>\n<td>\n          2021-01-18 09:39:27.200000\n        <\/td>\n<td>\n          Create PDP context\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          2021-01-18 09:39:28.200000\n        <\/td>\n<td>\n          data\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.03\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          2021-01-18 09:39:29.200000\n        <\/td>\n<td>\n          Delete PDP context\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          2021-01-18 09:40:05.200000\n        <\/td>\n<td>\n          Create PDP context\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          2021-01-18 09:40:06.200000\n        <\/td>\n<td>\n          data\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.03\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u3053\u308c\u306f\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3059\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3001\u3053\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30a4\u30d9\u30f3\u30c8\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u9001\u4fe1\u3057\u305fSIM\u30ab\u30fc\u30c9\u306eID\u3001\u305d\u3057\u3066\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u8ee2\u9001\u91cf\uff08\u5358\u4f4d\u306fkB\uff09\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u306e\u30d4\u30dc\u30c3\u30c8\u51e6\u7406<\/h3>\n<p>Jupyter\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u306f\u6b63\u3057\u3044\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5f62\u5f0f\u3067\u3042\u3063\u3066\u3082\u3001\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u3067\u306ftimestamp\u30ab\u30e9\u30e0\u304c\u6587\u5b57\u5217\u30ab\u30e9\u30e0\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">iotdf['timestamp']= iotdf['timestamp'].apply(pd.to_datetime)<\/code><\/pre>\n<\/div>\n<p>\u30ab\u30e9\u30e0\u6570\u306e\u5c11\u306a\u3044\u3001\u3044\u308f\u3086\u308b\u300c\u30b9\u30ea\u30e0\u300d\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001\u305d\u308c\u3092\u5e83\u3052\u3066\u3044\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u306e\u5217\u3092\u3044\u304f\u3064\u304b\u306e\u5217\u306b\u5206\u5272\u3057\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e\u3054\u3068\u306b1\u3064\u306e\u5217\u3092\u4f5c\u308a\u307e\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u305d\u308c\u305e\u308c\u306e\u5217\u306b\u306f\u50241\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066 <strong>pivot_table()<\/strong> \u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001iot\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u3092pandas\u306e\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\npivotdf = iotdf.pivot_table(index=['timestamp', 'simid', 'data_usage'],\n                            columns='event', \n                            values= 'event',\n                            aggfunc=lambda x: 1)\n<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">pivotdf.head()<\/code><\/pre>\n<\/div>\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: right;\n    }\n  <\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th>\n        <\/th>\n<th>\n        <\/th>\n<th>\n          event\n        <\/th>\n<th>\n          Create PDP context\n        <\/th>\n<th>\n          Delete PDP context\n        <\/th>\n<th>\n          alert\n        <\/th>\n<th>\n          data\n        <\/th>\n<\/tr>\n<tr>\n<th>\n          timestamp\n        <\/th>\n<th>\n          simid\n        <\/th>\n<th>\n          data_usage\n        <\/th>\n<th>\n        <\/th>\n<th>\n        <\/th>\n<th>\n        <\/th>\n<th>\n        <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>\n          2021-01-18 09:39:27.200\n        <\/th>\n<th>\n          0003\n        <\/th>\n<th>\n          0.00\n        <\/th>\n<td>\n          1.0\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2021-01-18 09:39:28.200\n        <\/th>\n<th>\n          0003\n        <\/th>\n<th>\n          0.03\n        <\/th>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2021-01-18 09:39:29.200\n        <\/th>\n<th>\n          0003\n        <\/th>\n<th>\n          0.00\n        <\/th>\n<td>\n          NaN\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2021-01-18 09:40:05.200\n        <\/th>\n<th>\n          0003\n        <\/th>\n<th>\n          0.00\n        <\/th>\n<td>\n          1.0\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2021-01-18 09:40:06.200\n        <\/th>\n<th>\n          0003\n        <\/th>\n<th>\n          0.03\n        <\/th>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          NaN\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u306f\u8907\u96d1\u306a\u5217\u540d\u304c\u3042\u308a\u30013\u3064\u306e\u5217\u304c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u78e8\u3044\u3066\u901a\u5e38\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u3088\u3046\u306b\u623b\u3057\u307e\u3059\u3002<strong>reset_index()<\/strong> \u95a2\u6570\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u8a08\u7b97\u3092\u3057\u305f\u308a\u3001\u5b9f\u969b\u306b\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30c3\u30c8\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306b\u306f\u3001NaN\u3092\u30bc\u30ed\u306b\u7f6e\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001<strong>fillna()<\/strong> \u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\npivotdf = pivotdf.reset_index()\npivotdf = pivotdf.fillna(0)\n<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">pivotdf.head()<\/code><\/pre>\n<\/div>\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: right;\n    }\n  <\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th>\n          event\n        <\/th>\n<th>\n          timestamp\n        <\/th>\n<th>\n          simid\n        <\/th>\n<th>\n          data_usage\n        <\/th>\n<th>\n          Create PDP context\n        <\/th>\n<th>\n          Delete PDP context\n        <\/th>\n<th>\n          alert\n        <\/th>\n<th>\n          data\n        <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>\n          0\n        <\/th>\n<td>\n          2021-01-18 09:39:27.200\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          2021-01-18 09:39:28.200\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.03\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          2021-01-18 09:39:29.200\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          2021-01-18 09:40:05.200\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.00\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          2021-01-18 09:40:06.200\n        <\/td>\n<td>\n          0003\n        <\/td>\n<td>\n          0.03\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          0.0\n        <\/td>\n<td>\n          1.0\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u3053\u308c\u3067\u3001\u30c7\u30fc\u30bf\u3092\u53ef\u8996\u5316\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30b0\u30e9\u30d5\u5316<\/h3>\n<p>\u30c7\u30d0\u30a4\u30b9\u3084SIM ID\u3054\u3068\u306b\u5404\u6307\u6a19\u3092\u5206\u5272\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u306b\u3088\u3063\u3066\u3001\u884c\u52d5\u306e\u7570\u5e38\u3092\u30ad\u30e3\u30c3\u30c1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u30b0\u30eb\u30fc\u30d7\u5316\u3055\u308c\u305f\u30c1\u30e3\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u95a2\u3057\u3066\u306f\u3001<strong>seaborn<\/strong> \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6700\u3082\u9ad8\u901f\u3067\u3042\u308b\u3053\u3068\u304c\u8a3c\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6570\u79d2\u306e\u5dee\u3067\u52dd\u8ca0\u304c\u3064\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u4ed6\u306e\u72b6\u6cc1\u3067\u306f\u305d\u308c\u307b\u3069\u91cd\u8981\u3067\u306f\u306a\u304b\u3063\u305f\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u30c1\u30e3\u30fc\u30c8\u3092\u975e\u5e38\u306b\u901f\u304f\u751f\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>seaborn\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u30b0\u30eb\u30fc\u30d7\u5316\u3055\u308c\u305f\u30c1\u30e3\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u8907\u6570\u306e\u6a5f\u4f1a\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u30022\u3064\u76ee\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308b\u30d5\u30a7\u30a4\u30b9\u30b0\u30ea\u30c3\u30c9\u306e\u4ee3\u308f\u308a\u306b <strong>\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30d7\u30ed\u30c3\u30c8<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u30e9\u30a4\u30f3\u30c1\u30e3\u30fc\u30c8\u3068\u306e\u76f8\u6027\u304c\u826f\u3044\u304b\u3089\u3067\u3059\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3054\u3068\u306b1\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u304c\u3042\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u30c7\u30fc\u30bf\u306e\u9023\u7d9a\u6027\u3092\u793a\u3059\u306b\u306f\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001X\u8ef8\u306e\u76ee\u76db\u308a\u306e\u56de\u8ee2\u306a\u3069\u3001\u30c1\u30e3\u30fc\u30c8\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u3082\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001\u30c7\u30fc\u30bf\u306e\u4f7f\u7528\u4f8b\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\ng = sns.relplot(\n    data=pivotdf, x=\"timestamp\", y=\"data_usage\", col=\"simid\", hue=\"simid\",col_order = ['0001', '0002', '0003', '0004'],\n    kind=\"line\", palette=\"Set2\", linewidth=4, zorder=5,\n    col_wrap=1, height=2, aspect=7, legend=False,\n    )\n\nfor simid, ax in g.axes_dict.items():\n    ax.text(.8, .85, simid, transform=ax.transAxes, fontweight=\"bold\")\n\n    sns.lineplot(data=pivotdf, x=\"timestamp\", y=\"data_usage\", units=\"simid\",\n                 estimator=None, color=\".7\", linewidth=1, ax=ax,\n                )\n\nax.set_xticks(ax.get_xticks()[::1])\ng.set_xticklabels(rotation=90)\n\ng.set_titles(\"\")\ng.fig.suptitle('DATA USAGE', horizontalalignment = 'right')\nText(0.5, 0.98, 'DATA USAGE')\n<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_31_1.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_31_1.png\" alt=\"\" width=\"998\" height=\"617\" class=\"aligncenter size-full wp-image-27288\" srcset=\"\/wp-content\/uploads\/2021\/02\/output_31_1.png 998w, \/wp-content\/uploads\/2021\/02\/output_31_1-300x185.png 300w, \/wp-content\/uploads\/2021\/02\/output_31_1-768x475.png 768w, \/wp-content\/uploads\/2021\/02\/output_31_1-600x371.png 600w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/a><\/p>\n<h2>\u81ea\u52d5\u66f4\u65b0\u6a5f\u80fd\u306e\u4f5c\u6210<\/h2>\n<h3>while\u30eb\u30fc\u30d7\u306e\u7d39\u4ecb<\/h3>\n<p>\u305d\u3057\u3066\u3001\u6700\u3082\u30a8\u30ad\u30b5\u30a4\u30c6\u30a3\u30f3\u30b0\u306a\u90e8\u5206\u306b\u5230\u9054\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5fc5\u8981\u306a\u306e\u306f\u3001\u79c1\u305f\u3061\u306e\u624b\u3092\u7169\u308f\u305b\u308b\u3053\u3068\u306a\u304f\u3001\u30b3\u30fc\u30c9\u3092\u4f55\u5ea6\u3082\u5b9f\u884c\u3055\u305b\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u76ee\u7684\u306e\u305f\u3081\u306b\u3001<strong>while\u30eb\u30fc\u30d7<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u306e\u30eb\u30fc\u30d7\u306e\u4e2d\u306b\u3001\u4e0a\u3067\u8ff0\u3079\u305f\u3053\u3068\u3092\u3059\u3079\u3066\uff08\u3055\u3089\u306b2\u3064\u306e\u30b0\u30e9\u30d5\u3092\uff09\u5165\u308c\u308b\u3060\u3051\u3067\u3059\u3002\u305d\u3057\u3066\u3001\u305d\u308c\u3092\u4e00\u5ea6\u958b\u59cb\u3057\u307e\u3059\u3002\u307b\u3089! Jupyter Notebook\u307e\u305f\u306fPython IDE\u304c\u958b\u3044\u3066\u3044\u3066\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u4e00\u5ea6\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u9593\u306f\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u7d9a\u3051\u3001\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u3055\u308c\u305f\u30c1\u30e3\u30fc\u30c8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3>\u6700\u9069\u5316\u306e\u305f\u3081\u306e\u6ce8\u610f\u4e8b\u9805<\/h3>\n<p>\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u3092\u516c\u958b\u3059\u308b\u524d\u306b\u3001\u77e5\u3063\u3066\u304a\u304f\u3079\u304d\u3044\u304f\u3064\u304b\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u540c\u3058\u30c1\u30e3\u30fc\u30c8\u3092\u4f55\u5ea6\u3082\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u306e\u306f\u7d76\u5bfe\u306b\u907f\u3051\u305f\u3044\u3067\u3059\u3088\u306d\u3002\u3053\u306e\u624b\u9593\u3092\u7701\u304f\u305f\u3081\u306b\u3001 <strong>clear_output()<\/strong> \u3092\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u3001\u4f55\u3088\u308a\u3082\u5148\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li>\n<li>\u5b58\u5728\u3057\u306a\u3044\u51fa\u529b\u3092\u30af\u30ea\u30a2\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u306e\u3067\u3001 <strong>try\/except\/pass<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u5931\u6557\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u30aa\u30d7\u30b7\u30e7\u30f3\uff1a\u30c7\u30fc\u30bf\u304c\u5c11\u306a\u3059\u304e\u3066\u9069\u5207\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u304d\u306a\u3044\u30c1\u30e3\u30fc\u30c8\u306b try\/except\/pass \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u58ca\u308c\u3066\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u3052\u308b\u3053\u3068\u306a\u304f\u3001\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>matplotlib<\/strong> \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5404\u30d7\u30ed\u30c3\u30c8\u306e\u5f8c\u306b <strong>plt.show()<\/strong> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3057\u306a\u3044\u3068\u3001\u30b3\u30fc\u30c9\u306e\u6700\u5f8c\u306e\u30d7\u30ed\u30c3\u30c8\u3060\u3051\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong>sleep()<\/strong> \u95a2\u6570\u3092\u5404\u30eb\u30fc\u30d7\u5b9f\u884c\u306e\u6700\u5f8c\u306b\u4f7f\u7528\u3057\u3066\u3001\u300c\u5b9f\u969b\u306e\u300d\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u554f\u3044\u5408\u308f\u305b\u304c\u610f\u5473\u3092\u306a\u3055\u306a\u3044\u5834\u5408\u3001\u9699\u9593\u6642\u9593\u3092\u4f5c\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068CPU\u306e\u4e21\u65b9\u3092\u4f11\u307e\u305b\u3066\u3042\u3052\u307e\u3057\u3087\u3046\u3002<\/li>\n<li>\u6700\u5f8c\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u9032\u884c\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u305f\u308a\u3001\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306b\u3001\u30b3\u30fc\u30c9\u5168\u4f53\u306b\u30ab\u30b9\u30bf\u30e0\u30b9\u30c6\u30fc\u30bf\u30b9\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\u3048\u3070\u3001<em>print(&#8220;got new data&#8221;, datetime.now())<\/em> \u3092\u8ffd\u52a0\u3057\u3066\u3001\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u304c\u6b63\u5e38\u306b\u53d6\u5f97\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3059\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u72ec\u81ea\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001<strong>datetime<\/strong> \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3055\u3042\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h3>\u6700\u7d42\u7248\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h3>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">\nfrom datetime import datetime\nfrom IPython.display import clear_output\n\nimport time\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nfrom PIL import Image, ImageDraw\nimport pandas as pd\nimport jaydebeapi\n\nconn = jaydebeapi.connect(\"com.toshiba.mwcloud.gs.sql.Driver\",\n                          \"jdbc:gs:\/\/griddb:20001\/defaultCluster\/public?notificationMember:127.0.0.1:20001\",\n                          [\"admin\", \"admin\"],\n                          \"\/usr\/share\/java\/gridstore-jdbc-4.5.0.jar\",)\n\ncurs = conn.cursor()\n\nstop = 1\nwhile stop > 0:\n    #delete the previous charts if any\n    try:\n        clear_output(wait=True)\n    except:\n        pass\n\n    #querying the data for the last hour\n    iot = ('''SELECT TIMESTAMP(timestamp) as timestamp, event, simid, data_usage\n              FROM IoT \n              WHERE TIMESTAMP(timestamp) > TIMESTAMP_ADD(HOUR, NOW(), -1)''')\n    iotdf = pd.read_sql_query(iot, conn)\n    print('got new data')\n    print(datetime.now())\n\n    #data preparation\n    iotdf['timestamp']= iotdf['timestamp'].apply(pd.to_datetime)\n    pivotdf = iotdf.pivot_table(index=['timestamp', 'simid', 'data_usage'],\n                                columns='event', \n                                values= 'event',\n                                aggfunc=lambda x: 1)\n    pivotdf = pivotdf.reset_index()    \n    pivotdf = pivotdf.fillna(0)\n\n    #data visualization\n    order = ['0001', '0002', '0003', '0004']\n\n    #data usage\n    g = sns.relplot(\n        data=pivotdf,\n        x=\"timestamp\", y=\"data_usage\", col=\"simid\", hue=\"simid\",col_order = ['0001', '0002', '0003', '0004'],\n        kind=\"line\", palette=\"Set2\", linewidth=4, zorder=5,\n        col_wrap=1, height=2, aspect=7, legend=False,\n        )\n\n    for simid, ax in g.axes_dict.items():\n        ax.text(.8, .85, simid, transform=ax.transAxes, fontweight=\"bold\")\n        sns.lineplot(\n            data=pivotdf, x=\"timestamp\", y=\"data_usage\", units=\"simid\",\n            estimator=None, color=\".7\", linewidth=1, ax=ax,\n            )\n\n    ax.set_xticks(ax.get_xticks()[::1])\n    g.set_xticklabels(rotation=90)\n\n    g.set_titles(\"\")\n    g.fig.suptitle('DATA USAGE                   ', horizontalalignment = 'right')\n\n    plt.show()\n\n    #number of pdp events\n    g = sns.relplot(\n        data=pivotdf,\n        x=\"timestamp\", y=\"Create PDP context\", col=\"simid\", hue=\"simid\",col_order = ['0001', '0002', '0003', '0004'],\n        kind=\"line\", palette=\"Set2\", linewidth=4, zorder=5,\n        col_wrap=1, height=2, aspect=7, legend=False,\n        )\n\n    for simid, ax in g.axes_dict.items():\n        ax.text(.8, .85, simid, transform=ax.transAxes, fontweight=\"bold\")\n        sns.lineplot(\n            data=pivotdf, x=\"timestamp\", y=\"Create PDP context\", units=\"simid\",\n            estimator=None, color=\".7\", linewidth=1, ax=ax,\n        )\n\n    ax.set_xticks(ax.get_xticks()[::1])\n    g.set_xticklabels(rotation=90)\n\n    g.set_titles(\"\")\n    g.fig.suptitle('NUMBER OF PDP EVENTS                   ', horizontalalignment = 'right')\n\n    plt.show()\n\n    #alerts\n    g = sns.relplot(\n        data=pivotdf,\n        x=\"timestamp\", y=\"alert\", col=\"simid\", hue=\"simid\",col_order = ['0001', '0002', '0003', '0004'],\n        kind=\"line\", palette=\"Set2\", linewidth=4, zorder=5,\n        col_wrap=1, height=2, aspect=7, legend=False,\n        )\n\n    for simid, ax in g.axes_dict.items():\n        ax.text(.8, .85, simid, transform=ax.transAxes, fontweight=\"bold\")\n        sns.lineplot(\n            data=pivotdf, x=\"timestamp\", y=\"alert\", units=\"simid\",\n            estimator=None, color=\".7\", linewidth=1, ax=ax,\n            )\n\n    ax.set_xticks(ax.get_xticks()[::1])\n    g.set_xticklabels(rotation=90)\n\n    g.set_titles(\"\")\n    g.fig.suptitle('NUMBER OF ALERTS                      ', horizontalalignment = 'right')\n\n    plt.show()\n\n    #putting it into sleep for 10 seconds\n    print('falling asleep')\n    print(datetime.now())\n    time.sleep(60)\n<\/code><\/pre>\n<\/div>\n<p><code>got new data<br \/>\n2021-01-19 11:46:05.329856<\/code><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_1.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_1.png\" alt=\"\" width=\"1015\" height=\"617\" class=\"aligncenter size-full wp-image-27289\" srcset=\"\/wp-content\/uploads\/2021\/02\/output_38_1.png 1015w, \/wp-content\/uploads\/2021\/02\/output_38_1-300x182.png 300w, \/wp-content\/uploads\/2021\/02\/output_38_1-768x467.png 768w, \/wp-content\/uploads\/2021\/02\/output_38_1-600x365.png 600w\" sizes=\"(max-width: 1015px) 100vw, 1015px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_2.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_2.png\" alt=\"\" width=\"1014\" height=\"617\" class=\"aligncenter size-full wp-image-27283\" srcset=\"\/wp-content\/uploads\/2021\/02\/output_38_2.png 1014w, \/wp-content\/uploads\/2021\/02\/output_38_2-300x183.png 300w, \/wp-content\/uploads\/2021\/02\/output_38_2-768x467.png 768w, \/wp-content\/uploads\/2021\/02\/output_38_2-600x365.png 600w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/02\/output_38_3.png\" alt=\"\" width=\"1014\" height=\"617\" class=\"aligncenter size-full wp-image-27290\" srcset=\"\/wp-content\/uploads\/2021\/02\/output_38_3.png 1014w, \/wp-content\/uploads\/2021\/02\/output_38_3-300x183.png 300w, \/wp-content\/uploads\/2021\/02\/output_38_3-768x467.png 768w, \/wp-content\/uploads\/2021\/02\/output_38_3-600x365.png 600w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/a><\/p>\n<p><code>falling asleep<br \/>\n2021-01-19 11:46:18.786249<\/code><\/p>\n<h4>\u5099\u8003<\/h4>\n<p>Jupyter\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u3001\u51fa\u529b\u90e8\u5206\u3092\u30de\u30a6\u30b9\u3067\u30af\u30ea\u30c3\u30af\u3057\u305f\u5f8c\u3001CMD + O\uff08\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306eo\uff09\u3067\u5c55\u958b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u3061\u3087\u3063\u3068\u5f85\u3063\u3066\uff01<\/h2>\n<p>while\u30eb\u30fc\u30d7\u306e\u7d42\u4e86\u6761\u4ef6\u306f\u3069\u3046\u3059\u308b\u306e\uff1f <em>stop<\/em> \u306e\u5024\u3092\u6e1b\u3089\u3055\u306a\u304f\u3066\u826f\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u3068\u3053\u308d\u3067\u3001stop\u306f\u3069\u3053\u304b\u3089\u6765\u305f\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3044\u3044\u3048\u3001stop\u306e\u5024\u306f\u6e1b\u3089\u3057\u307e\u305b\u3093\u3002\u30eb\u30fc\u30d7\u3092\u505c\u6b62\u3055\u305b\u305f\u3044\u308f\u3051\u3067\u306f\u306a\u3044\u304b\u3089\u3067\u3059Jupyter Notebook\u3092\u9589\u3058\u308c\u3070\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u505c\u6b62\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6761\u4ef6\u306f\u4efb\u610f\u306b\u6c7a\u3081\u305f\u3082\u306e\u3067\u3059\u3002\u30e9\u30f3\u30c0\u30e0\u306a\u5909\u6570\u304c\u5fc5\u8981\u3060\u3063\u305f\u3060\u3051\u3067\u3059\u3002<\/p>\n<h2>\u6b21\u56de\u306b\u5411\u3051\u3066<\/h2>\n<p>IoT\u63a5\u7d9a\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u69cb\u7bc9\u3057\u300110\u79d2\u3054\u3068\u306b\u66f4\u65b0\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u6b21\u56de\u306f\u3001\u3053\u308c\u3092\u5c0f\u3055\u306a\u72ec\u7acb\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7d71\u5408\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9 IoT(\u30e2\u30ce\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8)\u30d3\u30b8\u30cd\u30b9\u306e\u591a\u304f\u306f\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u3067\u3042\u308a\u3001\u30ea\u30bd\u30fc\u30b9\u304c\u9650\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5927\u4f01\u696d\u3067\u3042\u3063\u3066\u3082\u614e\u91cd\u306a\u652f\u51fa\u6226\u7565\u306f\u6c7a\u3057\u3066\u640d\u3067\u306f\u3042\u308a\u307e [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":49202,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/a-python-based-iot-data-dashboard-part-one\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/a-python-based-iot-data-dashboard-part-one\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-17T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:54:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2021\/02\/output_38_2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1014\" \/>\n\t<meta property=\"og:image:height\" content=\"617\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09\",\"datePublished\":\"2021-02-17T08:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/\"},\"wordCount\":178,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/02\/output_38_2.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/\",\"name\":\"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/02\/output_38_2.png\",\"datePublished\":\"2021-02-17T08:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:26+00:00\",\"description\":\"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2021\/02\/output_38_2.png\",\"contentUrl\":\"\/wp-content\/uploads\/2021\/02\/output_38_2.png\",\"width\":1014,\"height\":617},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT","description":"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/a-python-based-iot-data-dashboard-part-one\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT","og_description":"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/a-python-based-iot-data-dashboard-part-one\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2021-02-17T08:00:00+00:00","article_modified_time":"2025-11-14T15:54:26+00:00","og_image":[{"width":1014,"height":617,"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2021\/02\/output_38_2.png","type":"image\/png"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"4\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09","datePublished":"2021-02-17T08:00:00+00:00","dateModified":"2025-11-14T15:54:26+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/"},"wordCount":178,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/02\/output_38_2.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/","name":"Python\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\uff08\u7b2c\u4e00\u56de\uff09 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/02\/output_38_2.png","datePublished":"2021-02-17T08:00:00+00:00","dateModified":"2025-11-14T15:54:26+00:00","description":"\u5c0e\u5165\u3068\u76ee\u7684 \u65b0\u9023\u8f09\uff1aPython\u3067\u4f5c\u308bIoT\u30c7\u30fc\u30bf\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/a-python-based-iot-data-dashboard-part-one\/#primaryimage","url":"\/wp-content\/uploads\/2021\/02\/output_38_2.png","contentUrl":"\/wp-content\/uploads\/2021\/02\/output_38_2.png","width":1014,"height":617},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/comments?post=50730"}],"version-history":[{"count":1,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50730\/revisions"}],"predecessor-version":[{"id":51567,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50730\/revisions\/51567"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media\/49202"}],"wp:attachment":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media?parent=50730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/categories?post=50730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/tags?post=50730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}