Next / Previous / Contents / TCC Help System / NM Tech homepage

28.8. CbcHist._buildCensusRows(): Build the census rows
# - - -   C b c H i s t . _ b u i l d C e n s u s R o w s

    def _buildCensusRows(self):
        '''Set up the census rows for the various kinds of birds.

          [ (self.db is as invariant) and
            (self.effKeyList is as invariant) and
            (self.txny is as invariant) and
            (self.cenFilter is as invariant) ->
              self._rowMap  :=  as invariant using census data from
                  db filtered by self.cenFilter ]
        #-- 1
        self._rowMap = {}

The process of building the census rows is driven by self.effKeyList: each of its elements is an EffortKey that specifies an Effort record in the database and an associated collected of Census records.

For each of these efforts, we retrieve the census records, filter them using the caller's cenFilter argument, and add each one to the table: see Section 28.9, “CbcHist._addOneEffort().
        #-- 2
        # [ self._rowMap  +:=  census records from efforts from db
        #       selected by self.effKeyList and filtered by
        #       self.cenFilter ]
        for effKey in self.effKeyList:
            #-- 2 body
            # [ self._rowMap  +:=  census records from db for effort
            #       selected by effKey and filtered by self.cenFilter ]