Skip to content

Commit 45e2215

Browse files
author
Olivier Davant
committed
Access layer examples update
1 parent dd1fc93 commit 45e2215

File tree

6 files changed

+4093
-8059
lines changed

6 files changed

+4093
-8059
lines changed

Examples/1-Access/EX-1.01.05-News.ipynb

Lines changed: 68 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
},
6969
{
7070
"cell_type": "markdown",
71-
"id": "fa15fbd3",
71+
"id": "487b8730-3f8c-4d8d-a35c-b67e57647d7b",
7272
"metadata": {},
7373
"source": [
7474
"#### Learn more\n",
@@ -83,7 +83,31 @@
8383
"\n",
8484
"If you have any questions regarding using the API, please post them on \n",
8585
"the [Refinitiv Data Q&A Forum](https://community.developers.refinitiv.com/spaces/321/index.html). \n",
86-
"The Refinitiv Developer Community will be happy to help. "
86+
"The Refinitiv Developer Community will be happy to help. \n",
87+
"\n",
88+
"----"
89+
]
90+
},
91+
{
92+
"cell_type": "markdown",
93+
"id": "4b2bee84-023e-4e96-9efb-5159fab4f00e",
94+
"metadata": {
95+
"tags": []
96+
},
97+
"source": [
98+
"## Set the configuration file location\n",
99+
"For a better ease of use, you have the option to set initialization parameters of the Refinitiv Data Library in the _refinitiv-data.config.json_ configuration file. This file must be located beside your notebook, in your user folder or in a folder defined by the _RD_LIB_CONFIG_PATH_ environment variable. The _RD_LIB_CONFIG_PATH_ environment variable is the option used by this series of examples. The following code sets this environment variable. "
100+
]
101+
},
102+
{
103+
"cell_type": "code",
104+
"execution_count": 1,
105+
"id": "37736150-28f7-43fe-badc-0ed895a1e722",
106+
"metadata": {},
107+
"outputs": [],
108+
"source": [
109+
"import os\n",
110+
"os.environ[\"RD_LIB_CONFIG_PATH\"] = \"../../Configuration\""
87111
]
88112
},
89113
{
@@ -96,7 +120,7 @@
96120
},
97121
{
98122
"cell_type": "code",
99-
"execution_count": 1,
123+
"execution_count": 2,
100124
"id": "3e6d79fd",
101125
"metadata": {},
102126
"outputs": [],
@@ -118,7 +142,7 @@
118142
},
119143
{
120144
"cell_type": "code",
121-
"execution_count": 2,
145+
"execution_count": 3,
122146
"id": "478baaad-c743-4776-9286-7951cbbd157a",
123147
"metadata": {
124148
"tags": []
@@ -127,10 +151,10 @@
127151
{
128152
"data": {
129153
"text/plain": [
130-
"<refinitiv.data.session.Definition object at 0x7f837958e390 {name='codebook'}>"
154+
"<refinitiv.data.session.Definition object at 0x7f825a76c130 {name='workspace'}>"
131155
]
132156
},
133-
"execution_count": 2,
157+
"execution_count": 3,
134158
"metadata": {},
135159
"output_type": "execute_result"
136160
}
@@ -157,7 +181,7 @@
157181
},
158182
{
159183
"cell_type": "code",
160-
"execution_count": 5,
184+
"execution_count": 4,
161185
"id": "22fd4706",
162186
"metadata": {
163187
"scrolled": true
@@ -184,61 +208,61 @@
184208
" <thead>\n",
185209
" <tr style=\"text-align: right;\">\n",
186210
" <th></th>\n",
187-
" <th>versionCreated</th>\n",
188-
" <th>text</th>\n",
211+
" <th>headline</th>\n",
189212
" <th>storyId</th>\n",
190213
" <th>sourceCode</th>\n",
191214
" </tr>\n",
192-
" </thead>\n",
193-
" <tbody>\n",
194215
" <tr>\n",
195-
" <th>2022-11-25 17:43:18.000</th>\n",
196-
" <td>2022-11-25 17:43:18.000</td>\n",
197-
" <td>What to Watch in the Week Ahead and on Monday,...</td>\n",
198-
" <td>urn:newsml:newswire.refinitiv.com:20221125:nL4...</td>\n",
199-
" <td>NS:RTRS</td>\n",
216+
" <th>versionCreated</th>\n",
217+
" <th></th>\n",
218+
" <th></th>\n",
219+
" <th></th>\n",
200220
" </tr>\n",
221+
" </thead>\n",
222+
" <tbody>\n",
201223
" <tr>\n",
202-
" <th>2022-11-25 16:29:13.000</th>\n",
203-
" <td>2022-11-25 16:29:13.000</td>\n",
204-
" <td>Btp decennale chiude in calo con rendimento a ...</td>\n",
205-
" <td>urn:newsml:newswire.refinitiv.com:20221125:nL8...</td>\n",
206-
" <td>NS:RTRS</td>\n",
224+
" <th>2022-12-30 16:10:35.987</th>\n",
225+
" <td>MARKET POST: MUNI YIELDS STEADY AT OPEN</td>\n",
226+
" <td>urn:newsml:newswire.refinitiv.com:20221230:nMn...</td>\n",
227+
" <td>NS:TM3</td>\n",
207228
" </tr>\n",
208229
" <tr>\n",
209-
" <th>2022-11-25 15:41:29.968</th>\n",
210-
" <td>2022-11-25 15:41:29.968</td>\n",
230+
" <th>2022-12-30 15:28:32.408</th>\n",
211231
" <td>REVENUE TOPS TYPE OF SECURITIES</td>\n",
212-
" <td>urn:newsml:newswire.refinitiv.com:20221125:nMn...</td>\n",
232+
" <td>urn:newsml:newswire.refinitiv.com:20221230:nMn...</td>\n",
213233
" <td>NS:TM3</td>\n",
214234
" </tr>\n",
235+
" <tr>\n",
236+
" <th>2022-12-30 11:41:13.485</th>\n",
237+
" <td>TOP: INFRASTRUCTURE OUTLOOK: FEDERAL AID DRIVE...</td>\n",
238+
" <td>urn:newsml:newswire.refinitiv.com:20221230:nMn...</td>\n",
239+
" <td>NS:BBY</td>\n",
240+
" </tr>\n",
215241
" </tbody>\n",
216242
"</table>\n",
217243
"</div>"
218244
],
219245
"text/plain": [
220-
" versionCreated \\\n",
221-
"2022-11-25 17:43:18.000 2022-11-25 17:43:18.000 \n",
222-
"2022-11-25 16:29:13.000 2022-11-25 16:29:13.000 \n",
223-
"2022-11-25 15:41:29.968 2022-11-25 15:41:29.968 \n",
224-
"\n",
225-
" text \\\n",
226-
"2022-11-25 17:43:18.000 What to Watch in the Week Ahead and on Monday,... \n",
227-
"2022-11-25 16:29:13.000 Btp decennale chiude in calo con rendimento a ... \n",
228-
"2022-11-25 15:41:29.968 REVENUE TOPS TYPE OF SECURITIES \n",
246+
" headline \\\n",
247+
"versionCreated \n",
248+
"2022-12-30 16:10:35.987 MARKET POST: MUNI YIELDS STEADY AT OPEN \n",
249+
"2022-12-30 15:28:32.408 REVENUE TOPS TYPE OF SECURITIES \n",
250+
"2022-12-30 11:41:13.485 TOP: INFRASTRUCTURE OUTLOOK: FEDERAL AID DRIVE... \n",
229251
"\n",
230252
" storyId \\\n",
231-
"2022-11-25 17:43:18.000 urn:newsml:newswire.refinitiv.com:20221125:nL4... \n",
232-
"2022-11-25 16:29:13.000 urn:newsml:newswire.refinitiv.com:20221125:nL8... \n",
233-
"2022-11-25 15:41:29.968 urn:newsml:newswire.refinitiv.com:20221125:nMn... \n",
253+
"versionCreated \n",
254+
"2022-12-30 16:10:35.987 urn:newsml:newswire.refinitiv.com:20221230:nMn... \n",
255+
"2022-12-30 15:28:32.408 urn:newsml:newswire.refinitiv.com:20221230:nMn... \n",
256+
"2022-12-30 11:41:13.485 urn:newsml:newswire.refinitiv.com:20221230:nMn... \n",
234257
"\n",
235258
" sourceCode \n",
236-
"2022-11-25 17:43:18.000 NS:RTRS \n",
237-
"2022-11-25 16:29:13.000 NS:RTRS \n",
238-
"2022-11-25 15:41:29.968 NS:TM3 "
259+
"versionCreated \n",
260+
"2022-12-30 16:10:35.987 NS:TM3 \n",
261+
"2022-12-30 15:28:32.408 NS:TM3 \n",
262+
"2022-12-30 11:41:13.485 NS:BBY "
239263
]
240264
},
241-
"execution_count": 5,
265+
"execution_count": 4,
242266
"metadata": {},
243267
"output_type": "execute_result"
244268
}
@@ -257,7 +281,7 @@
257281
},
258282
{
259283
"cell_type": "code",
260-
"execution_count": 11,
284+
"execution_count": 5,
261285
"id": "4ca8f820",
262286
"metadata": {},
263287
"outputs": [
@@ -270,7 +294,7 @@
270294
"<IPython.core.display.HTML object>"
271295
]
272296
},
273-
"execution_count": 11,
297+
"execution_count": 5,
274298
"metadata": {},
275299
"output_type": "execute_result"
276300
}
@@ -282,7 +306,7 @@
282306
},
283307
{
284308
"cell_type": "code",
285-
"execution_count": 13,
309+
"execution_count": 6,
286310
"id": "2153c3f6",
287311
"metadata": {},
288312
"outputs": [
@@ -341,21 +365,13 @@
341365
},
342366
{
343367
"cell_type": "code",
344-
"execution_count": 14,
368+
"execution_count": 7,
345369
"id": "a3284410",
346370
"metadata": {},
347371
"outputs": [],
348372
"source": [
349373
"rd.close_session()"
350374
]
351-
},
352-
{
353-
"cell_type": "code",
354-
"execution_count": null,
355-
"id": "b7b20b33-76e1-48a8-a713-3eda9dafe7d0",
356-
"metadata": {},
357-
"outputs": [],
358-
"source": []
359375
}
360376
],
361377
"metadata": {

0 commit comments

Comments
 (0)