Frictionless Data Compatibility
The Open Data Blend Dataset API is compatible with version 1 of the following Frictionless Data specifications:
It also incorporates the following Frictionless Data patterns:
This means there is a growing ecosystem of data tools that you can use to work with Open Data Blend Datasets.
The Frictionless Libraries simplify integrations with the Open Data Blend Dataset API from many languages, including Python and R. More specifically, you can use the Data Package libraries to programmatically access our datasets and integrate them into your solutions.
An up-to-date list of the supported libraries can be found here, along with documentation on how to use them. Each library varies slightly in its implementation, but the general concepts for working with a Data Package are the same.
The following examples demonstrate how you could use the Python library to interact with the Open Data Blend Dataset API. This is the most mature Frictionless library to date, and one that we recommend. The libraries for the other languages implement a similar method to load data packages and these are explained in each library's documentation.
pip install frictionless
frictionless 4.0or later is installed. Prior versions are not stable releases.
Packagesubmodule from the
from frictionless import Package
Loading the Open Data Blend Catalogue metadata.
catalogue = Package('https://packages.opendatablend.io/v1/open-data-blend-catalogue/datapackage.json')
Loading the catalogue metadata for an Open Data Blend Dataset.
dataset = catalogue.resources
resourcesproperty is an array of resources. In this context, 'resources' means 'datasets'. In the above example, we are referencing a dataset by its zero-based index position.
Note: The metadata for a dataset in the catalogue is a subset of its full metadata.
Getting the name of the dataset.
dataset_name = dataset.name
Getting the friendly name of the dataset.
dataset_name = dataset.title
Getting the description of the dataset.
dataset_description = dataset.description
Getting the endpoint of the dataset.
dataset_path = dataset.path
Loading Open Data Blend Dataset metadata.
dataset = Package('https://packages.opendatablend.io/v1/open-data-blend-anonymised-mot/datapackage.json')
Loading the metadata of a data file.
data_file = dataset.resources
resourcesproperty is an array of resources. In this context, 'resources' means 'data files'. In the above example, we are referencing a data file by its zero-based index position.
Getting the name of the data file.
data_file_name = data_file.name
Getting the friendly name of the data file.
data_file_title = data_file.title
Getting the description of the data file.
data_file_description = data_file.description
Getting the table schema of the data file.
data_file_schema = data_file.schema
Getting the download location of the data file.
data_file_path = data_file.path