Documentation ¶
Overview ¶
Package ces translates Consumer Expenditure Survey (CES) demographic data to EIO categories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CES ¶
type CES struct {
// StartYear and EndYear are the beginning and ending
// years for data availability, respectively.
StartYear, EndYear int
// contains filtered or unexported fields
}
CES holds the fractions of personal expenditures that are incurred by non-hispanic white people by year and 389-sector EIO category.
func NewCES ¶
func NewCES(eio eieiorpc.EIEIOrpcServer, dataDir string) (*CES, error)
NewCES loads data into a new CES object.
func (*CES) DemographicConsumption ¶
func (c *CES) DemographicConsumption(ctx context.Context, in *eieiorpc.DemographicConsumptionInput) (*eieiorpc.Vector, error)
DemographicConsumption returns domestic personal consumption final demand plus private final demand for the specified demograph. Personal consumption and private residential expenditures are directly adjusted using the frac function. Other private expenditures are adjusted by the scalar:
adj = sum(frac(personal + private_residential)) / sum(personal + private_residential)
Acceptable demographs:
Black: People self-identifying as black or African-American. Hispanic: People self-identifying as Hispanic or Latino. WhiteOther: People self identifying as white or other races besides black, and not Hispanic. All: The total population.
type ErrMissingSector ¶
type ErrMissingSector struct {
// contains filtered or unexported fields
}
ErrMissingSector happens when a IO sector is requested which there is no data for.
func (ErrMissingSector) Error ¶
func (e ErrMissingSector) Error() string