Open Data Blend Docs
  • Introduction
  • Open Data Blend Datasets
    • Datasets
    • Dataset Versions
    • Dataset UI
    • Dataset API
    • Frictionless Data Compatibility
    • Modelling Conventions
    • Loading Data Files in Excel
    • Loading Data Files in Power BI Desktop
    • Loading Data Files in Tableau Desktop
    • Loading Data Files in Python
    • Loading Data Files in R
    • Loading Data Files in Other Tools
  • Open Data Blend Analytics
    • Analytics
    • Analytics Queries
    • Analytics Users
    • Connecting from Excel
    • Connecting from Power BI Desktop
    • Connecting from Tableau Desktop
    • Connecting from Other Tools
  • Open Data Blend Insights
    • Insights
    • Report Drill Throughs
    • Report Drill Downs
  • Subscription Management
    • Subscription Portal
    • Managing Analytics Users
    • Managing Access Keys
    • Updating Payment Details
Powered by GitBook
On this page
  • Compatibility
  • Python Library
  • Installing the Python Library
  • Working with Open Data Blend Catalogue Metadata
  • Working with Open Data Blend Dataset Metadata

Was this helpful?

  1. Open Data Blend Datasets

Frictionless Data Compatibility

PreviousDataset APINextModelling Conventions

Last updated 1 year ago

Was this helpful?

Compatibility

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.

Python Library

Installing the Python Library

Install the frictionless module.

pip install frictionless

Ensure that frictionless 4.0 or later is installed. Prior versions are not stable releases.

Import the Package submodule from the frictionless module.

from frictionless import Package

Working with Open Data Blend Catalogue Metadata

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[0]

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.

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

Working with Open Data Blend Dataset Metadata

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[0]

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.

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

The Open Data Blend Dataset API is compatible with version 1 of the following specifications:

The 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 , 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 to interact with the Open Data Blend Dataset API. This is the 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 .

Frictionless Data
Data Package
Data Resource
Table Schema
Data Package Catalogues
Compression of Resources
Frictionless Libraries
here
Python library
most mature
documentation