caf.toolkit.translation#

Tools to convert numpy/pandas vectors/matrices between different index systems.

In transport, these tools are very useful for translating data between different zoning systems.

Functions

TypedDict(typename[, fields, total])

A simple typed namespace.

matrix_translation_from_file(matrix_path, ...)

Translate zoning system of matrix CSV file.

numpy_matrix_zone_translation(matrix, ...[, ...])

Efficiently translates a matrix between index systems.

numpy_vector_zone_translation(vector, ...[, ...])

Efficiently translates a vector between index systems.

overload(func)

Decorator for overloaded functions/methods.

pandas_long_matrix_zone_translation(matrix, ...)

Efficiently translates a pandas matrix between index systems.

pandas_matrix_zone_translation(matrix, ...)

Efficiently translates a pandas matrix between index systems.

pandas_vector_zone_translation()

Efficiently translate a pandas vector between index systems.

vector_translation_from_file(vector_path, ...)

Translate zoning system of vector CSV file.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

Hashable()

TypeVar(name, *constraints[, bound, ...])

Type variable.

ZoneCorrespondencePath(path, from_col_name, ...)

Defines the path and columns to use for a translation.