Usage#

Installation#

Python and pip are required. Install the latest numbered release from PyPI using e.g.:

$ pip install transport-data[docs,tests]

This will also install dependencies for development and testing. Or, install from source:

  • Clone the repository:

    $ git clone git@github.com:transport-data/tools.git
    
  • In the cloned directory, run:

    $ pip install .[docs,tests]
    

You will likely also want to:

  • Install the GitHub CLI.

  • Clone the transport-data/registry repository. The tdc command-line interface provides commands to help with this:

    $ tdc config set tdc_registry_local /path/for/local/clone
    $ tdc registry clone
    

Command-line#

Use the tools via the command-line interface; the program tdc is configured when the package is installed (transport_data.cli). Each subcommand has its own --help and page in this documentation:

$ tdc
Usage: tdc [OPTIONS] COMMAND [ARGS]...

  Transport Data Commons tools.

Options:
  --help  Show this message and exit.

Commands:
  adb       CLI for :mod:`.adb`.
  config    Manipulate configuration.
  estat     Eurostat (ESTAT) provider.
  iamc      Demonstrate IAMC structure generation.
  jrc       CLI for :mod:`.jrc`.
  org       Information about the TDCI per se.
  proto     TDC prototype debugging.
  registry  Manipulate the registry repo.

From other Python code#

from transport_data import estat

f = estat.list_flows()