caf.ntem.structure#
Defines the structures of the database tables.
Module Attributes
Lookup between database tables and MS Access table names. |
|
Lookup between MS Access columns and database columns. |
|
List of lookup tables. |
Functions
|
Create a connection string to the database. |
|
Query database using an sqlalchemy query and returns a dataframe. |
|
Create a connection string to the database. |
Classes
|
Base class for metadata tables. |
|
Lookup Table for car availability types. |
|
Table for car ownership data. |
|
Lookup Table for car ownership types. |
|
Lookup Table between zoning systems. |
|
Metadata table for the database. |
|
Lookup Table for mode types. |
|
Table for Trip type lookup. |
|
Table for planning data. |
|
Lookup Table for planning data types. |
|
Lookup Table for purpose types. |
|
Lookup Table for time period types. |
|
Table for trip end data by car availability. |
|
Table for trip end data by direction. |
|
Lookup Table for trip types. |
|
Zone system table. |
|
Zoning definition table. |
Attributes Documentation
- caf.ntem.structure.DB_TO_ACCESS_TABLE_LOOKUP: dict[str, str] = {'authority': 'tblLookupAuthority82', 'car_availability_types': 'tblLookUpCarAvailability', 'car_ownership_types': 'tblLookUpCarOwnershipType', 'county': 'tblLookupCounty83', 'mode_types': 'tblLookUpTransport', 'ntem_zoning': 'tblLookupGeo83', 'planning': 'Planning', 'planning_data_types': 'tblLookUpPlanning83', 'purpose_types': 'tblLookUpTripPurpose', 'region': 'tblLookupRegion', 'time_period_types': 'tblLookUpTimePeriod', 'trip_type': 'NtemTripTypeLookup'}#
Lookup between database tables and MS Access table names.
- caf.ntem.structure.ACCESS_TO_DB_COLUMNS: dict[str, dict[str, str]] = {'authority': {'AuthorityID': 'ntem_zoning_id', 'AuthorityName': 'name', 'ControlAreaID': 'source_id_or_code'}, 'car_availability_types': {'CarAvDesc': 'name', 'CarAvID': 'id'}, 'car_ownership_types': {'CarOwnDesc': 'name', 'CarOwnID': 'id'}, 'county': {'CountyID': 'ntem_zoning_id', 'CountyName': 'name'}, 'mode_types': {'TransportDesc': 'name', 'TransportID': 'id'}, 'ntem_zoning': {'AuthorityID': 'authority_id', 'CountyID': 'county_id', 'NTEM7ZoneCode': 'source_id_or_code', 'RegionID': 'region_id', 'TemproZoneID': 'ntem_zoning_id', 'ZoneName': 'name'}, 'planning_data_types': {'PlanDesc': 'name', 'PlanID': 'id'}, 'purpose_types': {'PurposeDesc': 'name', 'PurposeID': 'id'}, 'region': {'LongRegionName': 'name', 'RegionID': 'ntem_zoning_id', 'RegionName': 'source_id_or_code'}, 'time_period_types': {'DivideBy': 'divide_by', 'TimePeriodDesc': 'name', 'TimePeriodID': 'id'}, 'trip_type': {'TEtypeDesc': 'name', 'TEtypeID': 'id'}}#
Lookup between MS Access columns and database columns.
- caf.ntem.structure.LOOKUP_TABLES: list[type[Base]] = [<class 'caf.ntem.structure.CarAvailabilityTypes'>, <class 'caf.ntem.structure.CarOwnershipTypes'>, <class 'caf.ntem.structure.ModeTypes'>, <class 'caf.ntem.structure.PurposeTypes'>, <class 'caf.ntem.structure.TimePeriodTypes'>, <class 'caf.ntem.structure.TripType'>, <class 'caf.ntem.structure.PlanningDataTypes'>]#
List of lookup tables.