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

b
begin_p The index (int) of the first link for this node in the network play Links list (play)
begin_to The index (int) of the first link for this node in the network Links list
begin_we The index (int) of the first link for this node in the network weekend Links list
day_foi
denominator_d
denominator_n
denominator_p
denominator_pd
end_p The number (int) of links for this node in the Links play list
end_to The number (int) of links for this node in the Links list
end_we
id the name of the ward, e.g.
label The node’s label (int).
night_foi
play_suscept
save_play_suscept
self_p
self_w
self_we
vacid
weekend_foi
x x coordinate of the ward (location)
y y 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)