{"id":20838070,"url":"https://github.com/timcsy/filefilter","last_synced_at":"2026-04-20T18:32:22.016Z","repository":{"id":187409656,"uuid":"211617886","full_name":"timcsy/FileFilter","owner":"timcsy","description":"睡眠與空氣品質檔案資料過濾","archived":false,"fork":false,"pushed_at":"2019-10-13T08:51:19.000Z","size":24,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T09:44:11.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timcsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-09-29T06:53:28.000Z","updated_at":"2022-06-02T09:14:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bb4abdd-0d91-40fa-b7f0-c5adcfaf5061","html_url":"https://github.com/timcsy/FileFilter","commit_stats":null,"previous_names":["timcsy/filefilter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timcsy/FileFilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FFileFilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FFileFilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FFileFilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FFileFilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timcsy","download_url":"https://codeload.github.com/timcsy/FileFilter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FFileFilter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-18T01:09:19.517Z","updated_at":"2026-04-20T18:32:21.973Z","avatar_url":"https://github.com/timcsy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FileFilter （睡眠與空氣品質檔案資料過濾）\n===\n\n使用說明\n---\n\n### 安裝Python\n官網：https://www.python.org/\n找到載點後下載Python最新版並安裝\n設定好環境變數：\n教學(Windows)：https://ericjhang.github.io/archives/ad5450f3.html\n\n### 安裝套件\n在終端機(在Windows為命令提示字元，開始-\u003e所有程式-\u003e附屬應用程式-\u003e命令提示字元)輸入：\n```\npip install pandas xlrd\n```\n如果未安裝pip，請參考[教學](https://medium.com/@CCstruggled/python-%E5%AE%89%E8%A3%9D-pip-%E6%96%BC-windows-%E6%88%96-centos-%E7%B7%9A%E4%B8%8A-%E9%9B%A2%E7%B7%9A%E5%AE%89%E8%A3%9D-pip-101-fb6d8e3c611b)\n但一般情況下安裝python時就會附帶安裝pip了，除非你沒打勾\n\n### 下載本軟體\n載點：https://github.com/timcsy/FileFilter/archive/master.zip\n解壓縮到任意一個地方\n\n### 輸入資料格式說明\ninput資料夾內的檔案分類範例：\n```\n輸入資料的根目錄\n|- 受試者1\n   |- 受試者1_機器1\n      |- 受試者1_機器1_日期_D1_R.csv\n      |- 受試者1_機器1_日期_D1_R_T+L.csv\n      |- 受試者1_機器1_日期_D1_R.xlsx\n      |- ...\n   |- ...\n   |- time.txt\n|- ...\n```\n最外面是受試者編號的資料夾，受試者資料夾「必須」要有一個time.txt檔案，可以複製範例去修改\n\n### time.txt 說明\n範例：\n```\n# format: 每天的資料夾名稱(Dn) 睡覺日期(YYYYMMDD) 睡覺時間(HH:MM) 起床日期(YYYYMMDD) 起床時間(HH:MM)\n\nD1 20190912 00:30 20190912 07:30\nD2 20190913 01:23 20190913 08:19\n\n```\n\n在受試者資料夾內有每個儀器的資料夾，裡面放該儀器的資料（「必須」是.csv或是.xlsx檔）\n\n### 執行app.py\nWindows: 點開start.bat\n\nMac: 打開終端機，切換到當前工作目錄\n\n輸入以下指令並Enter\n```\npython app.py\n```\n輸入「輸入資料夾（input）」，\n\n輸入「輸出資料夾（output）」，\n\n輸入「時間間隔」，就是說合併的資料中時間間距要多少（以秒為單位）\n\n等待一陣子，過濾、合併後的資料將會存在output資料夾內。\n\n過濾後的檔案會將檔名的R改成C並存在原機器名的資料夾下、合併後的檔案(D1-D6)會存在MERGE資料夾內\n\n如果要中斷執行，就按Ctrl + C\n\n欄位及格式說明\n---\n\n### 時間\n統一以\n```\nYYYY-MM-DD HH:mm:ss\n```\n表示\n\n### 空資料\n就空著，對，就是這樣\n\n### TEMPPAL\n簡寫為「T」\n出現在D1-D6\n以下為逗號分隔的欄位名稱\n```\nname,temperature (degree Celsius),time\n```\n\n### HEARTHERMO\n簡寫為「H」\n出現在D1-D6\n以下為逗號分隔的欄位名稱\n```\ntime,HR,temp,move\n```\n\n### AXIVITY\n分兩種：\n\n沒有溫度和照度的簡寫為「A」\n出現在D1-D6\n以下為逗號分隔的欄位名稱\n```\ntime,X_Axis,Y_Axis,Z_Axis\n```\n\n有溫度和照度的簡寫為「A_TL」\n出現在D1-D6\n以下為逗號分隔的欄位名稱\n```\ntime,X_Axis,Y_Axis,Z_Axis,lux (Lux = 10(counts/341)),temp (T = (counts – 171) / 3.142)\n```\n\n### EDIMAX\n分三種：\n\n外面的簡寫為「E_O」\n出現在D1-D3\n以下為逗號分隔的欄位名稱\n```\ndecice,time,pm25,pm10,pm1,t,h,co2,co,hcho,tvoc\n```\n\n裡面的簡寫為「E_I」\n出現在D1-D3\n以下為逗號分隔的欄位名稱\n```\ndecice,time,pm25,pm10,pm1,t,h,co2,co,hcho,tvoc\n```\n\n回家的簡寫為「E」\n出現在D4-D6\n以下為逗號分隔的欄位名稱\n```\ndecice,time,pm25,pm10,pm1,t,h,co2,co,hcho,tvoc\n```\n\n### AIRBOX\n簡寫為「Air」\n出現在D1-D3\n以下為逗號分隔的欄位名稱\n```\ntime,CO2,PM1,PM2.5,PM10,PM0.3 cnt,PM0.5 cnt,PM1.0 cnt,PM2.5 cnt,PM5.0 cnt,PM10 cnt\n```\n\n### MERGE（合併後）\n分兩種：\n\n以下為D1-D3以逗號分隔的欄位名稱\n```\nTime,temp_T,HR_H,temp_H,move_H,X_Axis_A,Y_Axis_A,Z_Axis_A,lux_A (Lux = 10(counts/341)),temp_A (T = (counts – 171) / 3.142),pm25_E_O,pm10_E_O,pm1_E_O,t_E_O,h_E_O,co2_E_O,co_E_O,hcho_E_O,tvoc_E_O,pm25_E_I,pm10_E_I,pm1_E_I,t_E_I,h_E_I,co2_E_I,co_E_I,hcho_E_I,tvoc_E_I,CO2_Air,PM1_Air,PM2.5_Air,PM10_Air,PM0.3_Air,PM0.5_Air,PM1.0_Air,PM2.5_Air,PM5.0_Air,PM10_Air\n```\n\n以下為D4-D6以逗號分隔的欄位名稱\n```\nTime,temp_T,HR_H,temp_H,move_H,X_Axis_A,Y_Axis_A,Z_Axis_A,lux_A (Lux = 10(counts/341)),temp_A (T = (counts ??171) / 3.142),pm25_E,pm10_E,pm1_E,t_E,h_E,co2_E,co_E,hcho_E,tvoc_E\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Ffilefilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimcsy%2Ffilefilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Ffilefilter/lists"}