Skip to content

Commit 76dce7f

Browse files
author
Jirapongse Phuriphanvichai
authored
Update README.md
1 parent 777a5cc commit 76dce7f

File tree

1 file changed

+78
-73
lines changed

1 file changed

+78
-73
lines changed

README.md

Lines changed: 78 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -51,79 +51,7 @@ The access token can be retrieved after login to the [Open PermID](https://permi
5151

5252
![API Token](pic1.png)
5353

54-
### 3. Entity Lookup
55-
56-
This function is used to look up the entity information by the PermID.
57-
58-
```
59-
lookup(id, format='dataframe', orient='row')
60-
```
61-
62-
It accepts three parameters:
63-
64-
|Parameter Name|Required|Description|
65-
|--------------|--------|-----------|
66-
|id|Yes|The PermID used to lookup e.g. 1-5064690523|
67-
|format|No|The format of the output. Possible values are **dataframe**, **json-ld**, or **turtle**. The default value is **dataframe**|
68-
|orient|No|The format of the returned data frame. Possible values are **row**, or **column**. The default value is **row**|
69-
70-
This function returns a tuple containing a result and error string. The result could be a data frame, JSON, or turtle string depending on the **format** parameter.
71-
72-
__**Sample Usages**__
73-
74-
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the default parameters**
75-
76-
```Python
77-
df,err = opid.lookup("1-5064690523")
78-
```
79-
It uses the default values of the **format** and **orient** parameters, so the returned result is a data frame with the row orient.
80-
81-
![lookup with the default parameters](lookup1.png)
82-
83-
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the 'column' orient parameter**
84-
85-
```Python
86-
output,err = opid.lookup("1-5064690523", orient="column")
87-
```
88-
The returned result is a data frame with the column orient.
89-
90-
![lookup with the column orient parameters](lookup2.png)
91-
92-
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the 'json-ld' format parameter**
93-
94-
```Python
95-
output,err = opid.lookup("1-5064690523", format="json-ld")
96-
```
97-
The returned result is a JSON string.
98-
```
99-
{
100-
"@id" : "https://permid.org/1-5064690523",
101-
"@type" : "tr-org:Organization",
102-
"mdaas:HeadquartersAddress" : "3 Times Sq\n\n\nNEW YORK\nNEW YORK\n10036-6564\n",
103-
"mdaas:RegisteredAddress" : "200 Bellevue Pkwy Ste 210\n\n\nWILMINGTON\nDELAWARE\n19809-3709\nUnited States\n",
104-
"tr-common:hasPermId" : "5064690523",
105-
"hasPrimaryInstrument" : "https://permid.org/1-21661915727",
106-
"hasActivityStatus" : "tr-org:statusActive",
107-
"tr-org:hasHeadquartersPhoneNumber" : "16462234000",
108-
"tr-org:hasLEI" : "549300NF240HXJO7N016",
109-
"hasLatestOrganizationFoundedDate" : "2018-03-16T00:00:00Z",
110-
"hasPrimaryBusinessSector" : "https://permid.org/1-4294952762",
111-
"hasPrimaryEconomicSector" : "https://permid.org/1-4294952767",
112-
"hasPrimaryIndustryGroup" : "https://permid.org/1-4294952759",
113-
"tr-org:hasRegisteredFaxNumber" : "13027985841",
114-
"tr-org:hasRegisteredPhoneNumber" : "13027985860",
115-
"isIncorporatedIn" : "http://sws.geonames.org/6252001/",
116-
"isDomiciledIn" : "http://sws.geonames.org/2635167/",
117-
"hasURL" : "https://www.refinitiv.com",
118-
"vcard:organization-name" : "Refinitiv US Holdings Inc",
119-
"@context" : {
120-
"HeadquartersAddress" : {
121-
"@id" : "http://ont.thomsonreuters.com/mdaas/HeadquartersAddress",
122-
"@type" : "http://www.w3.org/2001/XMLSchema#string"
123-
...
124-
```
125-
126-
### 4. Entity Search
54+
### 3. Entity Search
12755

12856
This function is used to search an entity's PermID value from a string.
12957
```
@@ -228,6 +156,80 @@ The returned result is a JSON string.
228156
}
229157
}
230158
```
159+
160+
### 4. Entity Lookup
161+
162+
This function is used to look up the entity information by the PermID.
163+
164+
```
165+
lookup(id, format='dataframe', orient='row')
166+
```
167+
168+
It accepts three parameters:
169+
170+
|Parameter Name|Required|Description|
171+
|--------------|--------|-----------|
172+
|id|Yes|The PermID used to lookup e.g. 1-5064690523|
173+
|format|No|The format of the output. Possible values are **dataframe**, **json-ld**, or **turtle**. The default value is **dataframe**|
174+
|orient|No|The format of the returned data frame. Possible values are **row**, or **column**. The default value is **row**|
175+
176+
This function returns a tuple containing a result and error string. The result could be a data frame, JSON, or turtle string depending on the **format** parameter.
177+
178+
__**Sample Usages**__
179+
180+
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the default parameters**
181+
182+
```Python
183+
df,err = opid.lookup("1-5064690523")
184+
```
185+
It uses the default values of the **format** and **orient** parameters, so the returned result is a data frame with the row orient.
186+
187+
![lookup with the default parameters](lookup1.png)
188+
189+
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the 'column' orient parameter**
190+
191+
```Python
192+
output,err = opid.lookup("1-5064690523", orient="column")
193+
```
194+
The returned result is a data frame with the column orient.
195+
196+
![lookup with the column orient parameters](lookup2.png)
197+
198+
- **Call the lookup method to retrieve the entity information of the 1-5064690523 PermID with the 'json-ld' format parameter**
199+
200+
```Python
201+
output,err = opid.lookup("1-5064690523", format="json-ld")
202+
```
203+
The returned result is a JSON string.
204+
```
205+
{
206+
"@id" : "https://permid.org/1-5064690523",
207+
"@type" : "tr-org:Organization",
208+
"mdaas:HeadquartersAddress" : "3 Times Sq\n\n\nNEW YORK\nNEW YORK\n10036-6564\n",
209+
"mdaas:RegisteredAddress" : "200 Bellevue Pkwy Ste 210\n\n\nWILMINGTON\nDELAWARE\n19809-3709\nUnited States\n",
210+
"tr-common:hasPermId" : "5064690523",
211+
"hasPrimaryInstrument" : "https://permid.org/1-21661915727",
212+
"hasActivityStatus" : "tr-org:statusActive",
213+
"tr-org:hasHeadquartersPhoneNumber" : "16462234000",
214+
"tr-org:hasLEI" : "549300NF240HXJO7N016",
215+
"hasLatestOrganizationFoundedDate" : "2018-03-16T00:00:00Z",
216+
"hasPrimaryBusinessSector" : "https://permid.org/1-4294952762",
217+
"hasPrimaryEconomicSector" : "https://permid.org/1-4294952767",
218+
"hasPrimaryIndustryGroup" : "https://permid.org/1-4294952759",
219+
"tr-org:hasRegisteredFaxNumber" : "13027985841",
220+
"tr-org:hasRegisteredPhoneNumber" : "13027985860",
221+
"isIncorporatedIn" : "http://sws.geonames.org/6252001/",
222+
"isDomiciledIn" : "http://sws.geonames.org/2635167/",
223+
"hasURL" : "https://www.refinitiv.com",
224+
"vcard:organization-name" : "Refinitiv US Holdings Inc",
225+
"@context" : {
226+
"HeadquartersAddress" : {
227+
"@id" : "http://ont.thomsonreuters.com/mdaas/HeadquartersAddress",
228+
"@type" : "http://www.w3.org/2001/XMLSchema#string"
229+
...
230+
```
231+
232+
231233
### 5. Record Matching
232234

233235
The PermID Record Matching API allows you to match entity Person, Organization, Instrument,
@@ -677,6 +679,9 @@ This library records this quota information and users can retrieve it by calling
677679
```
678680
get_usage()
679681
```
682+
683+
__**Sample Usages**__
684+
680685
This method returns a data frame contains the quota information recorded by this library.
681686

682687
![Quota](Quota.png)

0 commit comments

Comments
 (0)