vector_translation_from_file#
- caf.toolkit.translation.vector_translation_from_file(vector_path, zone_correspondence_path, output_path, *, vector_zone_column, translation_from_column='from', translation_to_column='to', translation_factors_column='factors')[source]#
Translate zoning system of vector CSV file.
Load vector from CSV, perform translation and write to new CSV.
- Parameters:
vector_path (pathlib.Path) – Path to CSV file containing data to be translated.
zone_correspondence_path (ZoneCorrespondencePath) – Object defining the lookup CSV.
output_path (pathlib.Path) – CSV path to save the translated data to.
vector_zone_column (str | int) – Name, or position, of the zone ID column in vector_path file.
translation_from_col (str = "from") – Name of zone ID column in translation which corresponds to the current vector zone ID. Deprecated, only provide if zone correspondence is a dataframe.
translation_to_col (str = "to") – Name of column in translation for the new zone IDs. Deprecated, only provide if zone correspondence is a dataframe.
translation_factors_col (str = "factors) – Name of column in translation. Deprecated, only provide if zone correspondence is a dataframe.
translation_from_column (str)
translation_to_column (str)
translation_factors_column (str)
- Return type:
None