DataCommonsToolkit
- Executing SPARQL queries
- Retrieving triples associated with nodes
- Fetching statistical time series data
- Analyzing property labels and values
- Retrieving places within a given place type
- Obtaining statistical values for specific variables and locations
init
- timeout (Optional[float], optional): Maximum time in seconds to wait for API calls to complete. If None, will wait indefinitely. (default: :obj:
None)
get_triples_outgoing
- dcids (Union[str, List[str]]): A single DCID or a list of DCIDs to query.
None) otherwise.
get_triples_incoming
- dcids (Union[str, List[str]]): A single DCID or a list of DCIDs to query.
None) otherwise.
get_stat
- date (str): The date option for the observations. Use ‘all’ for all dates, ‘latest’ for the most recent data, or provide a date as a string (e.g., “2026”).
- entity_dcids (Union[str, List[str]]): Entity IDs to filter the data.
- variable_dcids (Union[str, List[str]]): The variable(s) to fetch observations for. This can be a single variable ID or a list of IDs.
None) otherwise.
get_property_labels
- dcids (Union[str, List[str]]): A single DCID or a list of DCIDs to query.
- out (bool): Whether to fetch outgoing properties (default: :obj:
True)
None) otherwise.
get_property_values
- dcids (Union[str, List[str]]): A single DCID or a list of DCIDs to query.
- properties (Union[str, List[str]]): The property or properties to analyze.
- constraints (Optional[str]): Additional constraints for the query. (default: :obj:
None) - out (bool, optional): Whether to fetch outgoing properties. (default: :obj:
True)
None) otherwise.
get_places_in
- place_dcids (Union[str, List[str]]): A single DCID or a list of DCIDs to query.
- children_type (Optional[str]): The type of the child entities to fetch. If None, fetches all child types. (default: :obj:
None)
None) otherwise.