Polish README.md
1 file changed
tree: 4a45f185c92eb1edc8cac3dda0da312af592e517
  1. .github/
  2. .mvn/
  3. antlr/
  4. cli/
  5. client-py/
  6. cluster/
  7. code-coverage/
  8. compile-tools/
  9. cross-tests/
  10. distribution/
  11. docker/
  12. docs/
  13. flink-iotdb-connector/
  14. flink-tsfile-connector/
  15. grafana/
  16. hadoop/
  17. hive-connector/
  18. jdbc/
  19. licenses/
  20. server/
  21. service-rpc/
  22. session/
  23. site/
  24. spark-iotdb-connector/
  25. spark-tsfile/
  26. test/
  27. thrift/
  28. thrift-cluster/
  29. thrift-sync/
  30. tools/
  31. tsfile/
  32. zeppelin-interpreter/
  33. .asf.yaml
  34. .checkstyle
  35. .dockerignore
  36. .git-blame-ignore-revs
  37. .gitattributes
  38. .gitignore
  39. .gitmodules
  40. asf.header
  41. checkstyle.xml
  42. codecov.yml
  43. java-google-style.xml
  44. jenkins.pom
  45. Jenkinsfile
  46. LICENSE
  47. LICENSE-binary
  48. mvnw.cmd
  49. mvnw.sh
  50. NOTICE
  51. NOTICE-binary
  52. pom.xml
  53. README.md
  54. README_IOTDB.md
  55. README_IOTDB_ZH.md
  56. RELEASE_NOTES.md
README.md
  • The code for the sampling method based on minimal areal difference and other baselines compared in the experiments are available in the org.apache.iotdb.db.query.eBUG repository.
  • The README of Apache IoTDB itself is in README_IOTDB.md. To build this repository, run mvn clean package -DskipTests -pl -distribution.

A python usage example of performing online sampling based on minimal areal difference:

m=100000
sql_online="select EBUG(s1,'m'='{}','e'='3373465') from root.sg.d5".format(m)
sql=sql_online

ip = "127.0.0.1"
port_ = "6667"
username_ = "root"
password_ = "root"
fetchsize = 100000
session = Session(ip, port_, username_, password_, fetchsize)
session.open(False)

# query:
result = session.execute_query_statement(sql)
df = result.todf()
print(df)

t_online=df.iloc[:,0]
v_online=df.iloc[:,1]

# interactive visualization:
fig = go.Figure()
fig.add_trace(go.Scatter(x=t_online, y=v_online))
fig.update_layout(
    autosize=False,
    width=850,
    height=650,
)
fig.show()

A python usage example of querying the first m rows of the precomputed time series $T_{pre}$:

m=100000
sql_pre="select pre_t,pre_v from root.sg.d6 limit {}".format(m)
sql=sql_pre

ip = "127.0.0.1"
port_ = "6667"
username_ = "root"
password_ = "root"
fetchsize = 100000
session = Session(ip, port_, username_, password_, fetchsize)
session.open(False)

# query:
result = session.execute_query_statement(sql)
df = result.todf() 
print(df)

df = df.rename(columns={'root.sg.d6.pre_t': 't', 'root.sg.d6.pre_v': 'v'})
df = df.sort_values(by='t')
t_pre=df['t']
v_pre=df['v']

# interactive visualization:
fig = go.Figure()
fig.add_trace(go.Scatter(x=t_pre, y=v_pre))
fig.update_layout(
    autosize=False,
    width=850,
    height=650,
)
fig.show()