Skip to content

Commit 3ea0814

Browse files
author
Olivier Davant
committed
Search Template examples update
1 parent b0915bf commit 3ea0814

File tree

2 files changed

+74
-74
lines changed

2 files changed

+74
-74
lines changed

Examples/1-Access/EX-1.01.06.1-SearchTemplates-Equities.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
"tags": []
3434
},
3535
"source": [
36-
"Search templates are defined using the following JSON structure:\n",
37-
" - **description** (string): Description of the template.\n",
38-
" - **parameters** (object): Parameters of the template. These parameters can be used as placeholders in the request_body of the template and as named parameters of the search() method of the template. Each parameter has a name, a description, and an optional default value.\n",
39-
" - **request_body** (object): Body of the request sent to the Search REST API. This request body can include template parameters surrounded by '#{' and '}' (for example: “#{my_param}”). More details on the structure of the request body can be found in the [Search API reference guide](https://apidocs.refinitiv.com/Apps/ApiDocs#/details/L2Rpc2NvdmVyeS9zZWFyY2gvdjE=/Lw==/POST/README) (access to this guide requires a Refinitiv Workspace account or RDP account to log in).\n",
36+
"**Search templates are defined using the following JSON structure:**\n",
37+
"\n",
38+
"- **description** (string): Description of the template.\n",
39+
"- **parameters** (object): Parameters of the template. These parameters can be used as placeholders in the request_body of the template and as named parameters of the search() method of the template. Each parameter has a name, a description, and an optional default value.\n",
40+
"- **request_body** (object): Body of the request sent to the Search REST API. This request body can include template parameters surrounded by '#{' and '}' (for example: “#{my_param}”). More details on the structure of the request body can be found in the [Search API reference guide](https://apidocs.refinitiv.com/Apps/ApiDocs#/details/L2Rpc2NvdmVyeS9zZWFyY2gvdjE=/Lw==/POST/README) (access to this guide requires a Refinitiv Workspace account or RDP account to log in).\n",
4041
" \n",
4142
"**Template example:**\n",
4243
" \n",

Examples/1-Access/EX-1.01.06.2-SearchTemplates-PhysicalAssets.ipynb

Lines changed: 69 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
},
3434
"source": [
3535
"**Search templates are defined using the following JSON structure:**\n",
36-
"\n",
3736
"- **description** (string): Description of the template.\n",
3837
"- **parameters** (object): Parameters of the template. These parameters can be used as placeholders in the request_body of the template and as named parameters of the search() method of the template. Each parameter has a name, a description, and an optional default value.\n",
3938
"- **request_body** (object): Body of the request sent to the Search REST API. This request body can include template parameters surrounded by '#{' and '}' (for example: “#{my_param}”). More details on the structure of the request body can be found in the [Search API reference guide](https://apidocs.refinitiv.com/Apps/ApiDocs#/details/L2Rpc2NvdmVyeS9zZWFyY2gvdjE=/Lw==/POST/README) (access to this guide requires a Refinitiv Workspace account or RDP account to log in).\n",
@@ -143,7 +142,7 @@
143142
{
144143
"data": {
145144
"text/plain": [
146-
"<refinitiv.data.session.Definition object at 0x7fe6f05ac880 {name='workspace'}>"
145+
"<refinitiv.data.session.Definition object at 0x7f87a8caa970 {name='workspace'}>"
147146
]
148147
},
149148
"execution_count": 2,
@@ -174,7 +173,7 @@
174173
{
175174
"data": {
176175
"text/plain": [
177-
"<ConfigurationSet: 0x7fe6ecb22a30>"
176+
"<ConfigurationSet: 0x7f87a5d56e50>"
178177
]
179178
},
180179
"execution_count": 3,
@@ -274,7 +273,7 @@
274273
{
275274
"data": {
276275
"application/vnd.jupyter.widget-view+json": {
277-
"model_id": "76547c81a18a4f4ebe2e98964df6d18b",
276+
"model_id": "297ab3390e2f49648555f378d1a9ca0f",
278277
"version_major": 2,
279278
"version_minor": 0
280279
},
@@ -532,12 +531,12 @@
532531
{
533532
"data": {
534533
"application/vnd.jupyter.widget-view+json": {
535-
"model_id": "c5ceda5aace84dcca989eb416934f973",
534+
"model_id": "91c7802cac2745c98db72b2761dd0744",
536535
"version_major": 2,
537536
"version_minor": 0
538537
},
539538
"text/plain": [
540-
"Map(center=[49.580833435059, -0.27009832859], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom"
539+
"Map(center=[50.856094360352, -1.350985050201], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoo"
541540
]
542541
},
543542
"metadata": {},
@@ -576,53 +575,53 @@
576575
" <tbody>\n",
577576
" <tr>\n",
578577
" <th>0</th>\n",
579-
" <td>C}KV7309502197</td>\n",
580-
" <td>OLYMPIC LEOPARD</td>\n",
581-
" <td>VLCC</td>\n",
582-
" <td>49.580833</td>\n",
583-
" <td>-0.270098</td>\n",
584-
" <td>At Anchor</td>\n",
585-
" <td>170611.0</td>\n",
578+
" <td>C}CC7309865841</td>\n",
579+
" <td>ONE TRIBUTE</td>\n",
580+
" <td>Container</td>\n",
581+
" <td>50.856094</td>\n",
582+
" <td>-1.350985</td>\n",
583+
" <td>Underway Using Engine</td>\n",
584+
" <td>210678.0</td>\n",
586585
" </tr>\n",
587586
" <tr>\n",
588587
" <th>1</th>\n",
589-
" <td>C}KV7309957461</td>\n",
590-
" <td>EAGLE VALLERY</td>\n",
588+
" <td>C}KV7309502197</td>\n",
589+
" <td>OLYMPIC LEOPARD</td>\n",
591590
" <td>VLCC</td>\n",
592-
" <td>49.75919</td>\n",
593-
" <td>-0.227743</td>\n",
591+
" <td>49.578957</td>\n",
592+
" <td>-0.277272</td>\n",
594593
" <td>At Anchor</td>\n",
595-
" <td>158244.0</td>\n",
594+
" <td>170611.0</td>\n",
596595
" </tr>\n",
597596
" <tr>\n",
598597
" <th>2</th>\n",
599598
" <td>C}CC7309501973</td>\n",
600599
" <td>MSC LAURENCE</td>\n",
601600
" <td>Container</td>\n",
602-
" <td>49.244526</td>\n",
603-
" <td>-4.344807</td>\n",
604-
" <td>Underway Using Engine</td>\n",
601+
" <td>49.613842</td>\n",
602+
" <td>-0.908613</td>\n",
603+
" <td>At Anchor</td>\n",
605604
" <td>140096.0</td>\n",
606605
" </tr>\n",
607606
" <tr>\n",
608607
" <th>3</th>\n",
609-
" <td>C}CC7309695199</td>\n",
610-
" <td>MSC ELODIE</td>\n",
611-
" <td>Container</td>\n",
612-
" <td>49.765675</td>\n",
613-
" <td>-4.072597</td>\n",
608+
" <td>C}NF7309500622</td>\n",
609+
" <td>CELEBRITY SILHOUETTE</td>\n",
610+
" <td>Cruise Liner</td>\n",
611+
" <td>47.846512</td>\n",
612+
" <td>-6.347404</td>\n",
614613
" <td>Underway Using Engine</td>\n",
615-
" <td>95403.0</td>\n",
614+
" <td>122210.0</td>\n",
616615
" </tr>\n",
617616
" <tr>\n",
618617
" <th>4</th>\n",
619-
" <td>C}CC7309500560</td>\n",
620-
" <td>NORTHERN JUBILEE</td>\n",
618+
" <td>C}CC7309488076</td>\n",
619+
" <td>MSC ROMA</td>\n",
621620
" <td>Container</td>\n",
622-
" <td>49.601742</td>\n",
623-
" <td>-0.276777</td>\n",
624-
" <td>At Anchor</td>\n",
625-
" <td>94419.0</td>\n",
621+
" <td>51.652664</td>\n",
622+
" <td>1.399067</td>\n",
623+
" <td>Constrained By Her Draught</td>\n",
624+
" <td>107849.0</td>\n",
626625
" </tr>\n",
627626
" <tr>\n",
628627
" <th>...</th>\n",
@@ -635,17 +634,17 @@
635634
" <td>...</td>\n",
636635
" </tr>\n",
637636
" <tr>\n",
638-
" <th>64</th>\n",
637+
" <th>68</th>\n",
639638
" <td>C}VX7309985382</td>\n",
640639
" <td>FV PARTI DE RIEN</td>\n",
641640
" <td>Other Miscellaneous</td>\n",
642-
" <td>50.724537</td>\n",
643-
" <td>1.585865</td>\n",
641+
" <td>50.727257</td>\n",
642+
" <td>1.588677</td>\n",
644643
" <td>Underway Using Engine</td>\n",
645644
" <td>&lt;NA&gt;</td>\n",
646645
" </tr>\n",
647646
" <tr>\n",
648-
" <th>65</th>\n",
647+
" <th>69</th>\n",
649648
" <td>C}BT7309985659</td>\n",
650649
" <td>ROUEN BEN0</td>\n",
651650
" <td>Other Dry</td>\n",
@@ -655,7 +654,7 @@
655654
" <td>&lt;NA&gt;</td>\n",
656655
" </tr>\n",
657656
" <tr>\n",
658-
" <th>66</th>\n",
657+
" <th>70</th>\n",
659658
" <td>C}VX7309986488</td>\n",
660659
" <td>FV LOCEAN</td>\n",
661660
" <td>Other Miscellaneous</td>\n",
@@ -665,58 +664,58 @@
665664
" <td>&lt;NA&gt;</td>\n",
666665
" </tr>\n",
667666
" <tr>\n",
668-
" <th>67</th>\n",
667+
" <th>71</th>\n",
669668
" <td>C}VX7310029866</td>\n",
670669
" <td>MA VICTOIRE</td>\n",
671670
" <td>Other Miscellaneous</td>\n",
672-
" <td>50.643097</td>\n",
673-
" <td>1.29945</td>\n",
671+
" <td>50.454124</td>\n",
672+
" <td>1.181872</td>\n",
674673
" <td>Engaged In Fishing</td>\n",
675674
" <td>&lt;NA&gt;</td>\n",
676675
" </tr>\n",
677676
" <tr>\n",
678-
" <th>68</th>\n",
677+
" <th>72</th>\n",
679678
" <td>C}VX7310029871</td>\n",
680679
" <td>FV MALOU</td>\n",
681680
" <td>Other Miscellaneous</td>\n",
682-
" <td>49.364449</td>\n",
683-
" <td>0.08031</td>\n",
681+
" <td>49.364437</td>\n",
682+
" <td>0.080305</td>\n",
684683
" <td>Underway Using Engine</td>\n",
685684
" <td>&lt;NA&gt;</td>\n",
686685
" </tr>\n",
687686
" </tbody>\n",
688687
"</table>\n",
689-
"<p>69 rows × 7 columns</p>\n",
688+
"<p>73 rows × 7 columns</p>\n",
690689
"</div>"
691690
],
692691
"text/plain": [
693-
" RIC DTSubjectName DTSimpleType Latitude \\\n",
694-
"0 C}KV7309502197 OLYMPIC LEOPARD VLCC 49.580833 \n",
695-
"1 C}KV7309957461 EAGLE VALLERY VLCC 49.75919 \n",
696-
"2 C}CC7309501973 MSC LAURENCE Container 49.244526 \n",
697-
"3 C}CC7309695199 MSC ELODIE Container 49.765675 \n",
698-
"4 C}CC7309500560 NORTHERN JUBILEE Container 49.601742 \n",
699-
".. ... ... ... ... \n",
700-
"64 C}VX7309985382 FV PARTI DE RIEN Other Miscellaneous 50.724537 \n",
701-
"65 C}BT7309985659 ROUEN BEN0 Other Dry 49.48555 \n",
702-
"66 C}VX7309986488 FV LOCEAN Other Miscellaneous 50.400105 \n",
703-
"67 C}VX7310029866 MA VICTOIRE Other Miscellaneous 50.643097 \n",
704-
"68 C}VX7310029871 FV MALOU Other Miscellaneous 49.364449 \n",
692+
" RIC DTSubjectName DTSimpleType Latitude \\\n",
693+
"0 C}CC7309865841 ONE TRIBUTE Container 50.856094 \n",
694+
"1 C}KV7309502197 OLYMPIC LEOPARD VLCC 49.578957 \n",
695+
"2 C}CC7309501973 MSC LAURENCE Container 49.613842 \n",
696+
"3 C}NF7309500622 CELEBRITY SILHOUETTE Cruise Liner 47.846512 \n",
697+
"4 C}CC7309488076 MSC ROMA Container 51.652664 \n",
698+
".. ... ... ... ... \n",
699+
"68 C}VX7309985382 FV PARTI DE RIEN Other Miscellaneous 50.727257 \n",
700+
"69 C}BT7309985659 ROUEN BEN0 Other Dry 49.48555 \n",
701+
"70 C}VX7309986488 FV LOCEAN Other Miscellaneous 50.400105 \n",
702+
"71 C}VX7310029866 MA VICTOIRE Other Miscellaneous 50.454124 \n",
703+
"72 C}VX7310029871 FV MALOU Other Miscellaneous 49.364437 \n",
705704
"\n",
706-
" Longitude AISStatus GrossTonnage \n",
707-
"0 -0.270098 At Anchor 170611.0 \n",
708-
"1 -0.227743 At Anchor 158244.0 \n",
709-
"2 -4.344807 Underway Using Engine 140096.0 \n",
710-
"3 -4.072597 Underway Using Engine 95403.0 \n",
711-
"4 -0.276777 At Anchor 94419.0 \n",
712-
".. ... ... ... \n",
713-
"64 1.585865 Underway Using Engine <NA> \n",
714-
"65 0.114852 Underway Using Engine <NA> \n",
715-
"66 0.308875 Engaged In Fishing <NA> \n",
716-
"67 1.29945 Engaged In Fishing <NA> \n",
717-
"68 0.08031 Underway Using Engine <NA> \n",
705+
" Longitude AISStatus GrossTonnage \n",
706+
"0 -1.350985 Underway Using Engine 210678.0 \n",
707+
"1 -0.277272 At Anchor 170611.0 \n",
708+
"2 -0.908613 At Anchor 140096.0 \n",
709+
"3 -6.347404 Underway Using Engine 122210.0 \n",
710+
"4 1.399067 Constrained By Her Draught 107849.0 \n",
711+
".. ... ... ... \n",
712+
"68 1.588677 Underway Using Engine <NA> \n",
713+
"69 0.114852 Underway Using Engine <NA> \n",
714+
"70 0.308875 Engaged In Fishing <NA> \n",
715+
"71 1.181872 Engaged In Fishing <NA> \n",
716+
"72 0.080305 Underway Using Engine <NA> \n",
718717
"\n",
719-
"[69 rows x 7 columns]"
718+
"[73 rows x 7 columns]"
720719
]
721720
},
722721
"metadata": {},

0 commit comments

Comments
 (0)