Frictionless Data Compatibility

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 Data 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 support 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.

Python Library

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.

Installing the Python Library

Install the frictionless module.
1
pip install frictionless
Copied!
Ensure that frictionless 4.0 or later is installed. Prior versions are not stable releases.
Import the Package submodule from the frictionless module.
1
from frictionless import Package
Copied!

Working with Open Data Blend Catalogue Metadata

Loading the Open Data Blend Catalogue metadata.
1
catalogue = Package('https://packages.opendatablend.io/v1/open-data-blend-catalogue/datapackage.json')
Copied!
Loading the catalogue metadata for an Open Data Blend Dataset.
1
dataset = catalogue.resources[0]
Copied!
The resources property 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.
1
dataset_name = catalogue.resources[0].name
Copied!
Getting the friendly name of the dataset.
1
dataset_name = catalogue.resources[0].title
Copied!
Getting the description of the dataset.
1
dataset_description = catalogue.resources[0].description
Copied!
Getting the endpoint of the dataset.
1
dataset_path = catalogue.resources[0].path
Copied!

Working with Open Data Blend Dataset Metadata

Loading Open Data Blend Dataset metadata.
1
dataset = Package('https://packages.opendatablend.io/v1/open-data-blend-anonymised-mot/datapackage.json')
Copied!
Loading the metadata of a data file.
1
data_file = dataset.resources[0]
Copied!
The resources property 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.
1
data_file_name = dataset.resources[0].name
Copied!
Getting the friendly name of the data file.
1
data_file_title = dataset.resources[0].title
Copied!
Getting the description of the data file.
1
data_file_description = dataset.resources[0].description
Copied!
Getting the table schema of the data file.
1
data_file_schema = dataset.resources[0].schema
Copied!
Getting the download location of the data file.
1
data_file_path = dataset.resources[0].path
Copied!
Last modified 2mo ago