Skip to content

Commit 32983c2

Browse files
authored
Fix tutorial navigation (timescale#2576)
1 parent 54b17f1 commit 32983c2

File tree

5 files changed

+44
-37
lines changed

5 files changed

+44
-37
lines changed

tutorials/financial-ingest-real-time/financial-ingest-dataset.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: Ingest real-time financial websocket data - Set up the dataset
33
excerpt: Set up a dataset so you can query financial tick data to analyze price changes
4-
products: [cloud, mst, self_hosted]
5-
keywords: [tutorials, finance, learn]
6-
tags: [tutorials, advanced]
4+
products: [cloud]
5+
keywords: [finance, analytics, websockets, data pipeline]
6+
tags: [tutorials, intermediate]
7+
layout_components: [next_prev_large]
8+
content_group: Ingest real-time financial websocket data
79
---
810

911
import CreateAndConnect from "versionContent/_partials/_cloud-create-connect-tutorials.mdx";
@@ -26,7 +28,7 @@ regular PostgreSQL table named `company`.
2628
<Collapsible heading="Connect to the websocket server" defaultExpanded={false}>
2729

2830
When you connect to the Twelve Data API through a websocket, you create a
29-
persistent connection between your computer and the websocket server.
31+
persistent connection between your computer and the websocket server.
3032
You set up a Python environment, and pass two arguments to create a
3133
websocket object and establish the connection.
3234

@@ -168,11 +170,11 @@ To ingest the data into your Timescale service, you need to implement the
168170
`on_event` function.
169171
170172
After the websocket connection is set up, you can use the `on_event` function
171-
to ingest data into the database. This is a data pipeline that ingests real-time
173+
to ingest data into the database. This is a data pipeline that ingests real-time
172174
financial data into your Timescale service.
173175
174176
Stock trades are ingested in real-time Monday through Friday, typically during
175-
normal trading hours of the New York Stock Exchange (9:30&nbsp;AM to
177+
normal trading hours of the New York Stock Exchange (9:30&nbsp;AM to
176178
4:00&nbsp;PM&nbsp;EST).
177179
178180
<CreateHypertableStocks />
@@ -246,7 +248,7 @@ This function needs to:
246248
if self.conn is not None:
247249
cursor = self.conn.cursor()
248250
sql = f"""
249-
INSERT INTO {self.DB_TABLE} ({','.join(self.DB_COLUMNS)})
251+
INSERT INTO {self.DB_TABLE} ({','.join(self.DB_COLUMNS)})
250252
VALUES %s;"""
251253
execute_values(cursor, sql, data)
252254
self.conn.commit()
@@ -274,7 +276,7 @@ This function needs to:
274276
print(f"Batch insert #{self.insert_counter}")
275277
self.current_batch = []
276278
def start(self, symbols):
277-
"""Connect to the web socket server and start streaming real-time data
279+
"""Connect to the web socket server and start streaming real-time data
278280
into the database.
279281
280282
Args:
@@ -287,12 +289,12 @@ This function needs to:
287289
while True:
288290
ws.heartbeat()
289291
time.sleep(10)
290-
onn = psycopg2.connect(database="tsdb",
291-
host="<HOST>",
292-
user="tsdbadmin",
292+
onn = psycopg2.connect(database="tsdb",
293+
host="<HOST>",
294+
user="tsdbadmin",
293295
password="<PASSWORD>",
294296
port="<PORT>")
295-
297+
296298
symbols = ["BTC/USD", "ETH/USD", "MSFT", "AAPL"]
297299
websocket = WebsocketPipeline(conn)
298300
websocket.start(symbols=symbols)
@@ -333,4 +335,4 @@ the energy consumption dataset.
333335
</Collapsible>
334336
335337
[twelve-wrapper]: https://github.com/twelvedata/twelvedata-python
336-
[psycopg2]: https://www.psycopg.org/docs/
338+
[psycopg2]: https://www.psycopg.org/docs/

tutorials/financial-ingest-real-time/financial-ingest-query.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: Ingest real-time financial websocket data - Query the data
33
excerpt: Create candlestick views and query financial tick data to analyze price changes
4-
products: [cloud, mst, self_hosted]
5-
keywords: [tutorials, finance, learn]
6-
tags: [tutorials, advanced]
4+
products: [cloud]
5+
keywords: [finance, analytics, websockets, data pipeline]
6+
tags: [tutorials, intermediate]
7+
layout_components: [next_prev_large]
8+
content_group: Ingest real-time financial websocket data
79
---
810

911
import GraphOhlcv from "versionContent/_partials/_graphing-ohlcv-data.mdx";
@@ -80,14 +82,14 @@ OHLCV values.
8082
```sql
8183
bucket | symbol | open | high | low | close | day_volume
8284
------------------------+---------+---------+---------+---------+---------+------------
83-
2023-05-30 08:00:00+00 | AAPL | 176.31 | 176.31 | 176 | 176.01 |
84-
2023-05-30 08:01:00+00 | AAPL | 176.27 | 176.27 | 176.02 | 176.2 |
85-
2023-05-30 08:06:00+00 | AAPL | 176.03 | 176.04 | 175.95 | 176 |
86-
2023-05-30 08:07:00+00 | AAPL | 175.95 | 176 | 175.82 | 175.91 |
87-
2023-05-30 08:08:00+00 | AAPL | 175.92 | 176.02 | 175.8 | 176.02 |
88-
2023-05-30 08:09:00+00 | AAPL | 176.02 | 176.02 | 175.9 | 175.98 |
89-
2023-05-30 08:10:00+00 | AAPL | 175.98 | 175.98 | 175.94 | 175.94 |
90-
2023-05-30 08:11:00+00 | AAPL | 175.94 | 175.94 | 175.91 | 175.91 |
85+
2023-05-30 08:00:00+00 | AAPL | 176.31 | 176.31 | 176 | 176.01 |
86+
2023-05-30 08:01:00+00 | AAPL | 176.27 | 176.27 | 176.02 | 176.2 |
87+
2023-05-30 08:06:00+00 | AAPL | 176.03 | 176.04 | 175.95 | 176 |
88+
2023-05-30 08:07:00+00 | AAPL | 175.95 | 176 | 175.82 | 175.91 |
89+
2023-05-30 08:08:00+00 | AAPL | 175.92 | 176.02 | 175.8 | 176.02 |
90+
2023-05-30 08:09:00+00 | AAPL | 176.02 | 176.02 | 175.9 | 175.98 |
91+
2023-05-30 08:10:00+00 | AAPL | 175.98 | 175.98 | 175.94 | 175.94 |
92+
2023-05-30 08:11:00+00 | AAPL | 175.94 | 175.94 | 175.91 | 175.91 |
9193
2023-05-30 08:12:00+00 | AAPL | 175.9 | 175.94 | 175.9 | 175.94 |
9294
```
9395

tutorials/financial-ingest-real-time/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
title: Ingest real-time financial websocket data
33
excerpt: Set up a data pipeline to get data from different financial APIs
4-
products: [cloud, mst, self_hosted]
4+
products: [cloud]
55
keywords: [finance, analytics, websockets, data pipeline]
6+
tags: [tutorials, intermediate]
7+
layout_components: [next_prev_large]
8+
content_group: Ingest real-time financial websocket data
69
---
710

811
import CandlestickIntro from "versionContent/_partials/_candlestick_intro.mdx";

tutorials/nyc-taxi-geospatial/dataset-nyc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Query time-series data tutorial - set up dataset
3-
excerpt: Set up a dataset so you can query time-series data
4-
products: [cloud, mst, self_hosted]
5-
keywords: [tutorials, create, dataset]
6-
tags: [tutorials, beginner]
2+
title: Plot geospatial time-series data tutorial - set up dataset
3+
excerpt: Set up a dataset so you can query geospatial time-series data
4+
products: [cloud]
5+
keywords: [tutorials, GIS, geospatial, learn]
6+
tags: [tutorials, intermediate]
77
layout_components: [next_prev_large]
8-
content_group: Analyze NYC taxi cab data
8+
content_group: Plot geospatial NYC taxi cab data
99
---
1010

1111
import CreateAndConnect from "versionContent/_partials/_cloud-create-connect-tutorials.mdx";

tutorials/nyc-taxi-geospatial/plot-nyc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Query time-series data tutorial - query the data
3-
excerpt: Query time-series data
4-
products: [cloud, mst, self_hosted]
5-
keywords: [tutorials, query]
6-
tags: [tutorials, beginner]
2+
title: Plot geospatial time-series data tutorial - query the data
3+
excerpt: Query geospatial time-series data
4+
products: [cloud]
5+
keywords: [tutorials, GIS, geospatial, learn]
6+
tags: [tutorials, intermediate]
77
layout_components: [next_prev_large]
8-
content_group: Analyze NYC taxi cab data
8+
content_group: Plot geospatial NYC taxi cab data
99
---
1010

1111
# Query the data

0 commit comments

Comments
 (0)