Skip to main content

Interacting with, and converting between formats of, transport modelling matrices.

Project description

CAF.mat

CAF Status - Pre-Alpha

Supported Python versions Latest release Conda

Testing Badge Coverage Documentation Status

[!WARNING] This package is in an early stage of development so features may change or be removed. If using this package it is recommended to set a specific version and check before upgrading to a new version.

CAF.mat contains functionality for reading, writing and performing calculations with transport modelling matrices. The aim is to provide a consistent method for interacting with all types of transport matrices from Python, with some additional front-end features for more common matrix operations.

[!TIP] For more detailed information including a user guide, tutorials and API reference see the full caf.mat documentation

Table of Contents

Overview

What does it do?

CAF.mat is primarily a Python package for interacting with transport modelling matrices in various file formats. The package provides a set of classes for interacting with matrices and ties into some other CAF packages, namely caf.base.

The package also provides a standalone CLI tool for some more common matrix operations.

Main Features

  • Matrices Classes - custom Python classes to handle groups of matrices, builds on top of caf.base's Segmentation and ZoningSystem functionality and provides access to individual matrices as pandas DataFrames.
  • Various File Formats - read, write and convert between various matrix file formats from different transport modelling software.
    • OpenMatrix (OMX)
    • SATURN's UFM
    • CUBE's (MAT)
  • Any Matrix Data - can handle any type of matrix data e.g. travel demand and transport costs.
  • Tour Modelling Conversions - functions to convert between OD and PA based matrices, as used in tour based transport demand modelling.

Work-in-Progress

  • UFM Comparisons - functionality to compare different UFM files (see #17).
  • Matrix Adjustments - adjust a matrix to a target matrix at a specified sector level (see #18).

[!WARNING] These features are work-in-progress and are not available in a released version of caf.mat, to access these features a specific branch of caf.mat should be installed, see Installation from GitHub.

Who is it for?

  • Target audience: Transport Modellers
  • CAF Analytical Stage: Modelling, Appraisal

CAF Analytical Process Diagram

For more details on CAF Analytical Stages see the description within TfN's GitHub homepage

Where to get it

The latest released version are available at the Python Package Index (PyPI) and on Conda.

conda install -c conda-forge caf.mat
pip install caf.mat

[!TIP]

Installation from GitHub

[!WARNING] Unreleased GitHub versions should not be considered stable.

The latest, unreleased, version can be installed directly from GitHub using:

pip install "git+https://github.com/transport-for-the-north/caf.mat"

[!TIP] pip install can install a specific tag, or branch, using @{tag-name} after the git URL.

Usage

caf.mat provides and Command-line (CLI) and graphical interface (GUI) to use many of it's features without the need to write any Python code, see the Tool Usage section of the user guide for more details.

Command Line

The tool can be run from command line, with the command:

caf.mat

See Command-Line Interface (User Guide) for full explanations of the parameters.

Documentation

The code documentation is hosted at https://cafmat.readthedocs.io/en/stable/.

What is CAF?

This tool is part of TfN's Common Analytical Framework (CAF). CAF is Transport for the North's structured suite of analytical tools designed to support transport modelling, appraisal, and strategic decision-making.

More information on CAF and details on other CAF tools can be found on TfN's GitHub Homepage.

Contribution

We encourage use of, and contributions to, the repositories within this organisation, licenses are provided within the repositories and the organisation contribution guide provides details for contributions.


Contact Us

For further information about using this tool or CAF tools in your projects and work contact Transport for the North - TfNOffer@transportforthenorth.com


Go to Top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caf_mat-0.1.0.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caf_mat-0.1.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file caf_mat-0.1.0.tar.gz.

File metadata

  • Download URL: caf_mat-0.1.0.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caf_mat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8f2c16f20b6b5463394cd5b0345f3fc8e48a9249167731cccac184f8f8507c5
MD5 4c153ee6f23c71abe647d9b98a8ecd1d
BLAKE2b-256 0efbde0ce3c356ff551a2c58594eaa91eefd93e8600b1440efc80782ce57cb3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for caf_mat-0.1.0.tar.gz:

Publisher: release.yml on Transport-for-the-North/caf.mat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caf_mat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: caf_mat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caf_mat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c7f55474871530522c4fc4c1d38174b0103e51d7eda197faf0025c441097c14
MD5 7856f5f075d2409221e71995eec4324e
BLAKE2b-256 854c9af07a98d931258b46bde5c84bdc159ee3a6aef3c6f898476fbbc59728b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for caf_mat-0.1.0-py3-none-any.whl:

Publisher: release.yml on Transport-for-the-North/caf.mat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page