Income API
- class minos.modules.income.Income[source]
- calculate_income(pop)[source]
Calculate income transition distribution based on provided people/indices
- Parameters:
pop (PopulationView) – Population from MINOS to calculate next income for.
- Returns:
nextWaveIncome – Vector of new household incomes from OLS prediction.
- Return type:
pd.Series
- on_time_step(event)[source]
Predicts the hh_income for the next timestep.
- Parameters:
event (vivarium.population.PopulationEvent) – The event time_step that called this function.
- plot(pop, config)[source]
Default plot method for modules. Does nothing.
Modules can specify another plot object that saves distributions of state.
- Parameters:
pop_data (population data from vivarium. Whatever columns needs plotting.) –
config (vivarium.configTree) – Config yaml for any needed plot parameters.
- Return type:
None
- setup(builder)[source]
Initialise the module during simulation.setup().
Notes
Load in data from pre_setup
Register any value producers/modifiers for income
Add required columns to population data frame
Update other required items such as randomness stream.
- Parameters:
builder (vivarium.engine.Builder) – Vivarium’s control object. Stores all simulation metadata and allows modules to use it.