Transport-for-the-North / caf.core

Core classes and definitions for CAF family of tools
GNU General Public License v3.0
0 stars 1 forks source link

Refactor ZoningSystem initialisation method #15

Closed wsp-mbuckley closed 7 months ago

wsp-mbuckley commented 9 months ago

Remove zone descriptions, internal zones and external zones parameters from ZoningSystem init and instead include this data as columns in the dataframe. The dataframe should contain the following columns:

Then can contain any number of additional boolean columns for flagging different areas or types of zones, descriptions of these columns can be included in the zoning system metadata.

zone_id zone_name internal_tfn external_tfn north_england south_england
1 Manchester 1 0 1 0
2 London 0 1 0 1

Add validation of the dataframe which does the following:

Add 2 property methods to return the zone names and descriptions lookups (probably a Series for each with the zone ID as the index).

Add method for getting any subset of zones based on the boolean flag columns #5

wsp-mbuckley commented 9 months ago

Including all the zone information in the dataframe would make the save and load methods simpler.

wsp-mbuckley commented 7 months ago

Resolved in #18