call_report.fca.DomainDatasetCode#

class call_report.fca.DomainDatasetCode(*, code: int, label: str, is_total: bool)[source]#

Bases: object

One row key value in a curated domain dataset.

The codes are the source’s own, not a numbering this package invents, so a value here can be matched against the raw file. label is the curation, giving each code a name a reader does not have to look up.

Attributes:
codeint

The code identifying this row, in the source schedule’s own vocabulary.

labelstr

A human-readable name for what code identifies.

is_totalbool

Whether this code is a subtotal the source reports rather than a distinct member of the breakdown. A caller summing over codes has to exclude these.

Examples

>>> from call_report.fca._domain_datasets import DomainDatasetCode
>>> agribusiness = DomainDatasetCode(code=110, label="Agribusiness", is_total=False)
>>> agribusiness.label
'Agribusiness'