You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Potentially we can return the following format from get_triples:
Imagine calling get_triples(['geoId/06']) returns two triples: ('geoId/06', 'name', 'California') and ('geoId/06', 'containedInPlace', 'country/USA').
A potential format could be the following dictionary
{
"geoId/06": [
{
"subject_id": "geoId/06",
"property": "name",
"object_value": "California" # To denote a non-reference node
},
{
"subject_id": "geoId/06",
"property": "containedInPlace",
"object_id": "country/USA" # To denote a reference node
}
]
}
Another format could be
{
"geoId/06": [
("geoId/06", "name", "California", None), # Index 2 and 3 are reserved for the object node. 2 exists if it is a non-reference node.
("geoId/06", "containedInPlace", None, "country/USA") # 3 exists if it is a reference node
]
}
Currently,
datacommons.get_triples
returns a list of 3-tuples like so.Perhaps we can consider returning more information about the subject and object node such as:
The text was updated successfully, but these errors were encountered: