2424
2525class DisaggregateAccessibilitySuffixes (PydanticReadable ):
2626 SUFFIX : str = "proto_"
27- """
28- Suffix to append to the proto-population tables.
29- """
30-
3127 ROOTS : list [str ] = [
3228 "persons" ,
3329 "households" ,
@@ -37,9 +33,6 @@ class DisaggregateAccessibilitySuffixes(PydanticReadable):
3733 "household_id" ,
3834 "tour_id" ,
3935 ]
40- """
41- The roots of the proto-population tables.
42- """
4336
4437
4538class DisaggregateAccessibilityTableSettings (PydanticReadable , extra = "forbid" ):
@@ -498,7 +491,7 @@ def read_table_settings(self):
498491
499492 return params
500493
501- def generate_replicates (self , table_name : str ):
494+ def generate_replicates (self , table_name ):
502495 """
503496 Generates replicates finding the cartesian product of the non-mapped field variables.
504497 The mapped fields are then annotated after replication
@@ -595,10 +588,7 @@ def expand_template_zones(self, tables):
595588
596589 return [x for x in proto_tables .values ()]
597590
598- def create_proto_pop (self ) -> None :
599- """
600- Creates the proto-population tables.
601- """
591+ def create_proto_pop (self ):
602592 # Separate out the mapped data from the varying data and create base replicate tables
603593 klist = ["proto_households" , "proto_persons" , "proto_tours" ]
604594
@@ -668,14 +658,7 @@ def create_proto_pop(self) -> None:
668658 if len (colnames ) > 0 :
669659 df .rename (columns = colnames , inplace = True )
670660
671- def inject_tables (self , state : workflow .State ) -> None :
672- """
673- Injects the proto-population tables into the pipeline.
674-
675- Parameters
676- ----------
677- state : workflow.State
678- """
661+ def inject_tables (self , state : workflow .State ):
679662 # Update canonical tables lists
680663 state .tracing .traceable_tables = state .tracing .traceable_tables + list (
681664 self .proto_pop .keys ()
@@ -685,14 +668,7 @@ def inject_tables(self, state: workflow.State) -> None:
685668 self .state .get_rn_generator ().add_channel (tablename , df )
686669 state .tracing .register_traceable_table (tablename , df )
687670
688- def annotate_tables (self , state : workflow .State ) -> None :
689- """
690- Annotates the proto-population tables with additional fields.
691-
692- Parameters
693- ----------
694- state : workflow.State
695- """
671+ def annotate_tables (self , state : workflow .State ):
696672 # Extract annotations
697673 for annot in self .model_settings .annotate_proto_tables :
698674 tablename = annot .tablename
@@ -710,10 +686,7 @@ def annotate_tables(self, state: workflow.State) -> None:
710686 )
711687 self .state .add_table (tablename , df )
712688
713- def merge_persons (self ) -> None :
714- """
715- Merges the proto-population households into the persons.
716- """
689+ def merge_persons (self ):
717690 persons = self .state .get_dataframe ("proto_persons" )
718691 households = self .state .get_dataframe ("proto_households" )
719692
@@ -740,21 +713,6 @@ def merge_persons(self) -> None:
740713def get_disaggregate_logsums (
741714 state : workflow .State , network_los : los .Network_LOS , chunk_size : int , trace_hh_id
742715):
743- """
744- Get disaggregate logsums for workplace, school, and non-mandatory tour destinations.
745-
746- Parameters
747- ----------
748- state : workflow.State
749- network_los : los.Network_LOS
750- chunk_size : int
751- trace_hh_id : int, optional
752-
753- Returns
754- -------
755- logsums : dict
756- Dictionary of logsums for each of the three destination types.
757- """
758716 logsums = {}
759717 persons_merged = state .get_dataframe ("proto_persons_merged" ).sort_index (
760718 inplace = False
0 commit comments