Interacting with, and converting between formats of, transport modelling matrices.
Project description
CAF.mat
[!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
SegmentationandZoningSystemfunctionality 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
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]
- See the Quick Start Guide for more detailed instructions.
- See the requirements.txt for the full list of package dependencies.
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 installcan 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f2c16f20b6b5463394cd5b0345f3fc8e48a9249167731cccac184f8f8507c5
|
|
| MD5 |
4c153ee6f23c71abe647d9b98a8ecd1d
|
|
| BLAKE2b-256 |
0efbde0ce3c356ff551a2c58594eaa91eefd93e8600b1440efc80782ce57cb3f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caf_mat-0.1.0.tar.gz -
Subject digest:
e8f2c16f20b6b5463394cd5b0345f3fc8e48a9249167731cccac184f8f8507c5 - Sigstore transparency entry: 1967365956
- Sigstore integration time:
-
Permalink:
Transport-for-the-North/caf.mat@e087b07d04532ba5d8b0b2e64263bfab37f7a93e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Transport-for-the-North
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e087b07d04532ba5d8b0b2e64263bfab37f7a93e -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c7f55474871530522c4fc4c1d38174b0103e51d7eda197faf0025c441097c14
|
|
| MD5 |
7856f5f075d2409221e71995eec4324e
|
|
| BLAKE2b-256 |
854c9af07a98d931258b46bde5c84bdc159ee3a6aef3c6f898476fbbc59728b8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caf_mat-0.1.0-py3-none-any.whl -
Subject digest:
8c7f55474871530522c4fc4c1d38174b0103e51d7eda197faf0025c441097c14 - Sigstore transparency entry: 1967366049
- Sigstore integration time:
-
Permalink:
Transport-for-the-North/caf.mat@e087b07d04532ba5d8b0b2e64263bfab37f7a93e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Transport-for-the-North
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e087b07d04532ba5d8b0b2e64263bfab37f7a93e -
Trigger Event:
release
-
Statement type: