metawards.Node¶
-
class
metawards.Node(label: int = None, begin_to: int = None, end_to: int = None, self_w: int = None, begin_p: int = None, end_p: int = None, self_p: int = None, begin_we: int = None, end_we: int = None, self_we: int = None, day_foi: float = 0.0, night_foi: float = 0.0, weekend_foi: float = 0.0, play_suscept: float = 0.0, save_play_suscept: float = 0.0, denominator_n: float = 0.0, denominator_d: float = 0.0, denominator_p: float = 0.0, denominator_pd: float = 0.0, x: float = 0.0, y: float = 0.0, b: float = 0.0, id: str = None, vacid: int = None)[source]¶ This class represents an electoral ward (node) in the network
-
__init__(label: int = None, begin_to: int = None, end_to: int = None, self_w: int = None, begin_p: int = None, end_p: int = None, self_p: int = None, begin_we: int = None, end_we: int = None, self_we: int = None, day_foi: float = 0.0, night_foi: float = 0.0, weekend_foi: float = 0.0, play_suscept: float = 0.0, save_play_suscept: float = 0.0, denominator_n: float = 0.0, denominator_d: float = 0.0, denominator_p: float = 0.0, denominator_pd: float = 0.0, x: float = 0.0, y: float = 0.0, b: float = 0.0, id: str = None, vacid: int = None) → None¶
Methods
__init__(label, begin_to, end_to, self_w, …)Attributes
bbegin_pThe index (int) of the first link for this node in the network play Links list (play) begin_toThe index (int) of the first link for this node in the network Links list begin_weThe index (int) of the first link for this node in the network weekend Links list day_foidenominator_ddenominator_ndenominator_pdenominator_pdend_pThe number (int) of links for this node in the Links play list end_toThe number (int) of links for this node in the Links list end_weidthe name of the ward, e.g. labelThe node’s label (int). night_foiplay_susceptsave_play_susceptself_pself_wself_wevacidweekend_foixx coordinate of the ward (location) yy coordinate of the ward (location) -
begin_p= None¶ The index (int) of the first link for this node in the network play Links list (play)
-
begin_to= None¶ The index (int) of the first link for this node in the network Links list
-
begin_we= None¶ The index (int) of the first link for this node in the network weekend Links list
-
end_p= None¶ The number (int) of links for this node in the Links play list
-
end_to= None¶ The number (int) of links for this node in the Links list
-
id= None¶ the name of the ward, e.g. ‘Bristol’
-
label= None¶ The node’s label (int). This is the index of the node, which must run from 1 up to len(nodes). A value of -1 implies a null node
-
x= 0.0¶ x coordinate of the ward (location)
-
y= 0.0¶ y coordinate of the ward (location)
-