Skip to content

opendatateam/udata-transport

Repository files navigation

udata-transport

This plugin acts as a bridge between udata and transport.data.gouv.fr system.

Compatibility

udata-transport requires Python 3.7+ and udata.

Installation

Install udata.

Remain in the same virtual environment (for Python).

Install udata-transport:

pip install udata-transport

Modify your local configuration file of udata (typically, udata.cfg) as following:

PLUGINS = ['transport']
TRANSPORT_DATASETS_URL = 'https://path/to/transport.data.gouv.fr/datasets/api'
  • TRANSPORT_DATASETS_URL: The URL of the API endpoint listing datasets on transport.data.gouv.fr. Default: https://transport.data.gouv.fr/api/datasets

Usage

Mapping dataset

The mapping is done by a job, runnable by hand or scheduled. The job is idempotent, previous URLs are cleaned before mapping new ones.

udata job run map-transport-datasets

This plugin will store the mapping URL in the dataset extras transport:url key:

{
"id": "dataset-id",
"extras": {
    "transport:url": "https://path/to/datasets"
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published