{"id":19381779,"url":"https://github.com/taosdata/tdengine-playground","last_synced_at":"2025-09-13T08:30:51.378Z","repository":{"id":103096569,"uuid":"542719489","full_name":"taosdata/tdengine-playground","owner":"taosdata","description":"Playground of TDengine","archived":true,"fork":false,"pushed_at":"2022-09-30T14:32:27.000Z","size":84126,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-24T16:54:29.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taosdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-28T17:47:46.000Z","updated_at":"2024-12-03T15:19:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"179268f3-4b1b-4b24-8c45-2e1373e7dd03","html_url":"https://github.com/taosdata/tdengine-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taosdata/tdengine-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Ftdengine-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Ftdengine-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Ftdengine-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Ftdengine-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taosdata","download_url":"https://codeload.github.com/taosdata/tdengine-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Ftdengine-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274937633,"owners_count":25377313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T09:18:21.842Z","updated_at":"2025-09-13T08:30:46.356Z","avatar_url":"https://github.com/taosdata.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tdengine-playground\n**数据同步导入环境为Ubuntu**\n### 主要软件、框架及依赖：\nTDengine3、Vue3、Python3、Vite、ECharts、Element Plus、Monaco Editor\n### 项目设计\n首先通过python脚本对数据集进行处理然后通过TDengine Python Connector taospy将数据集导入TDengine中。之后使用Vue和Vite构建前端, 使用Element Plus组件组织页面，Monaco作为前端的SQL编辑器，ECharts渲染图表。前端通过taosAdapter 提供的 REST 接口与TDengine服务端建立连接，不需要单独的后台。\n![](img/img.png)\n\n### TDengine修改配置\n\n需要修改WAL 来防止插入大量数据出错\n\n需要配置taosAdapter 跨域参数\n\n### 所选数据集及建模信息\n所选数据均满足公开获取要求\n\nA.\t选择用索菲亚地区的天气传感器数据作为数据集来进行建模\n传感器数据时间为秒级，选取经纬度作为模型的标签,传感器的ID为表名。数据分为存档数据和同步数据，数据通过import_data.py导入，导入存档和同步数据需要修改小部分代码（已注释）。使用pull_data.py拉取和存储同步数据，同步数据请求连接：[https://api.luftdaten.info/static/v2/data.temp.min.json]()，数据每五分钟更新一次。拉取的数据暂时以csv文件的形式保存在sync_data文件夹中，使用import_data.py导入到TDengine。\n\n\n1. 字段名\t中文\t类型\t长度\t注释\n2. sensor_id\t传感器ID\t\t\t仅作为table_name\n3. ts\t时间戳\tTIMESTAMP\t8\n4. pressure\t气压\tDOUBLE\t8\n5. temperature\t温度\tFLOAT\t4\n6. humidity\t湿度\tFLOAT\t4\n7. lat\t纬度\tFLOAT\t4\tTAG\n8. lon\t经度\tFLOAT\t4\tTAG\n\n数据库建模语句：\n`CREATE DATABASE weather`\n\n`CREATE STABLE weather.sensor (ts TIMESTAMP, pressure DOUBLE,temperature float,humidity float) TAGS (lat float, lon float)`\n\n`INSERT INTO ? USING sensor TAGS(?, ?) VALUES(?, ?, ?, ?)`\n采用插入时自动建表的方式 ？为占位符\n\n\n\nB.\t第二个数据集为弗罗茨瓦夫公共交通，数据只有存档数据\n字段名\t中文\t类型\t长度\t注释\nline_number\t公交序号\t\t\t作为table_name和TAG\nts\t时间戳\tTIMESTAMP\t8\t\ntype\t公共交通类型\tNCHAR(10)\t10\t\nvehicle_id\t车辆ID\tINT\t4\t\nlatitude\t纬度\tFLOAT\t4\tTAG\nlongitude\t经度\tFLOAT\t4\tTAG\n数据库建模语句：\nCREATE DATABASE transport\nCREATE STABLE transport.gps (ts TIMESTAMP,type nchar(10),latitude float,longitude float, vehicle_id int) TAGS (line_number nchar(10))\n\n### 前端配置\n1)\tTDengine RESTful API 的认证信息，直接修改authorization变量，TOKEN 为 {username}:{password} 经过 Base64 编码之后的字符串，例如 root:taosdata 编码后为 cm9vdDp0YW9zZGF0YQ==。\n2)\t内置SQL语句直接修改preset_sql变量。\n\n### 预览\n![](img/img2.png)\n\n![](img/img3.png)\n\n![](img/img4.png)\n\n![](img/img5.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaosdata%2Ftdengine-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaosdata%2Ftdengine-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaosdata%2Ftdengine-playground/lists"}