Polish README.md
diff --git a/README.md b/README.md
index 3acb746..0cec671 100644
--- a/README.md
+++ b/README.md
@@ -19,5 +19,79 @@
 
 -->
 
-- The code for eBUG and other baselines compared in the experiments are available in the `org.apache.iotdb.db.query.eBUG` repository.
-- The README of [Apache IoTDB](https://iotdb.apache.org/) itself is in [README_IOTDB.md](README_IOTDB.md). To build this repository, run `mvn clean package -DskipTests -pl -distribution`.
\ No newline at end of file
+- 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](https://github.com/apache/iotdb/tree/research/area-visualization/server/src/main/java/org/apache/iotdb/db/query/eBUG) repository.
+- The README of [Apache IoTDB](https://iotdb.apache.org/) itself is in [README_IOTDB.md](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:
+```python
+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)
+
+start = time.time_ns()
+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}$:
+```python
+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)
+
+start = time.time_ns() 
+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()
+```