Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/_static/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,11 @@ @article{schirmer2015
journal = {Journal of Transport and Land Use},
number = {1}
}

@phdthesis{altman1998Districting,
title = {Districting {{Principles}} and {{Democratic Representation}}},
author = {Altman, Micah},
year = {1998},
school = {California Institute of Technology},
doi = {10.7907/7ZE9-TH19}
}
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -91,6 +91,8 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

bibtex_bibfiles = ["_static/references.bib"]

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
18 changes: 10 additions & 8 deletions esda/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def isoperimetric_quotient(collection):
The Isoperimetric quotient, defined as the ratio of a polygon's area to the
area of the equi-perimeter circle.

Altman's PA_1 measure
Altman's PA_1 measure :cite:`altman1998Districting`

Construction:

Expand Down Expand Up @@ -163,6 +163,7 @@ def isoareal_quotient(collection):
perimeter of the equi-areal circle

Altman's PA_3 measure, and proportional to the PA_4 measure
:cite:`altman1998Districting`
"""
ga = _cast(collection)
return (
Expand All @@ -175,7 +176,8 @@ def minimum_bounding_circle_ratio(collection):
The Reock compactness measure, defined by the ratio of areas between the
minimum bounding/containing circle of a shape and the shape itself.

Measure A1 in Altman (1998), cited for Frolov (1974), but earlier from Reock
Measure A1 in :cite:`altman1998Districting`,
cited for Frolov (1974), but earlier from Reock
(1963)
"""
ga = _cast(collection)
Expand All @@ -185,7 +187,7 @@ def minimum_bounding_circle_ratio(collection):

def radii_ratio(collection):
"""
The Flaherty & Crumplin (1992) index, OS_3 in Altman (1998).
The Flaherty & Crumplin (1992) index, OS_3 in :cite:`altman1998Districting`.

The ratio of the radius of the equi-areal circle to the radius of the MBC
"""
Expand All @@ -198,7 +200,7 @@ def radii_ratio(collection):
def diameter_ratio(collection, rotated=True):
"""
The Flaherty & Crumplin (1992) length-width measure, stated as measure LW_7
in Altman (1998).
in :cite:`altman1998Districting`.

It is given as the ratio between the minimum and maximum shape diameter.
"""
Expand All @@ -225,7 +227,7 @@ def length_width_diff(collection):
Where L is the maximal east-west extent and W is the maximal north-south
extent.

Defined as measure LW_5 in Altman (1998)
Defined as measure LW_5 in :cite:`altman1998Districting`
"""
ga = _cast(collection)
box = shapely.bounds(ga)
Expand Down Expand Up @@ -423,8 +425,8 @@ def moment_of_inertia(collection):

where c is the centroid of the polygon

Altman's OS_1 measure, cited in Boyce and Clark (1964), also used in Weaver
and Hess (1963).
Altman's OS_1 measure :cite:`altman1998Districting`, cited in Boyce and Clark
(1964), also used in Weaver and Hess (1963).
"""
ga = _cast(collection)
coords = shapely.get_coordinates(ga)
Expand Down Expand Up @@ -518,7 +520,7 @@ def _second_moa_ring(points):

def reflexive_angle_ratio(collection):
"""
The Taylor reflexive angle index, measure OS_4 in Altman (1998)
The Taylor reflexive angle index, measure OS_4 in :cite:`altman1998Districting`

(N-R)/(N+R), the difference in number between non-reflexive angles and
reflexive angles in a polygon, divided by the number of angles in the
Expand Down