From a8a5374795e075c91f0b46bbd0fb180266a07811 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 19 Feb 2020 08:10:48 -0500 Subject: [PATCH 1/5] bummping environment.yml python to 3.8 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 692bee85..5c1cdb45 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: notebooks-environment channels: - conda-forge dependencies: - - python=3.7 + - python=3.8 - geopandas - descartes - rtree From 0a3fb6a29d92e6636958a77f1a5907ac46d0116e Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 19 Feb 2020 08:16:32 -0500 Subject: [PATCH 2/5] bummping README supported python to 3.8 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e04ad470..39cc92ed 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The following are a selection of some examples that can be launched individually Installation ------------ -As of version 1.3, `spaghetti` officially supports Python [3.6](https://docs.python.org/3.6/) and [3.7](https://docs.python.org/3.7/) only. Please make sure that you are operating in a Python >= 3.6 environment. +As of version 1.4.2, `spaghetti` officially supports Python [3.6](https://docs.python.org/3.6/), [3.7](https://docs.python.org/3.7/), and [3.8](https://docs.python.org/3.8/). Please make sure that you are operating in a Python >= 3.6 environment. **Installing with `conda` via [`conda-forge`](https://github.com/conda-forge/spaghetti-feedstock) (highly recommended)** From 2b977352e4d7b6d857e3c67e97f3f5cb0c5bf8d0 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 19 Feb 2020 08:17:20 -0500 Subject: [PATCH 3/5] bumping docsrc supported python to 3.8 --- docsrc/index.rst | 9 ++++++++- docsrc/installation.rst | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docsrc/index.rst b/docsrc/index.rst index f9d28b67..383a764d 100644 --- a/docsrc/index.rst +++ b/docsrc/index.rst @@ -51,6 +51,12 @@ and usage tutorials are provided here through the links above. +Development +----------- + +Development of `spaghetti` is hosted on GitHub_. + + Citing `spaghetti` ------------------ @@ -82,4 +88,5 @@ If you use PySAL-spaghetti in a scientific publication, we would appreciate usin References -.. _PySAL: https://github.com/pysal/pysal \ No newline at end of file +.. _PySAL: https://github.com/pysal/pysal +.. _GitHub: https://github.com/pysal/spaghetti diff --git a/docsrc/installation.rst b/docsrc/installation.rst index 4bb26be8..3e5969a0 100644 --- a/docsrc/installation.rst +++ b/docsrc/installation.rst @@ -1,6 +1,6 @@ .. Installation -As of version 1.3, `spaghetti` supports Python 3.6_ and 3.7_ only. Please make sure that you are operating in a Python 3 environment. +As of version 1.4.2, `spaghetti` supports Python 3.6_, 3.7_, and 3.8_. Please make sure that you are operating in a Python >= 3.6 environment. Installation ============ @@ -50,6 +50,7 @@ You can also fork_ the `pysal/spaghetti`_ repo and create a local clone of your .. _3.6: https://docs.python.org/3.6/ .. _3.7: https://docs.python.org/3.7/ +.. _3.8: https://docs.python.org/3.8/ .. _spaghetti-feedstock: https://github.com/conda-forge/spaghetti-feedstock .. _conda: https://docs.conda.io/en/latest/ .. _conda-forge: https://conda-forge.org From ba62ae209a983af61096e45658244fc2b2b21dbd Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 19 Feb 2020 08:19:24 -0500 Subject: [PATCH 4/5] updating esda docs site in conf.py --- docsrc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docsrc/conf.py b/docsrc/conf.py index d548b18e..16f76089 100644 --- a/docsrc/conf.py +++ b/docsrc/conf.py @@ -258,13 +258,13 @@ def setup(app): # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "esda": ("https://esda.readthedocs.io/en/latest/", None), + "esda": ("https://pysal.org/esda/", None), "geopandas": ("https://geopandas.readthedocs.io/en/latest/", None), "libpysal": ("https://pysal.org/libpysal/", None), "matplotlib": ("https://matplotlib.org/", None), "numpy": ("https://docs.scipy.org/doc/numpy", None), "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), - "python": ("https://docs.python.org/3.7/", None), + "python": ("https://docs.python.org/3.8/", None), "pulp": ("https://pythonhosted.org/PuLP/", None), } From b96db4d3bfadec97d70db06a5b190c54508f8d24 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 19 Feb 2020 08:21:02 -0500 Subject: [PATCH 5/5] rebuilding docs --- docs/_sources/index.rst.txt | 9 +- docs/_sources/installation.rst.txt | 3 +- docs/generated/spaghetti.Network.html | 180 +++++++++--------- .../spaghetti.Network.loadnetwork.html | 2 +- .../spaghetti.Network.savenetwork.html | 2 +- docs/generated/spaghetti.PointPattern.html | 20 +- docs/generated/spaghetti.element_as_gdf.html | 22 +-- docs/generated/spaghetti.regular_lattice.html | 10 +- docs/index.html | 5 + docs/installation.html | 2 +- docs/objects.inv | Bin 7746 -> 7758 bytes docs/searchindex.js | 2 +- 12 files changed, 135 insertions(+), 122 deletions(-) diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index f9d28b67..383a764d 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -51,6 +51,12 @@ and usage tutorials are provided here through the links above. +Development +----------- + +Development of `spaghetti` is hosted on GitHub_. + + Citing `spaghetti` ------------------ @@ -82,4 +88,5 @@ If you use PySAL-spaghetti in a scientific publication, we would appreciate usin References -.. _PySAL: https://github.com/pysal/pysal \ No newline at end of file +.. _PySAL: https://github.com/pysal/pysal +.. _GitHub: https://github.com/pysal/spaghetti diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt index 4bb26be8..3e5969a0 100644 --- a/docs/_sources/installation.rst.txt +++ b/docs/_sources/installation.rst.txt @@ -1,6 +1,6 @@ .. Installation -As of version 1.3, `spaghetti` supports Python 3.6_ and 3.7_ only. Please make sure that you are operating in a Python 3 environment. +As of version 1.4.2, `spaghetti` supports Python 3.6_, 3.7_, and 3.8_. Please make sure that you are operating in a Python >= 3.6 environment. Installation ============ @@ -50,6 +50,7 @@ You can also fork_ the `pysal/spaghetti`_ repo and create a local clone of your .. _3.6: https://docs.python.org/3.6/ .. _3.7: https://docs.python.org/3.7/ +.. _3.8: https://docs.python.org/3.8/ .. _spaghetti-feedstock: https://github.com/conda-forge/spaghetti-feedstock .. _conda: https://docs.conda.io/en/latest/ .. _conda-forge: https://conda-forge.org diff --git a/docs/generated/spaghetti.Network.html b/docs/generated/spaghetti.Network.html index c90bd4eb..21187db6 100644 --- a/docs/generated/spaghetti.Network.html +++ b/docs/generated/spaghetti.Network.html @@ -143,26 +143,26 @@

spaghetti.Network
Parameters
-
in_data{str, list, tuple, numpy.ndarray, libpysal.cg.Chain, geopandas.GeoDataFrame}

The input geographic data. Either (1) a path to a shapefile +

in_data{str, list, tuple, numpy.ndarray, libpysal.cg.Chain, geopandas.GeoDataFrame}

The input geographic data. Either (1) a path to a shapefile (str); (2) an iterable containing libpysal.cg.Chain objects; (3) a single libpysal.cg.Chain; or (4) a geopandas.GeoDataFrame.

-
vertex_sigint

Round the x and y coordinates of all vertices to vertex_sig +

vertex_sigint

Round the x and y coordinates of all vertices to vertex_sig significant digits (combined significant digits on the left and right of the decimal place). Default is 11. Set to None for no rounding.

-
unique_arcsbool

If True (default), keep only unique arcs (i.e., prune +

unique_arcsbool

If True (default), keep only unique arcs (i.e., prune out any duplicated arcs). If False keep all segments.

-
extractgraphbool

If True, extract a graph-theoretic object with no degree 2 +

extractgraphbool

If True, extract a graph-theoretic object with no degree 2 nodes. Default is True.

-
w_componentsbool

Set to False to not record connected components from a +

w_componentsbool

Set to False to not record connected components from a libpysal.weights.W object. Default is True.

-
weightings{dict, bool}

If dict, lists of weightings for each arc. If bool, +

weightings{dict, bool}

If dict, lists of weightings for each arc. If bool, True flags self.arc_lengths as the weightings, False sets no weightings. Default is False.

@@ -249,62 +249,62 @@

spaghetti.Network
Attributes
-
adjacencylistlist

List of lists storing vertex adjacency.

+
adjacencylistlist

List of lists storing vertex adjacency.

-
vertex_coordsdict

Keys are the vertex ID and values are the (x,y) coordinates +

vertex_coordsdict

Keys are the vertex ID and values are the (x,y) coordinates inverse to vertices.

-
vertex_listlist

List of vertex IDs.

+
vertex_listlist

List of vertex IDs.

-
verticesdict

Keys are tuples of vertex coords and values are the vertex ID.

+
verticesdict

Keys are tuples of vertex coords and values are the vertex ID.

-
arcslist

List of arcs, where each arc is a sorted tuple +

arcslist

List of arcs, where each arc is a sorted tuple of vertex IDs.

-
arc_lengthsdict

Keys are tuples of sorted vertex IDs representing an arc and +

arc_lengthsdict

Keys are tuples of sorted vertex IDs representing an arc and values are the length.

-
pointpatternsdict

Keys are a string name of the pattern and values are +

pointpatternsdict

Keys are a string name of the pattern and values are PointPattern class instances.

distance_matrixnumpy.ndarray

All network vertices (non-observations) distance matrix.

-
network_treesdict

Keys are the vertex IDs (int). Values are dictionaries +

network_treesdict

Keys are the vertex IDs (int). Values are dictionaries with the keys being the IDs of the destination vertex and the value being a list of the shortest path.

-
edgeslist

Tuples of graph edge IDs.

+
edgeslist

Tuples of graph edge IDs.

-
edge_lengthsdict

Keys are the graph edge IDs (tuple). Values are the graph edge +

edge_lengthsdict

Keys are the graph edge IDs (tuple). Values are the graph edge length (float).

-
non_articulation_pointslist

All vertices with degree 2 that are not in an isolated +

non_articulation_pointslist

All vertices with degree 2 that are not in an isolated island ring (loop) component.

w_networklibpysal.weights.W

Weights object created from the network arcs.

-
network_n_componentsint

Count of connected components in the network.

+
network_n_componentsint

Count of connected components in the network.

network_component_labelsnumpy.ndarray

Component labels for network arcs.

-
network_component2arcdict

Lookup in the form {int: list} for arcs comprising network +

network_component2arcdict

Lookup in the form {int: list} for arcs comprising network connected components keyed by component labels with arcs in a list as values.

-
network_component_is_ringdict

Lookup in the form {int: bool} keyed by component labels with values +

network_component_is_ringdict

Lookup in the form {int: bool} keyed by component labels with values as True if the component is a closed ring, otherwise False.

w_graphlibpysal.weights.W

Weights object created from the graph edges.

-
graph_n_componentsint

Count of connected components in the network.

+
graph_n_componentsint

Count of connected components in the network.

graph_component_labelsnumpy.ndarray

Component labels for graph edges.

-
graph_component2edgedict

Lookup in the form {int: list} for edges comprising graph connected +

graph_component2edgedict

Lookup in the form {int: list} for edges comprising graph connected components keyed by component labels with edges in a list as values.

-
graph_component_is_ringdict

Lookup in the form {int: bool} keyed by component labels with values as +

graph_component_is_ringdict

Lookup in the form {int: bool} keyed by component labels with values as True if the component is a closed ring, otherwise False.

@@ -397,21 +397,21 @@

spaghetti.Network
pointpatternspaghetti.PointPattern

A spaghetti point pattern object.

-
nstepsint

The number of steps at which the count of the nearest +

nstepsint

The number of steps at which the count of the nearest neighbors is computed.

-
permutationsint

The number of permutations to perform. Default 99.

+
permutationsint

The number of permutations to perform. Default 99.

-
thresholdfloat

The level at which significance is computed. +

thresholdfloat

The level at which significance is computed. (0.5 would be 97.5% and 2.5%).

-
distributionstr

The distribution from which random points are sampled. +

distributionstr

The distribution from which random points are sampled. Either "uniform" or "poisson".

-
lowerboundfloat

The lower bound at which the F-function is computed. +

lowerboundfloat

The lower bound at which the F-function is computed. Default 0.

-
upperboundfloat

The upper bound at which the F-function is computed. +

upperboundfloat

The upper bound at which the F-function is computed. Defaults to the maximum observed nearest neighbor distance.

@@ -462,21 +462,21 @@

spaghetti.Network
pointpatternspaghetti.PointPattern

A spaghetti point pattern object.

-
nstepsint

The number of steps at which the count of the nearest +

nstepsint

The number of steps at which the count of the nearest neighbors is computed.

-
permutationsint

The number of permutations to perform. Default 99.

+
permutationsint

The number of permutations to perform. Default 99.

-
thresholdfloat

The level at which significance is computed. +

thresholdfloat

The level at which significance is computed. (0.5 would be 97.5% and 2.5%).

-
distributionstr

The distribution from which random points are sampled +

distributionstr

The distribution from which random points are sampled Either "uniform" or "poisson".

-
lowerboundfloat

The lower bound at which the G-function is computed. +

lowerboundfloat

The lower bound at which the G-function is computed. Default 0.

-
upperboundfloat

The upper bound at which the G-function is computed. +

upperboundfloat

The upper bound at which the G-function is computed. Defaults to the maximum observed nearest neighbor distance.

@@ -531,21 +531,21 @@

spaghetti.Network
pointpatternspaghetti.PointPattern

A spaghetti point pattern object.

-
nstepsint

The number of steps at which the count of the nearest +

nstepsint

The number of steps at which the count of the nearest neighbors is computed.

-
permutationsint

The number of permutations to perform. Default is 99.

+
permutationsint

The number of permutations to perform. Default is 99.

-
thresholdfloat

The level at which significance is computed. +

thresholdfloat

The level at which significance is computed. (0.5 would be 97.5% and 2.5%).

-
distributionstr

The distribution from which random points are sampled +

distributionstr

The distribution from which random points are sampled Either "uniform" or "poisson".

-
lowerboundfloat

The lower bound at which the K-function is computed. +

lowerboundfloat

The lower bound at which the K-function is computed. Default is 0.

-
upperboundfloat

The upper bound at which the K-function is computed. +

upperboundfloat

The upper bound at which the K-function is computed. Defaults to the maximum observed nearest neighbor distance.

@@ -600,25 +600,25 @@

spaghetti.Network
Parameters
-
sourcepattern{str, spaghetti.PointPattern}

The key of a point pattern snapped to the network or +

sourcepattern{str, spaghetti.PointPattern}

The key of a point pattern snapped to the network or the full spaghetti.PointPattern object.

-
destpatternstr

(Optional) The key of a point pattern snapped to the network +

destpatternstr

(Optional) The key of a point pattern snapped to the network or the full spaghetti.PointPattern object.

-
fill_diagonal{float, int}

(Optional) Fill the diagonal of the cost matrix. Default is +

fill_diagonal{float, int}

(Optional) Fill the diagonal of the cost matrix. Default is None and will populate the diagonal with numpy.nan. Do not declare a destpattern for a custom fill_diagonal.

-
n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. +

n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. Use "all" to request all available cores. Specify the exact number of cores with an integer.

-
gen_treebool

Rebuild shortest path True, or skip False. +

gen_treebool

Rebuild shortest path True, or skip False. Default is False.

-
snap_distbool

Flag as True to include the distance from the original +

snap_distbool

Flag as True to include the distance from the original location to the snapped location along the network. Default is False.

@@ -629,7 +629,7 @@

spaghetti.Networknumpy.ndarray

An array of shape (n,m) storing distances between all source and destination points.

-
tree_nearestdict

Nearest network node to point pattern vertex shortest +

tree_nearestdict

Nearest network node to point pattern vertex shortest path lookup. The values of the dictionary are a tuple of the nearest source vertex and the nearest destination vertex to query the lookup tree. If two observations are @@ -698,19 +698,19 @@

spaghetti.Network
Parameters
-
xfloat

The x-coordinate of the snapped point.

+
xfloat

The x-coordinate of the snapped point.

-
yfloat

The y-coordinate of the snapped point.

+
yfloat

The y-coordinate of the snapped point.

-
arctuple

The (vtx0, vtx1) representation of the network arc.

+
arctuple

The (vtx0, vtx1) representation of the network arc.

Returns
-
d1float

The distance to vtx0. Always the vertex with the lesser ID.

+
d1float

The distance to vtx0. Always the vertex with the lesser ID.

-
d2float

The distance to vtx1. Always the vertex with the greater ID.

+
d2float

The distance to vtx1. Always the vertex with the greater ID.

@@ -727,13 +727,13 @@

spaghetti.Network
patternspaghetti.PointPattern

The point pattern object.

-
idxint

The point ID.

+
idxint

The point ID.

Returns
-
distfloat

The euclidean distance from original location to the snapped +

distfloat

The euclidean distance from original location to the snapped location.

@@ -748,11 +748,11 @@

spaghetti.Network
Parameters
-
graphbool

Controls whether the libpysal.weights.W is generated +

graphbool

Controls whether the libpysal.weights.W is generated using the spatial representation (False) or the graph representation (True). Default is True.

-
weightingsdict

Dictionary of lists of weightings for each arc/edge.

+
weightingsdict

Dictionary of lists of weightings for each arc/edge.

@@ -828,7 +828,7 @@

spaghetti.Network
Parameters
-
obs_ondict

Dictionary of observations on the network. +

obs_ondict

Dictionary of observations on the network. Either in the form {(<LINK>):{<POINT_ID>:(<COORDS>)}} or {<LINK>:[(<COORD>),(<COORD>)]}.

@@ -836,7 +836,7 @@

spaghetti.NetworkReturns
-
countsdict

Counts per network link in the form {(<LINK>):<COUNT>}.

+
countsdict

Counts per network link in the form {(<LINK>):<COUNT>}.

@@ -876,13 +876,13 @@

spaghetti.Network
Parameters
-
thresholdfloat

Distance threshold value.

+
thresholdfloat

Distance threshold value.

-
n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. +

n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. Use "all" to request all available cores. Specify the exact number of cores with an integer.

-
gen_treebool

Rebuild shortest path with True, or skip with False. +

gen_treebool

Rebuild shortest path with True, or skip with False. Default is False.

@@ -930,13 +930,13 @@

spaghetti.Network
Parameters
-
v0int

The vertex ID.

+
v0int

The vertex ID.

Returns
-
linkslist

List of tuple arcs adjacent to the vertex.

+
linkslist

List of tuple arcs adjacent to the vertex.

@@ -966,7 +966,7 @@

spaghetti.Networklibpysal.weights.W

Weights object created from the network segments (either raw or graph-theoretic).

-
graphbool

Flag for a raw network (False) or graph-theoretic network +

graphbool

Flag for a raw network (False) or graph-theoretic network (True). Default is False.

@@ -993,11 +993,11 @@

spaghetti.Network
Parameters
-
n_processesint

Specify the number of cores to utilize. Default is 1 core. +

n_processesint

Specify the number of cores to utilize. Default is 1 core. Use "all" to request all available cores. Specify the exact number of cores with an integer.

-
gen_treebool

Rebuild shortest path True, or skip False. +

gen_treebool

Rebuild shortest path True, or skip False. Default is False.

@@ -1014,7 +1014,7 @@

spaghetti.Network
Parameters
-
filenamestr

The filename where the network is saved.

+
filenamestr

The filename where the network is saved.

@@ -1036,26 +1036,26 @@

spaghetti.Network
Parameters
-
sourcepatternstr

The key of a point pattern snapped to the network.

+
sourcepatternstr

The key of a point pattern snapped to the network.

-
destpatternstr

(Optional) The key of a point pattern snapped to the +

destpatternstr

(Optional) The key of a point pattern snapped to the network.

-
n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. +

n_processes{int, str}

Specify the number of cores to utilize. Default is 1 core. Use "all" to request all available cores. Specify the exact number of cores with an integer.

-
gen_treebool

Rebuild shortest path True, or skip False. +

gen_treebool

Rebuild shortest path True, or skip False. Default is False.

all_distsnumpy.ndarray

An array of shape (n,n) storing distances between all points.

-
snap_distbool

Flag as True to include the distance from the original +

snap_distbool

Flag as True to include the distance from the original location to the snapped location along the network. Default is False.

-
keep_zero_distbool

Include zero values in minimum distance True or exclude +

keep_zero_distbool

Include zero values in minimum distance True or exclude False. Default is True. If the source pattern is the same as the destination pattern the diagonal is filled with numpy.nan.

@@ -1064,7 +1064,7 @@

spaghetti.NetworkReturns
-
nearestdict

Nearest neighbor distances keyed by the source point ID with +

nearestdict

Nearest neighbor distances keyed by the source point ID with the value as as tuple of lists containing nearest destination point ID(s) and distance.

@@ -1115,7 +1115,7 @@

spaghetti.Network
Parameters
-
filenamestr

The filename where the network should be saved. This should +

filenamestr

The filename where the network should be saved. This should be a full path or it will be saved in the current directory.

@@ -1142,23 +1142,23 @@

spaghetti.Network
Parameters
-
treedict

See tree_nearest in +

treedict

See tree_nearest in spaghetti.Network.allneighbordistances().

-
pp_origstr

Origin point pattern for shortest paths. +

pp_origstr

Origin point pattern for shortest paths. See name in spaghetti.Network.snapobservations().

-
pp_deststr

Destination point pattern for shortest paths. +

pp_deststr

Destination point pattern for shortest paths. See name in spaghetti.Network.snapobservations(). Defaults pp_orig if not declared.

-
n_processesint

See n_processes in spaghetti.Network.full_distance_matrix().

+
n_processesint

See n_processes in spaghetti.Network.full_distance_matrix().

Returns
-
pathslist

The shortest paths between observations as geometric objects. +

pathslist

The shortest paths between observations as geometric objects. Each element of the list is a list where the first element is an origin-destination pair tuple and the second element is a libpysal.cg.Chain.

@@ -1167,7 +1167,7 @@

spaghetti.NetworkRaises
-
AttributeError

This exception is raised when an attempt to extract shortest +

AttributeError

This exception is raised when an attempt to extract shortest path geometries is being made that but the network_trees attribute does not exist within the network object.

@@ -1216,10 +1216,10 @@

spaghetti.Network
Parameters
-
countint

The number of points to create or mean of the distribution +

countint

The number of points to create or mean of the distribution if not "uniform".

-
distributionstr

Either a "uniform" or "poisson" distribution of +

distributionstr

Either a "uniform" or "poisson" distribution of random points. If "poisson", the distribution is calculated from half the total network length.

@@ -1227,7 +1227,7 @@

spaghetti.NetworkReturns
-
random_ptsdict

Keys are the edge tuple. Values are lists of new +

random_ptsdict

Keys are the edge tuple. Values are lists of new point coordinates.

@@ -1272,14 +1272,14 @@

spaghetti.Network
Parameters
-
in_data{geopandas.GeoDataFrame, str}

The input geographic data. Either (1) a path to a +

in_data{geopandas.GeoDataFrame, str}

The input geographic data. Either (1) a path to a shapefile (str); or (2) a geopandas.GeoDataFrame.

-
namestr

Name to be assigned to the point dataset.

+
namestr

Name to be assigned to the point dataset.

-
idvariablestr

Column name to be used as the ID variable.

+
idvariablestr

Column name to be used as the ID variable.

-
attributebool

Defines whether attributes should be extracted. True for +

attributebool

Defines whether attributes should be extracted. True for attribute extraction. False for no attribute extraction. Default is False.

@@ -1317,7 +1317,7 @@

spaghetti.Network
Parameters
-
distancefloat

The distance at which arcs are split.

+
distancefloat

The distance at which arcs are split.

diff --git a/docs/generated/spaghetti.Network.loadnetwork.html b/docs/generated/spaghetti.Network.loadnetwork.html index 0dcdc44e..6fb89666 100644 --- a/docs/generated/spaghetti.Network.loadnetwork.html +++ b/docs/generated/spaghetti.Network.loadnetwork.html @@ -139,7 +139,7 @@

spaghetti.Network.loadnetwork
Parameters
-
filenamestr

The filename where the network is saved.

+
filenamestr

The filename where the network is saved.

diff --git a/docs/generated/spaghetti.Network.savenetwork.html b/docs/generated/spaghetti.Network.savenetwork.html index 011d3f4a..d854e03f 100644 --- a/docs/generated/spaghetti.Network.savenetwork.html +++ b/docs/generated/spaghetti.Network.savenetwork.html @@ -139,7 +139,7 @@

spaghetti.Network.savenetwork
Parameters
-
filenamestr

The filename where the network should be saved. This should +

filenamestr

The filename where the network should be saved. This should be a full path or it will be saved in the current directory.

diff --git a/docs/generated/spaghetti.PointPattern.html b/docs/generated/spaghetti.PointPattern.html index 92a2dbd8..edfe0ae2 100644 --- a/docs/generated/spaghetti.PointPattern.html +++ b/docs/generated/spaghetti.PointPattern.html @@ -143,46 +143,46 @@

spaghetti.PointPattern
Parameters
-
in_data{str, list, tuple, libpysal.cg.Point, geopandas.GeoDataFrame}

The input geographic data. Either (1) a path to a shapefile +

in_data{str, list, tuple, libpysal.cg.Point, geopandas.GeoDataFrame}

The input geographic data. Either (1) a path to a shapefile (str); (2) an iterable containing libpysal.cg.Point objects; (3) a single libpysal.cg.Point; or (4) a geopandas.GeoDataFrame.

-
idvariablestr

Field in the shapefile to use as an ID variable.

+
idvariablestr

Field in the shapefile to use as an ID variable.

-
attributebool

A flag to indicate whether all attributes are tagged to this +

attributebool

A flag to indicate whether all attributes are tagged to this class (True) or excluded (False). Default is False.

Attributes
-
pointsdict

Keys are the point IDs (int). Values are the x,y +

pointsdict

Keys are the point IDs (int). Values are the x,y coordinates (tuple).

-
npointsint

The number of points.

+
npointsint

The number of points.

-
obs_to_arcdict

Keys are arc IDs (tuple). Values are snapped point information +

obs_to_arcdict

Keys are arc IDs (tuple). Values are snapped point information (dict). Within the snapped point information (dict) keys are observation IDs (int), and values are snapped coordinates.

-
obs_to_vertexlist

List of incident network vertices to snapped observation points +

obs_to_vertexlist

List of incident network vertices to snapped observation points converted from a default_dict. Originally in the form of paired left/right nearest network vertices {netvtx1: obs_id1, netvtx2: obs_id1, netvtx1: obs_id2… netvtx1: obs_idn}, then simplified to a list in the form [netvtx1, netvtx2, netvtx1, netvtx2, …].

-
dist_to_vertexdict

Keys are observations IDs (int). Values are distance lookup +

dist_to_vertexdict

Keys are observations IDs (int). Values are distance lookup (dict). Within distance lookup (dict) keys are the two incident vertices of the arc and values are distance to each of those arcs.

-
snapped_coordinatesdict

Keys are the point IDs (int). Values are the snapped x,y +

snapped_coordinatesdict

Keys are the point IDs (int). Values are the snapped x,y coordinates (tuple).

-
snap_distbool

Flag as True to include the distance from the original +

snap_distbool

Flag as True to include the distance from the original location to the snapped location along the network. Default is False.

diff --git a/docs/generated/spaghetti.element_as_gdf.html b/docs/generated/spaghetti.element_as_gdf.html index 4a15fe56..34e37283 100644 --- a/docs/generated/spaghetti.element_as_gdf.html +++ b/docs/generated/spaghetti.element_as_gdf.html @@ -145,40 +145,40 @@

spaghetti.element_as_gdf
netspaghetti.Network

A spaghetti network object.

-
verticesbool

Extract the network vertices (True). Default is False.

+
verticesbool

Extract the network vertices (True). Default is False.

-
arcsbool

Extract the network arcs (True). Default is False.

+
arcsbool

Extract the network arcs (True). Default is False.

-
pp_namestr

Name of the network.PointPattern to extract. +

pp_namestr

Name of the network.PointPattern to extract. Default is None.

-
snappedbool

If extracting a network.PointPattern, set to True for +

snappedbool

If extracting a network.PointPattern, set to True for snapped point locations along the network. Default is False.

-
routesdict

See paths from spaghetti.Network.shortest_paths. +

routesdict

See paths from spaghetti.Network.shortest_paths. Default is None.

-
id_colstr

geopandas.GeoDataFrame column name for IDs. Default is "id". +

id_colstr

geopandas.GeoDataFrame column name for IDs. Default is "id". When extracting routes this creates an (origin, destination) tuple.

-
geom_colstr

geopandas.GeoDataFrame column name for geometry. Default is +

geom_colstr

geopandas.GeoDataFrame column name for geometry. Default is "geometry".

Returns
-
pointsgeopandas.GeoDataFrame

Network point elements (either vertices or network.PointPattern +

pointsgeopandas.GeoDataFrame

Network point elements (either vertices or network.PointPattern points) as a geopandas.GeoDataFrame of shapely.geometry.Point objects with an "id" column and "geometry"" column.

-
linesgeopandas.GeoDataFrame

Network arc elements as a geopandas.GeoDataFrame of +

linesgeopandas.GeoDataFrame

Network arc elements as a geopandas.GeoDataFrame of shapely.geometry.LineString objects with an "id" column and "geometry" column. If the network object has a network_component_labels attribute, then component labels are also added in a column.

-
pathsgeopandas.GeoDataFrame

Shortest path routes along network arc elements as a +

pathsgeopandas.GeoDataFrame

Shortest path routes along network arc elements as a geopandas.GeoDataFrame of shapely.geometry.LineString objects with an "id" (see spaghetti.Network.shortest_paths()) column and "geometry" column.

@@ -187,7 +187,7 @@

spaghetti.element_as_gdfRaises
-
KeyError

In order to extract a network.PointPattern it must already +

KeyError

In order to extract a network.PointPattern it must already be a part of the network object. This exception is raised when a network.PointPattern is being extracted that does not exist within the network object.

diff --git a/docs/generated/spaghetti.regular_lattice.html b/docs/generated/spaghetti.regular_lattice.html index 7c8cb098..83e4aaff 100644 --- a/docs/generated/spaghetti.regular_lattice.html +++ b/docs/generated/spaghetti.regular_lattice.html @@ -140,20 +140,20 @@

spaghetti.regular_lattice
Parameters
-
bounds{tuple, list}

Area bounds in the form - <minx,miny,maxx,maxy>.

+
bounds{tuple, list}

Area bounds in the form - <minx,miny,maxx,maxy>.

-
nhint

The number of internal horizontal lines of the lattice.

+
nhint

The number of internal horizontal lines of the lattice.

-
nvint

The number of internal vertical lines of the lattice. Defaults to +

nvint

The number of internal vertical lines of the lattice. Defaults to nh if left as None.

-
exteriorbool

Flag for including the outer bounding box segments. Default is False.

+
exteriorbool

Flag for including the outer bounding box segments. Default is False.

Returns
-
latticelist

libpysal.cg.Chain objects forming a regular lattice

+
latticelist

libpysal.cg.Chain objects forming a regular lattice

diff --git a/docs/index.html b/docs/index.html index 6d81a916..0b55b143 100644 --- a/docs/index.html +++ b/docs/index.html @@ -101,6 +101,7 @@ aria-labelledby="dLabelLocalToc">
  • spaghetti
  • @@ -176,6 +177,10 @@
    Optimal Facility Location
    +
    +

    Development¶

    +

    Development of spaghetti is hosted on GitHub.

    +

    Citing spaghetti¶

    If you use PySAL-spaghetti in a scientific publication, we would appreciate using the following citation:

    diff --git a/docs/installation.html b/docs/installation.html index cdef2d03..e5a6e0ca 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -135,7 +135,7 @@
    -

    As of version 1.3, spaghetti supports Python 3.6 and 3.7 only. Please make sure that you are operating in a Python 3 environment.

    +

    As of version 1.4.2, spaghetti supports Python 3.6, 3.7, and 3.8. Please make sure that you are operating in a Python >= 3.6 environment.

    Installation¶