ZoningSystem.translate#
- ZoningSystem.translate(other, cache_path=PosixPath('I:/Data/Zone Translations/cache'), weighting=TranslationWeighting.SPATIAL)[source]#
Find, or generates, the zone_translation data from self to other.
- Parameters:
other (ZoningSystem) – The zoning system to translate this zoning system into
weighting (TranslationWeighting | str, default TranslationWeighting.SPATIAL) – The weighting to use when building the zone_translation. Must be one of TranslationWeighting.
cache_path (PathLike)
- Returns:
A numpy array defining the weights to use for the zone_translation. The rows correspond to self.unique_zones The columns correspond to other.unique_zones
- Return type:
pd.DataFrame
- Raises:
TranslationError – If a zone_translation definition between self and other cannot be found or generated, or there is an error in the zone_translation file.
- Warns:
TranslationWarning – If the zone_translation doesn’t contain all zones from either zone system.