Precinct Documentation¶
Precinct¶
Precinct
defines a precinct and it’s immutable data.
-
class
distopia.precinct.
Precinct
(boundary=None, identity=0, name='', location=0, 0, **kwargs)[source]¶ Describes a precinct and its data.
-
boundary
= []¶ A nx2 list of the
x
,y
coordinates of the polygon that describes the precinct’s boundary.
-
identity
= 0¶ The id of the precinct.
-
location
= (0, 0)¶ The (practically unique) center location of the precinct.
-
metrics
= {}¶ A mapping from
name
to thePrecinctMetric
instance that contains the metric data for this precinct.
-
name
= ''¶ Name describing the precinct.
-
Precinct Metrics¶
Defines metrics that are specific to Precincts.
-
class
distopia.precinct.metrics.
PrecinctMetric
(name, scalar_value=0, scalar_maximum=0, scalar_label='', **kwargs)[source]¶ Metrics used with
distopia.precinct.Precinct
.-
name
= ''¶ A globally unique metric name that describes the metric.
-