state_tracker#

class state_tracker(state_name=None, min_age=15, max_age=99)[source]#

Bases: Analyzer

Records the number of living women on a specific boolean state (eg, numbe of living women who live in rural settings)

Attributes

now

Shortcut to self.t.now()

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

ti

Get the current module timestep

timevec

Shortcut to self.t.timevec

Methods

init_post()[source]#

Initializes bins and data with proper shapes

step()[source]#

Records histogram of ages of all alive individuals at a timestep such that self.data[timestep] = list of proportions where index signifies age

plot(style=None)[source]#

Plots self.data as a line