v1.9.6 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2022 License: GPL-3.0 Imports: 12 Imported by: 0



This README describes the process used to compile estimates of the share of aggregate spending in 389 Input-Output categories associated with the non-hispanic white population versus the non-white population in the US. This process is stored in the program titled IOshares.go.

Data Sources



Package ces translates Consumer Expenditure Survey (CES) demographic data to EIO categories.



This section is empty.


This section is empty.


This section is empty.


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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL