6.1.2.2. aequilibrae.project.FieldEditor

class aequilibrae.project.FieldEditor(table_name: str)

Bases: object

Allows user to edit the project data tables

The field editor is used for two different purposes:

  • Managing data tables (adding and removing fields)

  • Editing the tables’ metadata (description of each field)

This is a general class used to manage all project’s data tables accessible to the user and but it should be accessed directly from within the module corresponding to the data table one wants to edit. Example:

from aequilibrae import Project

proj = Project()
proj.open('Path/to/project/folder')

# To edit the fields of the link_types table
lt_fields = proj.network.link_types.fields()

# To edit the fields of the modes table
m_fields = proj.network.modes.fields()

Field descriptions are kept in the table attributes_documentation

__init__(table_name: str)None

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(table_name)

Initialize self.

add(field_name, description[, data_type])

Adds new field to the data table

all_fields()

Returns the list of fields available in the database

remove(field_name)

save()

Saves any field descriptions which my have been changed to the database

__init__(table_name: str)None

Initialize self. See help(type(self)) for accurate signature.