ZoneTranslation#

class caf.space.zone_translation.ZoneTranslation(params)#

Bases: object

Store paramaters and create zone translations.

This is the main class for the caf.space tool. Running it with an instance of ‘inputs.ZoningTranslationInputs’ will return a zone translation dataframe.

Parameters:

params (ZoningTranslationInputs) – Params should usually be read in from a yml file using the load_yaml method of the ZoningTranslationInputs class. Refer to this class for info on parameters.

Returns:

Instance of ZoneTranslation, where a spatial or weighted zone translation, dependent on inputs, is stored as self.zone_translation

Return type:

Instance of self

Methods Summary

spatial_translation()

Create spatial zone translation.

weighted_translation()

Create a weighted zone translation.

Methods Documentation

spatial_translation()#

Create spatial zone translation.

Performs zone correspondence between two zoning systems, zone 1 and zone 2. Default correspondence is spatial (by zone area), but includes options for handling point zones with different data (for example LSOA employment data). Also includes option to check adjustment factors from zone 1 to zone 2 add to 1. Any options for this are set in the config file/class or the UI, depending on how you run the tool.

Returns:

spatial_translation – Dataframe containing spatial zone translation between zone 1 and zone 2.

Return type:

pd.DataFrame

weighted_translation()#

Create a weighted zone translation.

Runs a weighted translation using the zone 1 to lower correspondence csv file and the zone 2 to lower correspondence csv file. The type of variable to weight the translation by, such as population or employment, is chosen by the method variable.

Parameters:

self (for this to run self.params must contain lower zoning and a method.) –

Returns:

weighted_translation – Dataframe containing weighted zone translation between zone 1 and zone 2.

Return type:

pd.DataFrame