First Commit: simple anomaly detection

This commit is contained in:
Richard Wong 2023-08-28 18:24:41 +09:00
commit b8827913e1
Signed by: richard
GPG Key ID: 5BD36BA2E9EE33D0
4 changed files with 278096 additions and 0 deletions

273962
data/battery_1.csv Normal file

File diff suppressed because it is too large Load Diff

2829
notebooks/eda.ipynb Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,66 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## import data from InfluxDB\n",
"\n",
"Note: you must run `influxd` in your terminal"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from influxdb import InfluxDBClient\n",
"import pandas as pd\n",
"\n",
"client = InfluxDBClient(host='localhost', port=8086)\n",
"\n",
"client.switch_database('ISS')\n",
"\n",
"query = \"SELECT * FROM \\\"EP_Battery.Thing_HMD8310\\\"\"\n",
"\n",
"result = client.query(query)\n",
"\n",
"points = list(result.get_points())\n",
"\n",
"df = pd.DataFrame(points)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"df.to_csv('output.csv')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

File diff suppressed because one or more lines are too long