From 95f672f95f4a746032a948ba75aa6a99b677c126 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 24 Jan 2020 19:47:47 -0500 Subject: [PATCH 1/3] fixing #139 --- spaghetti/network.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spaghetti/network.py b/spaghetti/network.py index e382ec4a..5b7ea031 100644 --- a/spaghetti/network.py +++ b/spaghetti/network.py @@ -2800,14 +2800,13 @@ def element_as_gdf( ``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, + are also added in a column. paths : geopandas.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. Notes ----- From 431dc353fb9d9bc81054d5cfa1d53050f9279698 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 24 Jan 2020 19:50:46 -0500 Subject: [PATCH 2/3] improving shortest path notebook --- notebooks/Shortest-path-visualization.ipynb | 222 +++++++++++++++----- 1 file changed, 175 insertions(+), 47 deletions(-) diff --git a/notebooks/Shortest-path-visualization.ipynb b/notebooks/Shortest-path-visualization.ipynb index 7524e367..130d8b23 100644 --- a/notebooks/Shortest-path-visualization.ipynb +++ b/notebooks/Shortest-path-visualization.ipynb @@ -28,8 +28,8 @@ "execution_count": 1, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:40.813992Z", - "start_time": "2020-01-20T21:02:40.428240Z" + "end_time": "2020-01-25T00:49:39.009055Z", + "start_time": "2020-01-25T00:49:38.778856Z" } }, "outputs": [ @@ -37,7 +37,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2020-01-20T16:02:40-05:00\n", + "2020-01-24T19:49:38-05:00\n", "\n", "CPython 3.7.3\n", "IPython 7.10.2\n", @@ -76,8 +76,8 @@ "execution_count": 2, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.786245Z", - "start_time": "2020-01-20T21:02:40.821359Z" + "end_time": "2020-01-25T00:49:40.609590Z", + "start_time": "2020-01-25T00:49:39.014427Z" }, "scrolled": true }, @@ -124,8 +124,8 @@ "execution_count": 3, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.825330Z", - "start_time": "2020-01-20T21:02:42.795236Z" + "end_time": "2020-01-25T00:49:40.623236Z", + "start_time": "2020-01-25T00:49:40.614746Z" } }, "outputs": [], @@ -151,8 +151,8 @@ "execution_count": 4, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.911605Z", - "start_time": "2020-01-20T21:02:42.837422Z" + "end_time": "2020-01-25T00:49:40.679484Z", + "start_time": "2020-01-25T00:49:40.627004Z" } }, "outputs": [], @@ -165,8 +165,8 @@ "execution_count": 5, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.441184Z", - "start_time": "2020-01-20T21:02:42.918431Z" + "end_time": "2020-01-25T00:49:41.132584Z", + "start_time": "2020-01-25T00:49:40.682017Z" } }, "outputs": [ @@ -204,8 +204,8 @@ "execution_count": 6, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.475086Z", - "start_time": "2020-01-20T21:02:43.451514Z" + "end_time": "2020-01-25T00:49:41.149467Z", + "start_time": "2020-01-25T00:49:41.136700Z" } }, "outputs": [], @@ -232,8 +232,8 @@ "execution_count": 7, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.504382Z", - "start_time": "2020-01-20T21:02:43.484622Z" + "end_time": "2020-01-25T00:49:41.171540Z", + "start_time": "2020-01-25T00:49:41.155027Z" } }, "outputs": [], @@ -249,8 +249,8 @@ "execution_count": 8, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.268327Z", - "start_time": "2020-01-20T21:02:43.515001Z" + "end_time": "2020-01-25T00:49:41.868997Z", + "start_time": "2020-01-25T00:49:41.179805Z" } }, "outputs": [ @@ -317,8 +317,8 @@ "execution_count": 9, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.308204Z", - "start_time": "2020-01-20T21:02:44.279196Z" + "end_time": "2020-01-25T00:49:41.888967Z", + "start_time": "2020-01-25T00:49:41.876074Z" } }, "outputs": [ @@ -352,8 +352,8 @@ "execution_count": 10, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.340953Z", - "start_time": "2020-01-20T21:02:44.327960Z" + "end_time": "2020-01-25T00:49:41.908913Z", + "start_time": "2020-01-25T00:49:41.895949Z" } }, "outputs": [ @@ -384,8 +384,8 @@ "execution_count": 11, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.380484Z", - "start_time": "2020-01-20T21:02:44.360298Z" + "end_time": "2020-01-25T00:49:41.919523Z", + "start_time": "2020-01-25T00:49:41.913962Z" } }, "outputs": [ @@ -429,13 +429,71 @@ "execution_count": 12, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.408333Z", - "start_time": "2020-01-20T21:02:44.392367Z" + "end_time": "2020-01-25T00:49:41.934666Z", + "start_time": "2020-01-25T00:49:41.922025Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (0 1.3, 0 1.7)
1(0, 2)LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)
2(1, 2)LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (0 1.3, 0 1.7)\n", + "1 (0, 2) LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)\n", + "2 (1, 2) LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf" ] }, { @@ -443,8 +501,8 @@ "execution_count": 13, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.743126Z", - "start_time": "2020-01-20T21:02:44.426394Z" + "end_time": "2020-01-25T00:49:42.237289Z", + "start_time": "2020-01-25T00:49:41.937338Z" } }, "outputs": [ @@ -481,8 +539,8 @@ "execution_count": 14, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:45.540650Z", - "start_time": "2020-01-20T21:02:44.750155Z" + "end_time": "2020-01-25T00:49:42.974129Z", + "start_time": "2020-01-25T00:49:42.241522Z" } }, "outputs": [ @@ -552,8 +610,8 @@ "execution_count": 15, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.066679Z", - "start_time": "2020-01-20T21:02:45.550136Z" + "end_time": "2020-01-25T00:49:43.473665Z", + "start_time": "2020-01-25T00:49:42.980320Z" } }, "outputs": [], @@ -567,8 +625,8 @@ "execution_count": 16, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.638924Z", - "start_time": "2020-01-20T21:02:46.071804Z" + "end_time": "2020-01-25T00:49:43.976956Z", + "start_time": "2020-01-25T00:49:43.476414Z" } }, "outputs": [ @@ -606,8 +664,8 @@ "execution_count": 17, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.795230Z", - "start_time": "2020-01-20T21:02:46.648884Z" + "end_time": "2020-01-25T00:49:44.084575Z", + "start_time": "2020-01-25T00:49:43.981675Z" } }, "outputs": [], @@ -634,8 +692,8 @@ "execution_count": 18, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:51.337586Z", - "start_time": "2020-01-20T21:02:46.798853Z" + "end_time": "2020-01-25T00:49:47.376145Z", + "start_time": "2020-01-25T00:49:44.087013Z" } }, "outputs": [ @@ -702,15 +760,85 @@ "execution_count": 19, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.527369Z", - "start_time": "2020-01-20T21:02:51.360401Z" + "end_time": "2020-01-25T00:49:48.072619Z", + "start_time": "2020-01-25T00:49:47.378346Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (727287.664 879867.386, 727294.797 ...
1(0, 2)LINESTRING (727287.664 879867.386, 727294.797 ...
2(0, 3)LINESTRING (727287.664 879867.386, 727294.797 ...
3(0, 4)LINESTRING (727287.664 879867.386, 727294.797 ...
4(0, 5)LINESTRING (727287.664 879867.386, 727281.557 ...
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "1 (0, 2) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "2 (0, 3) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "3 (0, 4) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "4 (0, 5) LINESTRING (727287.664 879867.386, 727281.557 ..." + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "d2d_dist, tree = ntw.allneighbordistances(\"schools\", gen_tree=True)\n", "paths = ntw.shortest_paths(tree, \"schools\")\n", - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf.head()" ] }, { @@ -730,8 +858,8 @@ "execution_count": 20, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.905092Z", - "start_time": "2020-01-20T21:02:52.530293Z" + "end_time": "2020-01-25T00:49:48.401388Z", + "start_time": "2020-01-25T00:49:48.076955Z" } }, "outputs": [ @@ -768,8 +896,8 @@ "execution_count": 21, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:53.698330Z", - "start_time": "2020-01-20T21:02:52.917168Z" + "end_time": "2020-01-25T00:49:49.040715Z", + "start_time": "2020-01-25T00:49:48.405608Z" } }, "outputs": [ From 829379053e2e61fa5eeee822d5188f9d4b0e0456 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 24 Jan 2020 19:52:44 -0500 Subject: [PATCH 3/3] pushing rebuilt docs --- docs/_modules/spaghetti/network.html | 11 +- .../Shortest-path-visualization.ipynb.txt | 222 ++++++++++++++---- docs/generated/spaghetti.Network.html | 4 +- docs/generated/spaghetti.PointPattern.html | 2 +- docs/generated/spaghetti.element_as_gdf.html | 12 +- .../Shortest-path-visualization.html | 112 ++++++++- docs/searchindex.js | 2 +- .../Shortest-path-visualization.ipynb | 222 ++++++++++++++---- 8 files changed, 476 insertions(+), 111 deletions(-) diff --git a/docs/_modules/spaghetti/network.html b/docs/_modules/spaghetti/network.html index e04d1b25..7a91fe9f 100644 --- a/docs/_modules/spaghetti/network.html +++ b/docs/_modules/spaghetti/network.html @@ -2926,14 +2926,13 @@

Source code for spaghetti.network

         ``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,
+        are also added in a column.
     
     paths :  geopandas.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.
     
     Notes
     -----
diff --git a/docs/_sources/notebooks/Shortest-path-visualization.ipynb.txt b/docs/_sources/notebooks/Shortest-path-visualization.ipynb.txt
index 7524e367..130d8b23 100644
--- a/docs/_sources/notebooks/Shortest-path-visualization.ipynb.txt
+++ b/docs/_sources/notebooks/Shortest-path-visualization.ipynb.txt
@@ -28,8 +28,8 @@
    "execution_count": 1,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:40.813992Z",
-     "start_time": "2020-01-20T21:02:40.428240Z"
+     "end_time": "2020-01-25T00:49:39.009055Z",
+     "start_time": "2020-01-25T00:49:38.778856Z"
     }
    },
    "outputs": [
@@ -37,7 +37,7 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "2020-01-20T16:02:40-05:00\n",
+      "2020-01-24T19:49:38-05:00\n",
       "\n",
       "CPython 3.7.3\n",
       "IPython 7.10.2\n",
@@ -76,8 +76,8 @@
    "execution_count": 2,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:42.786245Z",
-     "start_time": "2020-01-20T21:02:40.821359Z"
+     "end_time": "2020-01-25T00:49:40.609590Z",
+     "start_time": "2020-01-25T00:49:39.014427Z"
     },
     "scrolled": true
    },
@@ -124,8 +124,8 @@
    "execution_count": 3,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:42.825330Z",
-     "start_time": "2020-01-20T21:02:42.795236Z"
+     "end_time": "2020-01-25T00:49:40.623236Z",
+     "start_time": "2020-01-25T00:49:40.614746Z"
     }
    },
    "outputs": [],
@@ -151,8 +151,8 @@
    "execution_count": 4,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:42.911605Z",
-     "start_time": "2020-01-20T21:02:42.837422Z"
+     "end_time": "2020-01-25T00:49:40.679484Z",
+     "start_time": "2020-01-25T00:49:40.627004Z"
     }
    },
    "outputs": [],
@@ -165,8 +165,8 @@
    "execution_count": 5,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:43.441184Z",
-     "start_time": "2020-01-20T21:02:42.918431Z"
+     "end_time": "2020-01-25T00:49:41.132584Z",
+     "start_time": "2020-01-25T00:49:40.682017Z"
     }
    },
    "outputs": [
@@ -204,8 +204,8 @@
    "execution_count": 6,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:43.475086Z",
-     "start_time": "2020-01-20T21:02:43.451514Z"
+     "end_time": "2020-01-25T00:49:41.149467Z",
+     "start_time": "2020-01-25T00:49:41.136700Z"
     }
    },
    "outputs": [],
@@ -232,8 +232,8 @@
    "execution_count": 7,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:43.504382Z",
-     "start_time": "2020-01-20T21:02:43.484622Z"
+     "end_time": "2020-01-25T00:49:41.171540Z",
+     "start_time": "2020-01-25T00:49:41.155027Z"
     }
    },
    "outputs": [],
@@ -249,8 +249,8 @@
    "execution_count": 8,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:44.268327Z",
-     "start_time": "2020-01-20T21:02:43.515001Z"
+     "end_time": "2020-01-25T00:49:41.868997Z",
+     "start_time": "2020-01-25T00:49:41.179805Z"
     }
    },
    "outputs": [
@@ -317,8 +317,8 @@
    "execution_count": 9,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:44.308204Z",
-     "start_time": "2020-01-20T21:02:44.279196Z"
+     "end_time": "2020-01-25T00:49:41.888967Z",
+     "start_time": "2020-01-25T00:49:41.876074Z"
     }
    },
    "outputs": [
@@ -352,8 +352,8 @@
    "execution_count": 10,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:44.340953Z",
-     "start_time": "2020-01-20T21:02:44.327960Z"
+     "end_time": "2020-01-25T00:49:41.908913Z",
+     "start_time": "2020-01-25T00:49:41.895949Z"
     }
    },
    "outputs": [
@@ -384,8 +384,8 @@
    "execution_count": 11,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:44.380484Z",
-     "start_time": "2020-01-20T21:02:44.360298Z"
+     "end_time": "2020-01-25T00:49:41.919523Z",
+     "start_time": "2020-01-25T00:49:41.913962Z"
     }
    },
    "outputs": [
@@ -429,13 +429,71 @@
    "execution_count": 12,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2020-01-20T21:02:44.408333Z",
-     "start_time": "2020-01-20T21:02:44.392367Z"
+     "end_time": "2020-01-25T00:49:41.934666Z",
+     "start_time": "2020-01-25T00:49:41.922025Z"
     }
    },
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (0 1.3, 0 1.7)
1(0, 2)LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)
2(1, 2)LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (0 1.3, 0 1.7)\n", + "1 (0, 2) LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)\n", + "2 (1, 2) LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf" ] }, { @@ -443,8 +501,8 @@ "execution_count": 13, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.743126Z", - "start_time": "2020-01-20T21:02:44.426394Z" + "end_time": "2020-01-25T00:49:42.237289Z", + "start_time": "2020-01-25T00:49:41.937338Z" } }, "outputs": [ @@ -481,8 +539,8 @@ "execution_count": 14, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:45.540650Z", - "start_time": "2020-01-20T21:02:44.750155Z" + "end_time": "2020-01-25T00:49:42.974129Z", + "start_time": "2020-01-25T00:49:42.241522Z" } }, "outputs": [ @@ -552,8 +610,8 @@ "execution_count": 15, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.066679Z", - "start_time": "2020-01-20T21:02:45.550136Z" + "end_time": "2020-01-25T00:49:43.473665Z", + "start_time": "2020-01-25T00:49:42.980320Z" } }, "outputs": [], @@ -567,8 +625,8 @@ "execution_count": 16, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.638924Z", - "start_time": "2020-01-20T21:02:46.071804Z" + "end_time": "2020-01-25T00:49:43.976956Z", + "start_time": "2020-01-25T00:49:43.476414Z" } }, "outputs": [ @@ -606,8 +664,8 @@ "execution_count": 17, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.795230Z", - "start_time": "2020-01-20T21:02:46.648884Z" + "end_time": "2020-01-25T00:49:44.084575Z", + "start_time": "2020-01-25T00:49:43.981675Z" } }, "outputs": [], @@ -634,8 +692,8 @@ "execution_count": 18, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:51.337586Z", - "start_time": "2020-01-20T21:02:46.798853Z" + "end_time": "2020-01-25T00:49:47.376145Z", + "start_time": "2020-01-25T00:49:44.087013Z" } }, "outputs": [ @@ -702,15 +760,85 @@ "execution_count": 19, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.527369Z", - "start_time": "2020-01-20T21:02:51.360401Z" + "end_time": "2020-01-25T00:49:48.072619Z", + "start_time": "2020-01-25T00:49:47.378346Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (727287.664 879867.386, 727294.797 ...
1(0, 2)LINESTRING (727287.664 879867.386, 727294.797 ...
2(0, 3)LINESTRING (727287.664 879867.386, 727294.797 ...
3(0, 4)LINESTRING (727287.664 879867.386, 727294.797 ...
4(0, 5)LINESTRING (727287.664 879867.386, 727281.557 ...
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "1 (0, 2) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "2 (0, 3) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "3 (0, 4) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "4 (0, 5) LINESTRING (727287.664 879867.386, 727281.557 ..." + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "d2d_dist, tree = ntw.allneighbordistances(\"schools\", gen_tree=True)\n", "paths = ntw.shortest_paths(tree, \"schools\")\n", - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf.head()" ] }, { @@ -730,8 +858,8 @@ "execution_count": 20, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.905092Z", - "start_time": "2020-01-20T21:02:52.530293Z" + "end_time": "2020-01-25T00:49:48.401388Z", + "start_time": "2020-01-25T00:49:48.076955Z" } }, "outputs": [ @@ -768,8 +896,8 @@ "execution_count": 21, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:53.698330Z", - "start_time": "2020-01-20T21:02:52.917168Z" + "end_time": "2020-01-25T00:49:49.040715Z", + "start_time": "2020-01-25T00:49:48.405608Z" } }, "outputs": [ diff --git a/docs/generated/spaghetti.Network.html b/docs/generated/spaghetti.Network.html index 7bddf513..1f22f148 100644 --- a/docs/generated/spaghetti.Network.html +++ b/docs/generated/spaghetti.Network.html @@ -141,7 +141,7 @@

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.

@@ -1255,7 +1255,7 @@

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.

diff --git a/docs/generated/spaghetti.PointPattern.html b/docs/generated/spaghetti.PointPattern.html index 40e15ace..0848cb1b 100644 --- a/docs/generated/spaghetti.PointPattern.html +++ b/docs/generated/spaghetti.PointPattern.html @@ -141,7 +141,7 @@

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.

diff --git a/docs/generated/spaghetti.element_as_gdf.html b/docs/generated/spaghetti.element_as_gdf.html index 488bb5c4..eb809448 100644 --- a/docs/generated/spaghetti.element_as_gdf.html +++ b/docs/generated/spaghetti.element_as_gdf.html @@ -165,17 +165,21 @@

spaghetti.element_as_gdfReturns
-
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,

+are also added in a column.

+
+
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.

-
pathsgeopandas.GeoDataFrame
Raises
diff --git a/docs/notebooks/Shortest-path-visualization.html b/docs/notebooks/Shortest-path-visualization.html index f8686a03..db909172 100644 --- a/docs/notebooks/Shortest-path-visualization.html +++ b/docs/notebooks/Shortest-path-visualization.html @@ -391,7 +391,7 @@

Creating data for testing and demonstrating routes
-2020-01-20T16:02:40-05:00
+2020-01-24T19:49:38-05:00
 
 CPython 3.7.3
 IPython 7.10.2
@@ -656,14 +656,62 @@ 

1.6. Generate shortest paths as <

1.7. Extract the shortest paths within geopandas.GeoDataFrame and plot

-
+
[12]:
 
 paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)
+paths_gdf
+
+
+
+
+
[12]:
 
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
idgeometry
0(0, 1)LINESTRING (0 1.3, 0 1.7)
1(0, 2)LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)
2(1, 2)LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)
+
+
+
[19]:
 
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idgeometry
0(0, 1)LINESTRING (727287.664 879867.386, 727294.797 ...
1(0, 2)LINESTRING (727287.664 879867.386, 727294.797 ...
2(0, 3)LINESTRING (727287.664 879867.386, 727294.797 ...
3(0, 4)LINESTRING (727287.664 879867.386, 727294.797 ...
4(0, 5)LINESTRING (727287.664 879867.386, 727281.557 ...
+
diff --git a/docs/searchindex.js b/docs/searchindex.js index 0ed18d84..c469e029 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["api","generated/spaghetti.Network","generated/spaghetti.Network.loadnetwork","generated/spaghetti.Network.savenetwork","generated/spaghetti.PointPattern","generated/spaghetti.element_as_gdf","generated/spaghetti.regular_lattice","index","installation","notebooks/Advanced-spaghetti-tutorial","notebooks/Basic-spaghetti-tutorial","notebooks/Connected-components","notebooks/Shortest-path-visualization","notebooks/Use-case-facility-location","references","tutorials"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1,nbsphinx:1,sphinx:56},filenames:["api.rst","generated/spaghetti.Network.rst","generated/spaghetti.Network.loadnetwork.rst","generated/spaghetti.Network.savenetwork.rst","generated/spaghetti.PointPattern.rst","generated/spaghetti.element_as_gdf.rst","generated/spaghetti.regular_lattice.rst","index.rst","installation.rst","notebooks/Advanced-spaghetti-tutorial.ipynb","notebooks/Basic-spaghetti-tutorial.ipynb","notebooks/Connected-components.ipynb","notebooks/Shortest-path-visualization.ipynb","notebooks/Use-case-facility-location.ipynb","references.rst","tutorials.rst"],objects:{"spaghetti.Network":{NetworkF:[1,1,1,""],NetworkG:[1,1,1,""],NetworkK:[1,1,1,""],__init__:[1,1,1,""],allneighbordistances:[1,1,1,""],compute_distance_to_vertices:[1,1,1,""],compute_snap_dist:[1,1,1,""],contiguityweights:[1,1,1,""],count_per_link:[1,1,1,""],distancebandweights:[1,1,1,""],enum_links_vertex:[1,1,1,""],extract_components:[1,1,1,""],extractgraph:[1,1,1,""],full_distance_matrix:[1,1,1,""],loadnetwork:[2,1,1,""],nearestneighbordistances:[1,1,1,""],savenetwork:[3,1,1,""],shortest_paths:[1,1,1,""],simulate_observations:[1,1,1,""],snapobservations:[1,1,1,""],split_arcs:[1,1,1,""]},"spaghetti.PointPattern":{__init__:[4,1,1,""]},spaghetti:{Network:[1,0,1,""],PointPattern:[4,0,1,""],element_as_gdf:[5,2,1,""],regular_lattice:[6,2,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","function","Python function"]},objtypes:{"0":"py:class","1":"py:method","2":"py:function"},terms:{"013617549x":14,"0x11c5f0320":9,"0x11d553048":9,"20t16":[9,10,11,12],"20t23":13,"25km":13,"4th":14,"4x4":6,"5x5":6,"64bit":[9,10,11,12,13],"66667e":13,"7th":14,"8km":13,"case":[1,13],"class":[1,4],"default":[1,4,5,6,9,13],"final":[9,10,11,12,13],"float":[1,9,13],"function":[1,5,14],"import":[1,3,5,6,9,10,11,12,13],"int":[1,4,6,13],"new":[1,13,14],"public":7,"return":[1,2,5,6,13],"static":[1,2],"super":13,"switch":[13,14],"true":[1,4,5,6,9,11,12,13],"try":[9,10,11,12,13],"while":[1,13],And:1,For:[1,6],IDs:[1,4,5],Its:14,That:1,The:[1,2,3,4,6,13,14],Their:14,There:[1,11,13],Use:[1,13],Using:[1,8],With:1,__class__:9,__delattr__:9,__dict__:9,__dir__:9,__doc__:9,__eq__:9,__format__:9,__ge__:9,__getattribute__:9,__gt__:9,__hash__:9,__init__:[1,4,9,13],__init_subclass__:9,__le__:9,__lt__:9,__module__:9,__ne__:9,__new__:9,__reduce__:9,__reduce_ex__:9,__repr__:9,__setattr__:9,__sizeof__:9,__str__:9,__subclasshook__:9,__weakref__:9,_highlight_membership:13,_moran__calc:9,_moran__mo:9,_redirect_to_fil:13,_shellmodel:13,_sol:13,_statist:9,_subplot:13,abov:[1,7,8],abs_max:13,abs_min:13,absolut:[13,14],access:[1,14],accur:[1,4],acord:13,acquir:14,activ:7,adapt:13,add:[10,13],add_constr:13,add_legend:13,add_north_arrow:13,add_obj:13,add_result:13,add_scal:13,add_to_legend:13,add_to_plot:13,add_var:13,added:5,addtion:[9,10,11,12,13],adjac:[1,9],adjacencylist:1,advanc:15,afford:13,ahuja:14,ai_sum:13,aij:13,algorithm:[13,14],all:[1,4,8,10],all_dist:1,allneighbordist:[1,12,13],along:[1,4,5,14],alpha:[9,10,12,13],alpha_shape_auto:13,alreadi:5,also:[1,5,8,13],alwai:[1,13],amo93:[1,14],anaconda:8,analysi:[1,7,13,14],analyt:[1,14],analytics_df:13,analytics_displai:13,analytics_matrix:13,analyz:14,anchor:13,ani:[1,9,10,11,12,13],annot:12,anoth:1,anselin:14,api:7,appear:13,append:13,appli:[12,13],applic:[13,14],appreci:7,approxim:1,ar14:[1,14],arc:[1,4,5],arc_length:[1,9],arcs200_df:9,arcs_df:[5,9,10,11],area:13,arg:10,argument:[1,10],aric:14,arrai:[1,12,13],arriba:14,arrow:13,art:14,articl:14,articul:1,articulation_vertic:11,arw:13,as_cmap:13,ask:13,assign:[1,13],associ:[1,5,13,14],assum:1,astyp:13,atsuyki:14,atsuyuki:14,attempt:[1,13],attr:13,attribut:[1,4,5,9,13],attributeerror:[1,13],august:14,author:[4,7,9,10,11,12,13],aux_to_plot:13,avail:1,averag:13,avoid:8,axarr:13,axes:13,axessubplot:13,axi:[12,13],b978:14,background:13,background_gradi:13,barbaro:14,barth:14,barthelemy11:[1,14],base:[1,7,9,10,12,15],basic:[1,14,15],bbox:13,bbox_prop:13,bbox_to_anchor:[10,13],beauguitt:14,becaus:1,been:[1,13],being:[1,5,9,13],bel:14,believ:[1,13],bennett:14,bergman:[13,14],best:9,between:[1,5,9,13],bf01386390:14,bibtex:7,binari:[1,2,3,9,13],blue:9,blueviolet:13,board:14,boe17:[1,14],boe:14,boiler:13,bold:12,book:13,bool:[1,4,5,6,13],both:[1,5],bottom:12,bound:1,boxstyl:13,bridg:1,bring:13,british:14,budget:13,buff:13,buffer:13,bug:1,build:[7,9,13],build_:13,build_lscp:13,build_mclp:13,build_pcp:13,build_pmp:13,by_col:9,c_arrai:13,calc:13,calcul:[1,5],call:[1,9],can:[1,5,8,13],carlo:9,cbc_mixed_integer_program:13,cbo9781107415324:14,ccv:13,cdv:13,cdv_label:13,cell:13,center:[12,14],central:[13,14],centric:1,centroid:12,ch3:14,ch5:14,ch6:14,ch81:[1,14],chain:[1,6],chang:8,channel:8,channel_prior:8,chapter:14,charl:[7,13,14],chicago:14,chose:13,church1974:[],church:[13,14],cij:13,citat:[7,15],cite:[9,10,11,12,13],clang:[9,10,11,12,13],cli2fac:13,cli2iloc:13,cli2ncov:13,cli_df:13,cli_snp:13,cli_tru:13,cli_var:13,client_count:13,clients_snap:13,cliff:14,clone:8,close:[1,13],cmap:[10,11,12,13],col:13,col_nam:13,collect:13,color:[9,10,11,12,13],column:[1,5,10,11,12,13],colun:13,com:[7,8,9,10,11,12,13,14],combin:[1,10],command:8,committe:13,compar:[10,13],compenvurbsi:14,compil:[9,10,11,12,13],complet:13,complex:14,compon:[1,5,15],compos:9,compris:1,comput:[1,2,9,14],compute_distance_to_vertic:1,compute_snap_dist:1,concav:13,concave_hul:13,conda:[9,10,11,12,13],conduct:1,confer:14,config:8,configur:13,connect:[1,14,15],connexion:14,consequ:1,constantin:14,constr:13,constrain:1,constraint:[13,14],construct:14,contain:[1,4,8],contigu:1,contiguityweight:[1,9],continu:13,contraint:13,contribut:8,control:1,convent:1,convert:[4,9,13],coord:[1,9,10,12],coordin:[1,4,9,13],coral:13,core:[1,9,10,11,12,13],corner:13,correct:1,corrupt:13,cost1_1:13,cost1_2:13,cost1_3:13,cost:1,cost_matrix:13,count:[1,13],count_per_link:[1,9],cov_count:13,cover:14,coverag:13,cpu:[9,10,11,12,13],cpython:[9,10,11,12,13],cr74:[14,15],creat:[1,3,6,8],create_patch:13,crime:[1,9],crimes_fil:1,crs:13,current:[1,3,8,9,13],custom:1,cyan:13,d2d_dist:[1,12],daniel:14,darkcyan:13,darkgoldenrod:13,darkslategrai:13,darwin:[9,10,11,12,13],das13:[1,14],daskin:[13,14],data:[1,4,7,8],dataset:[1,13],david:[7,14],db14:[1,14],decid:13,decim:1,decis:13,declar:[1,5],decompress:8,def:13,default_dict:4,defin:1,degre:1,demonstr:1,demostr:15,denni:14,densiti:13,depend:8,dependeci:[9,10,11,12,13],depth:1,deriv:9,descart:[10,13],descript:13,desir:[1,5,13],destin:[1,8,13],destpattern:[1,13],detail:[1,8],develop:7,diagon:1,dict:[1,4,5,9,13],dict_kei:1,dictionari:1,differ:9,digit:1,dij59:[1,14],dijkstra:14,dimens:[6,13],dir:9,directli:1,directori:[1,3],discret:[13,14],discuss:1,disk:[1,2,3],displai:[9,10,11,12,13],dist:[1,13],dist_snap:9,dist_to_vertex:[4,9],distanc:[1,4,9,14],distance_matrix:1,distancebandweight:1,distirbut:9,distribut:[1,8],divis:1,docsrc:[9,10,11,12,13],doe:[1,5],doi:[7,14],dominiqu:14,done:9,download:8,dtype:[1,5],ducruet:14,due:13,duplic:1,duqu:14,dv_color:13,dv_colorset:13,dvs:13,dvs_to_leg:13,dynam:14,each:[1,4,13],econom:14,econometr:14,edg:[1,9,10],edge_length:1,edgecolor:13,edit:14,editor:14,effect:14,ei_sim:9,eiselt:14,either:[1,4,5],ejor:14,elco:14,element:[1,5,9,13],element_as_gdf:[9,10,11,12,13],elif:13,els:13,elsevi:14,emerg:[13,14],empti:13,encount:9,encyclopedia:14,end:1,englewood:14,ensur:8,entri:[7,10],enum_links_vertex:1,enumer:[1,9,13],env:11,environ:[8,14],epsg:13,equal:[1,13],equit:13,esda:[1,14],euclidean:1,european:14,event:7,everi:[9,13],exact:1,exactli:1,examin:5,exampl:[1,3,5,6,9,10,12],except:[1,5,9,10,11,12,13],exclud:[1,4,13],exist:[1,5],explan:13,explicityli:13,explor:[9,14],exportmodelaslpformat:13,extend:13,exterior:6,extra:13,extract:[1,5],extract_compon:1,extractgraph:1,f_arrai:13,fac2cli:13,fac2iloc:13,fac2selectcount:13,fac:13,fac_df:13,fac_snp:13,fac_tru:13,fac_var:13,facecolor:13,facil:[7,14,15],facilit:13,facilities_snap:13,facility_count:13,facilitylocationmodel:13,fals:[1,4,5,6,9,10,13],famili:13,fancybox:[10,13],fdv:13,fdv_label:13,feasibl:13,feet:1,fernand:14,fetch:1,field:4,fig:13,figsiz:[9,10,11,12,13],figur:[9,13],file:[1,2,3,13],filenam:[1,2,3],fill:[1,13],fill_diagon:1,filler:13,fillna:13,filterwarn:[9,13],find:1,first:[1,5],fix:1,flag:[1,4,6],flatten:13,fletcher:14,flow:[1,14],folch:[7,14],folder:8,follow:[1,7,8],folow:13,fontsiz:[9,10,13],fontstyl:13,fontweight:13,for_multiplot:13,forg:[8,10,11,12,13],fork:8,form:[1,4,6,9],format:13,formul:13,forth:13,foti:14,found:[9,10,12,13],four:13,framealpha:[10,13],framework:14,fran:14,franci:14,fre:[1,9],free:[8,13],freewai:14,from:[1,2,3,4,5,7,14],fuchsia:13,full:[1,3,6,9,13],full_distance_matrix:1,fulli:[9,11],fundament:13,futur:4,fwl12:[1,14],gaboardi2018:7,gaboardi:[7,9,10,11,12,13,14],gean:14,gen_tre:[1,12],gener:[1,4,6,10,11,14,15],geo:14,geocod:1,geoda:14,geodaspac:14,geodatafram:[1,4,5,13],geoff:14,geograph:[1,4,13,14],geographi:14,geojson:9,geom:13,geom_col:5,geometr:[1,12],geometri:[1,5,10,11,12,13],geopanda:[1,4,5,13],geoseri:13,geospati:14,get_buff:13,get_fram:13,get_path:[1,3,5,9,10,12,13],get_xlim:13,get_ylim:13,getattr:13,gfh19:[1,14],git:8,github:[7,8],give:13,given:1,gmail:[9,10,11,12,13],going:13,graph:[1,13,14],graph_component2edg:1,graph_component_is_r:1,graph_component_label:1,graph_n_compon:1,gre:[1,9],greater:1,green:13,grid:6,grow:13,guid:[7,14],hagberg:14,haggett:14,hak64:[14,15],hakimi1964:[],hakimi:[13,14],half:1,hall:14,handbook:14,handl:[10,13],has:[1,5,13],have:[1,8,9,13],head:13,heavi:13,help:[1,4],here:[1,7,8],higher:1,highlight:13,histogram:1,horner:14,household:13,how:[1,8,13],howev:[1,13],hspace:13,hss08:[1,14],http:[7,8,14],hull:13,human:14,i386:[9,10,11,12,13],id_col:5,ids:11,idvari:[1,4],idx:[1,13],ies:13,ignor:[9,13],ijgi4020815:14,ikuho:14,iloc:13,implement:14,importerror:[9,10,11,12,13],in_data:[1,4,9,10,11,12,13],inc:[13,14],incid:[1,4,9],includ:[1,4,9],inclus:7,increment:9,index:[1,12,13],indexerror:1,indic:[1,4,13],individu:13,infin:13,info:13,inform:[1,4,13,14],initi:[1,4],inlin:[9,10,11,12,13],innov:14,inplac:13,input:[1,4,13],instal:[7,9,10,11,12,13],instanc:[1,3],instanti:[1,5],int32:1,integ:[1,13],interact:[9,10,11,12,13],intern:14,interpattern:1,interpret:[9,10,11,12,13],intersect:13,intrapattern:1,introduc:13,intvar:13,invalid:9,invers:1,ipynb:[9,10,11,12,13],ipython:[9,10,11,12,13],isbn:14,isin:[11,13],isinst:1,island:[1,11],isol:1,ispr:14,ital:13,item:13,iter:[1,4,13],itm:14,its:[8,9,13],itself:1,ivar:13,jacqu:14,jai:7,jame:[7,9,10,11,12,13,14],januari:14,jarrod:14,jason:14,jgaboardi:[9,10,11,12,13],jlaura:1,joe:14,john:[7,13,14],journal:14,juli:14,julia:14,just:13,jvar:13,kang:[7,14],keep:1,keep_zero_dist:1,kegan:14,kei:[1,4,9,13],keiichi:14,keyerror:[5,13],keyword:[1,7,10],kitchin:14,know:1,kok:14,kokichi:14,koschinski:14,kre:[1,9],krut09:[1,14],kubi:14,kwarg:10,labb:14,labbept95:[1,14],label:[1,5,9,10,13],label_calc:13,lambda:[12,13],larg:[9,10,13],larger:[9,13],latex:13,lattic:[6,15],laura:[7,14],laurent:14,lavend:13,least:13,leav:13,left:[1,4,12,13],legend:[9,13],legend_aux:13,lemi:14,len:[1,9,13],length:[1,5,9,13],less:9,lesser:1,level:[1,13],levi:7,lfl:13,lib:11,libpys:[1,3,4,5,6,9,10],librari:[7,13,14],light_palett:13,lightskyblu:13,like:[1,9],limegreen:13,line2d:[10,13],line:[5,6,10,11,13],linear:13,linear_solv:13,linestr:[5,11,13],linewidth:[9,11,12,13],link:[1,7,8],list:[1,4,6,9,13],listedcolormap:13,littl:13,load:[1,2],load_ext:[9,10,11,12,13],loadnetwork:1,loc:[5,9,13],local:[8,13],locat:[1,4,5,7,12,14,15],london:14,longleftarrow:13,longrightarrow:13,lookup:[1,4,13],loop:1,low:14,lower:[1,9,13],lowerbound:1,lowerenvelop:[1,9],lp_formul:13,lscp:13,ltd:14,luc:14,lumnitz:14,luxen:14,machin:[9,10,11,12,13],made:1,magnanti:14,mai:[1,4,9,13],mainten:13,make:8,malizia:14,manag:[8,14],mani:1,manner:13,map:13,marc:14,mark:14,markdown:13,marker:[10,11,12,13],markeredgecolor:13,markers:[9,10,11,12,13],martin:14,mask:1,match:13,mathematik:14,matplotlib:[9,11,12,13],matrix:[1,11],max:13,max_coverag:13,maxim:14,maximum:[1,13],mclp:13,mdl:13,mean:[1,13],mean_dist:13,mean_mean:13,mean_std:13,measur:14,median:14,mediumseagreen:13,mediumvioletr:13,member:13,membership:13,mention:1,mere:13,messag:[9,11,13],meter:[9,13],method:[1,4,7,13,14],metropolitan:14,mhwang4:14,millisecond:13,millman:14,mimic:13,min:13,min_coverag:13,miniconda3:11,miniconda:8,minim:[8,13],minimum:[1,13],minut:13,misc:7,mline:[10,13],mlyon:14,mnsc:14,model:[1,14,15],model_nam:13,modern:14,modul:7,monkei:4,mont:9,month:7,moran:1,more:[1,13],most:[8,13],most_coverag:13,move:13,mpatch:13,mpsolver:13,ms1:13,ms2:13,msize:13,multi_plott:13,multipl:13,multiplot:13,must:[1,5,13],mynetwork:[1,3],n200:[1,9],n_cli:13,n_cli_uncov:13,n_fac:13,n_process:1,name:[1,5,12,13],nan:[1,12,13],napt:11,navig:8,ncli:13,ncov2ncli:13,ncov:13,ndarrai:[1,13],nearest:[1,4,13,14],nearestneighbordist:1,need:9,neg:1,neighbor:[1,9,13,14],neighborhood:13,net:5,nethod:14,netvtx1:4,netvtx2:4,network:[4,5,14,15],network_component2arc:1,network_component_is_r:1,network_component_label:[1,5],network_n_compon:[1,11],network_tre:1,networkf:[1,9],networkg:[1,9],networkk:[1,9],networkx:[1,14],never:1,new_lin:11,newli:[1,7],next:1,nigel:14,nline:6,no_fac:13,node:[1,9,10],non:[1,13],non_articulation_point:[1,11],non_articulation_vertic:11,non_obj_v:13,none:[1,4,5,13],north:13,note:[1,4,5,9,14],notebook:[9,10,11,12,13],notin:13,now:1,npoint:[1,4,9],npt:[1,9],nsnap:10,nstep:1,ntrue:10,ntw:[1,3,5,9,10,11,12,13],number:[1,4,6,9,13],numerisch:14,numpi:[1,9,13],numvar:13,obj:13,obj_val:13,object:[1,2,4,5,6],obliqu:12,obs_id1:4,obs_id2:4,obs_idn:4,obs_on:1,obs_to_arc:[1,4,9],obs_to_edg:1,obs_to_vertex:[4,9],observ:[1,4,5],obtain:8,oct:7,ois:14,okab:14,okunuki:14,one:[1,6,13],onli:[1,8],onlin:[9,10,11,12,13],onto:1,oos06:[1,14],opaqu:9,open:[7,8,13,14],oper:[8,13,14],operations_research:13,opr:14,optim:[7,14,15],optimum:[13,14],option:1,ord:13,order:[5,13],ordereddict:13,org:14,orig_counts_per_link:9,origin:[1,4,7,13],orlin:14,os12a:[1,14],os12b:[1,14,15],os12c:[1,14,15],os12d:[1,14],osmnx:[1,14],osullivanu10:[1,14,15],other:[1,13],otherwis:1,out:[1,3],out_data:13,outcom:14,outsid:13,oxford:14,oy01:[1,14,15],p_facil:13,p_norm:9,p_rand:9,p_sim:9,p_z_sim:9,packag:11,pad:13,page:[9,10,11,12,13,14],pahl:14,pair:[4,12],panda:13,pandana:1,paper:[13,14],paramet:[1,2,3,4,5,6],part:[5,9,10,12,13,14],pasadena:14,pass:[1,9,10,11,12,13],patch:[4,13],path:[1,3,4,5,13,15],paths_gdf:12,pattern:[1,4,5,14],paul:14,pcolor:13,pcp:13,pcp_sol:13,pdf:14,peachpuff:13,pedestrian:14,peeter:14,per:1,perc_serv:13,percent:13,percentag:13,perform:[1,9,13],permut:[1,9],person:13,philip:7,physic:14,physrep:14,pieter:14,pip:[8,13],pkl:[1,3],plabel:13,place:1,plan:13,pleas:[8,9,10,11,12,13],plot:9,plot_aux:13,plot_bas:13,plot_r:13,plotter:13,plt:[9,10,12,13],plus1:11,plus2:11,pmarker:13,pmp:13,png:13,point:[1,4,5,14],point_id:1,pointid:9,pointpattern:[1,5,9,10,13],poisson:1,polygon:13,popul:1,posit:1,post2:13,postiv:1,potenti:1,pp_name:[1,5,10,12,13],pp_ob:12,pp_obs_snap:12,practic:14,pre:[1,2],precomput:9,predetermin:13,prefer:13,prentic:14,present:13,press:14,print:[9,10,13],print_result:13,print_sol:13,print_solut:13,problem:14,proceed:14,processor:[9,10,11,12,13],profession:14,professor:13,program:13,project:13,properti:[9,14],propos:7,provid:[1,7,13],proxi:13,prune:1,pseudo:13,psize:13,pt1_size:13,pt2_size:13,pt_str:1,pts_arrai:13,publish:13,pull:8,put:13,py3_spgh_dev:11,pyplot:[9,10,12,13],pysal:[4,7,8,14,15],python3:11,python:[7,14],pywraplp:13,quantit:14,queri:1,r_cli:13,r_fac:13,ra07:[1,14],radiu:13,rais:[1,5,13],ral:[1,14],randint:13,random:1,random_pt:1,random_se:13,rang:13,rarrow:13,ravindra:14,raw:[1,5,9],re05:[14,15],read:[9,13],read_fil:13,readm:[9,10,11,12,13],reason:1,rebuild:1,reconstruct:1,record:[1,13],record_decis:13,red:[9,12],refer:[1,7,9,10,11,12,13],regard:1,regener:9,region:[13,14],regular:[6,15],regular_lattic:12,rei:[7,14],rel:9,relat:1,relationship:[13,14],releas:[9,10,11,12,13],release_900:[9,10,11,12,13],remaind:1,remedi:1,rememb:13,remov:1,replac:4,repo:8,report:14,repres:[1,13],represent:[1,7,13],request:[1,8],requir:[5,8,9,10,11,12,13],res:[1,9],res_to_plot:13,research:[9,10,11,12,13,14],reshap:13,resid:13,respect:13,result:1,retain:1,retina:[9,10,11,12,13],revel:[13,14],revelle1970:[],revelle2005:[],revers:13,review:14,richard:14,right:[1,4],ring:1,rk19:[1,14],road:13,rob:14,robert:14,rotat:13,round:[1,13],rout:[5,14],routledg:14,row:13,rrs:14,rs70:[14,15],run:8,russel:14,rwk:[1,14],s0927:14,s11067:14,s2d_dist:1,s2s_dist:1,saddlebrown:13,same:1,sampl:1,sanet:[1,14],sar:14,save:[1,2,3],save_fig:13,savefig:13,savenetwork:1,scale:[13,14],scatterpoint:10,scenario:1,schmidt:[7,14],scholasticahq:14,school:[1,9,12],schools_fil:1,schult:14,scienc:[8,13,14],scientif:7,scipi:14,scrime:10,seaborn:13,second:14,see:[1,4,5,13],seed:13,segm_counts_per_link:9,segment:[1,6,13],sei_norm:9,sei_rand:9,sei_sim:9,sel:13,select:8,selection_df:13,selection_displai:13,selection_matrix:13,selet:13,self:[1,2,3,4,13],semi:9,separ:8,sergio:[7,14],serv:13,serv_label:13,servic:[13,14],service_area:13,set2:11,set:[1,5,6,8,9,10],set_aspect:13,set_capt:13,set_facecolor:13,set_matplotlib_format:[9,10,11,12,13],set_titl:13,seth:14,shape:[1,5,13],shapefil:[1,4,9,13],sharei:13,sharex:13,she:13,shell:8,shino:14,shiod:14,shortest:[1,5,15],shortest_path:[1,5,12],should:[1,3,9,13],show:[1,9],shown:1,shp:[1,3,5,12,13],signatur:[1,4],signific:1,sij:13,sim:[1,9],sim_pt:13,simpl:[11,12],simplifi:[1,4],simul:1,simulate_observ:[1,9],simulated_geo_point:13,simulated_points_al:13,simulated_points_list:13,simulatedpointpattern:1,sinc:[9,13],singl:[1,4,9,13],site:[11,13],size:[12,13],skip:1,slightli:13,small:9,smoother:13,snap:[1,4,5],snap_dist:[1,4],snapobserv:[1,9,10,12,13],snapped_coordin:[4,9,10],snapped_crimes_df:10,snapped_schools_df:10,snkit:[1,14],softwar:1,solution_valu:13,solve_minut:13,solver:13,solver_inst:13,son:[13,14],sort:[1,13],sourc:[1,2,3,4,5,6,7,8],sourcepattern:[1,13],space:13,spacer:13,spaghetti:[11,12,15],spatial:[1,14,15],specif:[1,4,8,13],specifi:[1,13],split:[1,13],split_arc:[1,9],split_network:1,squeez:13,sschool:10,standard:1,stastist:13,stat:13,state:14,std:13,stdout:13,step:[1,13],stephen:[7,14],still:[1,9],stipul:13,store:[1,4],str:[1,2,3,4,5,13],strbuff:13,street:[1,3,5,9,10,12,14],streets_buff:13,streets_fil:1,strict:8,string:1,structur:[13,14],stub:4,studi:14,style:[6,12,13],styler:13,styliz:13,submit:8,subplot:13,subplots_adjust:13,subset:13,sugihara:14,sullivan:14,sum:[1,5,9,13],supplement:13,suppli:9,support:[8,13],suptitl:13,sure:8,survei:14,sussex:14,swain:[13,14],swart:14,swig:13,symbol:13,synth_ob:12,synthesi:14,sys:13,system:[8,9,10,11,12,13,14],tab20:10,tac:6,tag:[4,9,10,11,13],tansel:14,tar:8,tb00448:14,tb00902:14,tcc:14,tcrime:10,term:1,text:13,tfl83:[1,14],than:[1,13],them:[1,13],theoret:[1,7,9],theori:[1,7,14],therefor:13,thi:[1,3,4,5,8,10,11,12],thiss:14,thistl:13,thoma:14,those:4,thought:1,threshold:1,thrift:14,through:[1,7,8,9,10,12],tic:6,tiernei:14,time:[13,14],timothi:14,titl:[7,9,13],to_cr:13,to_fil:13,toe:6,tolist:13,tom:14,tomalrussel:14,toolbox:14,top:[1,13],topolog:[9,14],torega:[13,14],toregas1971:[],toregas1972:[],total:[1,5,13],total_bound:13,toward:13,tr72:[14,15],translat:13,transpar:13,transport:14,travel:[13,14],travi:14,tree:1,tree_nearest:1,true_crimes_df:10,true_schools_df:10,truncat:1,tschool:10,tsrb71:[14,15],tupl:[1,4,13],turn:13,tutori:7,two:[1,4,14],type:[1,4,13],typeerror:13,unary_union:13,uncov:13,under:[7,13,14],understand:9,unforseen:13,uniform:[1,9,13],union:13,uniqu:1,unique_arc:1,unit:[1,13],univers:13,unless:1,unseg:9,unselect:13,unwin:14,upchurch:14,updat:[10,13],upper:[1,9,13],upperbound:1,upperenvelop:9,urban:14,url:[7,14],usa:14,usag:7,use:[4,7],used:[1,4,9,10,11,12,13],user:[9,11],userwarn:11,using:[1,7,8,14],usr_warn:13,util:1,valid:1,valu:[1,4,9,13],valueerror:13,var_index:13,vari:13,variabl:[1,4,5,13],varoquaux:14,vaught:14,vector:[1,9,13],version:[9,10,11,12,13],vertex:[1,5,9,12],vertex_coord:[1,9],vertex_list:1,vertex_sig:1,vertic:[1,4,5,6,12],vertices200_df:9,vertices_df:[5,9,10,11],vi_norm:9,vi_rand:9,vi_sim:9,view:[13,14],visual:[13,14,15],volum:14,volunt:13,vstack:13,vtx0:1,vtx1:1,w_compon:1,w_graph:1,w_network:1,waddel:14,walk:[9,10,11,12],walltim:13,warn:[8,9,13],watermark:[9,10,11,12,13],web16:[1,14],weber:14,wei:7,weight:[1,11,12],wenwen:14,west:14,when:[1,4,5,8,13],where:[1,2,3,13],whether:[1,4],which:[1,9],white:13,wilei:[13,14],within:[1,4,5,13],without:[1,6],wolf:[7,14],work:11,worst:13,would:[1,6,7],wriglei:14,write:13,write_lp:13,wspace:13,x1_1:13,x1_2:13,x1_3:13,x2_1:13,x3_1:13,x86_64:[9,10,11,12,13],xaxi:9,xun:14,yamada:14,year:7,york:13,you:[7,8],your:[8,9,10,11,12,13],z2ss:9,z_norm:9,z_rand:9,z_sim:9,zenodo:[7,14],zero:[1,9,13],zorder:[10,11,12,13]},titles:["API reference","spaghetti.Network","spaghetti.Network.loadnetwork","spaghetti.Network.savenetwork","spaghetti.PointPattern","spaghetti.element_as_gdf","spaghetti.regular_lattice","spaghetti","Installation","Advanced pysal.spaghetti tutorial","Basic pysal.spaghetti tutorial","Connected components in a spatial network","Generating regular lattices and visualizing shortest paths","Demostrating network-based optimal facility location modeling","References","Tutorials"],titleterms:{"4x4":12,"case":9,"class":13,"function":[9,13],"new":11,"true":10,"while":11,The:11,abov:[11,13],add:11,advanc:9,all:[11,13],alloc:[9,10],alpha_shap:13,also:11,analysi:9,analyt:13,analyz:13,api:0,arc:[9,10,11,12],articul:11,attribut:[10,11],base:[11,13],basic:10,becaus:11,being:12,best:13,between:11,calcul:[9,13],can:11,candid:13,cbc:13,center:13,chain:[11,12],cite:7,client:13,close:11,cluster:9,collect:11,commun:13,comp_label:11,comparis:13,comparison:10,compon:11,conda:8,connect:11,constrain:9,context:12,coordin:10,cost:13,count:9,cover:13,creat:[9,10,11,12,13],creation:0,crime:10,data:[12,13],datafram:13,dataset:12,defin:13,degre:11,demand:13,demonstr:[9,12],demostr:[12,13],develop:8,digit:9,directli:11,disconnect:11,distanc:13,distinct:11,element:12,element_as_gdf:5,empir:[12,13],empric:[12,13],esda:9,exampl:13,extract:[0,9,11,12],facil:13,featur:0,feedstock:8,feet:9,fetch:13,field:11,file:[9,10],form:11,found:11,from:[9,10,11,12,13],gener:[9,12,13],geodatafram:[9,10,11,12],geopanda:[9,10,11,12],get:11,graph:[7,9],has:11,here:11,highli:8,hous:13,identifi:11,index:8,infer:7,inspect:11,instal:8,instanc:13,instanti:[0,9,10,11,12,13],instead:9,integr:13,intens:9,label:[11,12],lai:13,lattic:12,legend:10,libpys:[11,12,13],link:9,load:0,loadnetwork:2,locat:[10,13],loop:11,make:11,matplotlib:10,matrix:13,maxim:13,median:13,minimax:13,model:13,moran:9,need:13,network:[0,1,2,3,7,9,10,11,12,13],network_component2arc:11,nework:13,non:11,note:12,now:11,object:[9,10,11,12,13],observ:[9,10,12],onli:11,optim:13,origin:10,ortool:13,other:11,out:[11,13],packag:8,paramet:13,part:11,patch:10,path:12,pattern:[9,12],per:[9,13],plot:[10,11,12,13],point:[9,10,11,12,13],pointpattern:4,problem:13,pysal:[9,10,13],python:8,random:13,randomli:13,recommend:[8,13],refer:[0,14],regular:12,regular_lattic:6,represent:9,result:13,ring:11,rout:12,same:12,save:0,savenetwork:3,scenario:13,school:10,see:11,segment:9,select:13,set:13,sever:12,shortest:12,shp:[9,10],simul:9,slice:11,snap:[9,10,12,13],solut:13,solv:13,spaghetti:[1,2,3,4,5,6,7,8,9,10,13],spatial:[7,9,11,13],split:9,street:13,suit:13,symbol:11,synthet:[12,13],tag:12,test:[9,12],thei:11,them:12,thi:[9,13],think:13,through:11,topolog:7,tree:12,tutori:[9,10,15],two:11,use:13,using:9,util:13,valu:11,version:8,vertex:11,vertic:[9,10,11],via:8,visual:[9,10,11,12],warn:11,weight:13,which:13,within:12,without:10,would:13,you:13}}) \ No newline at end of file +Search.setIndex({docnames:["api","generated/spaghetti.Network","generated/spaghetti.Network.loadnetwork","generated/spaghetti.Network.savenetwork","generated/spaghetti.PointPattern","generated/spaghetti.element_as_gdf","generated/spaghetti.regular_lattice","index","installation","notebooks/Advanced-spaghetti-tutorial","notebooks/Basic-spaghetti-tutorial","notebooks/Connected-components","notebooks/Shortest-path-visualization","notebooks/Use-case-facility-location","references","tutorials"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1,nbsphinx:1,sphinx:56},filenames:["api.rst","generated/spaghetti.Network.rst","generated/spaghetti.Network.loadnetwork.rst","generated/spaghetti.Network.savenetwork.rst","generated/spaghetti.PointPattern.rst","generated/spaghetti.element_as_gdf.rst","generated/spaghetti.regular_lattice.rst","index.rst","installation.rst","notebooks/Advanced-spaghetti-tutorial.ipynb","notebooks/Basic-spaghetti-tutorial.ipynb","notebooks/Connected-components.ipynb","notebooks/Shortest-path-visualization.ipynb","notebooks/Use-case-facility-location.ipynb","references.rst","tutorials.rst"],objects:{"spaghetti.Network":{NetworkF:[1,1,1,""],NetworkG:[1,1,1,""],NetworkK:[1,1,1,""],__init__:[1,1,1,""],allneighbordistances:[1,1,1,""],compute_distance_to_vertices:[1,1,1,""],compute_snap_dist:[1,1,1,""],contiguityweights:[1,1,1,""],count_per_link:[1,1,1,""],distancebandweights:[1,1,1,""],enum_links_vertex:[1,1,1,""],extract_components:[1,1,1,""],extractgraph:[1,1,1,""],full_distance_matrix:[1,1,1,""],loadnetwork:[2,1,1,""],nearestneighbordistances:[1,1,1,""],savenetwork:[3,1,1,""],shortest_paths:[1,1,1,""],simulate_observations:[1,1,1,""],snapobservations:[1,1,1,""],split_arcs:[1,1,1,""]},"spaghetti.PointPattern":{__init__:[4,1,1,""]},spaghetti:{Network:[1,0,1,""],PointPattern:[4,0,1,""],element_as_gdf:[5,2,1,""],regular_lattice:[6,2,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","function","Python function"]},objtypes:{"0":"py:class","1":"py:method","2":"py:function"},terms:{"013617549x":14,"0x11c5f0320":9,"0x11d553048":9,"20t16":[9,10,11],"20t23":13,"24t19":12,"25km":13,"4th":14,"4x4":6,"5x5":6,"64bit":[9,10,11,12,13],"66667e":13,"7th":14,"8km":13,"case":[1,13],"class":[1,4],"default":[1,4,5,6,9,13],"final":[9,10,11,12,13],"float":[1,9,13],"function":[1,5,14],"import":[1,3,5,6,9,10,11,12,13],"int":[1,4,6,13],"new":[1,13,14],"public":7,"return":[1,2,5,6,13],"static":[1,2],"super":13,"switch":[13,14],"true":[1,4,5,6,9,11,12,13],"try":[9,10,11,12,13],"while":[1,13],And:1,For:[1,6],IDs:[1,4,5],Its:14,That:1,The:[1,2,3,4,6,13,14],Their:14,There:[1,11,13],Use:[1,13],Using:[1,8],With:1,__class__:9,__delattr__:9,__dict__:9,__dir__:9,__doc__:9,__eq__:9,__format__:9,__ge__:9,__getattribute__:9,__gt__:9,__hash__:9,__init__:[1,4,9,13],__init_subclass__:9,__le__:9,__lt__:9,__module__:9,__ne__:9,__new__:9,__reduce__:9,__reduce_ex__:9,__repr__:9,__setattr__:9,__sizeof__:9,__str__:9,__subclasshook__:9,__weakref__:9,_highlight_membership:13,_moran__calc:9,_moran__mo:9,_redirect_to_fil:13,_shellmodel:13,_sol:13,_statist:9,_subplot:13,abov:[1,7,8],abs_max:13,abs_min:13,absolut:[13,14],access:[1,14],accur:[1,4],acord:13,acquir:14,activ:7,adapt:13,add:[10,13],add_constr:13,add_legend:13,add_north_arrow:13,add_obj:13,add_result:13,add_scal:13,add_to_legend:13,add_to_plot:13,add_var:13,added:5,addtion:[9,10,11,12,13],adjac:[1,9],adjacencylist:1,advanc:15,afford:13,ahuja:14,ai_sum:13,aij:13,algorithm:[13,14],all:[1,4,8,10],all_dist:1,allneighbordist:[1,12,13],along:[1,4,5,14],alpha:[9,10,12,13],alpha_shape_auto:13,alreadi:5,also:[1,5,8,13],alwai:[1,13],amo93:[1,14],anaconda:8,analysi:[1,7,13,14],analyt:[1,14],analytics_df:13,analytics_displai:13,analytics_matrix:13,analyz:14,anchor:13,ani:[1,9,10,11,12,13],annot:12,anoth:1,anselin:14,api:7,appear:13,append:13,appli:[12,13],applic:[13,14],appreci:7,approxim:1,ar14:[1,14],arc:[1,4,5],arc_length:[1,9],arcs200_df:9,arcs_df:[5,9,10,11],area:13,arg:10,argument:[1,10],aric:14,arrai:[1,12,13],arriba:14,arrow:13,art:14,articl:14,articul:1,articulation_vertic:11,arw:13,as_cmap:13,ask:13,assign:[1,13],associ:[1,5,13,14],assum:1,astyp:13,atsuyki:14,atsuyuki:14,attempt:[1,13],attr:13,attribut:[1,4,5,9,13],attributeerror:[1,13],august:14,author:[4,7,9,10,11,12,13],aux_to_plot:13,avail:1,averag:13,avoid:8,axarr:13,axes:13,axessubplot:13,axi:[12,13],b978:14,background:13,background_gradi:13,barbaro:14,barth:14,barthelemy11:[1,14],base:[1,7,9,10,12,15],basic:[1,14,15],bbox:13,bbox_prop:13,bbox_to_anchor:[10,13],beauguitt:14,becaus:1,been:[1,13],being:[1,5,9,13],bel:14,believ:[1,13],bennett:14,bergman:[13,14],best:9,between:[1,5,9,13],bf01386390:14,bibtex:7,binari:[1,2,3,9,13],blue:9,blueviolet:13,board:14,boe17:[1,14],boe:14,boiler:13,bold:12,book:13,bool:[1,4,5,6,13],both:[1,5],bottom:12,bound:1,boxstyl:13,bridg:1,bring:13,british:14,budget:13,buff:13,buffer:13,bug:1,build:[7,9,13],build_:13,build_lscp:13,build_mclp:13,build_pcp:13,build_pmp:13,by_col:9,c_arrai:13,calc:13,calcul:[1,5],call:[1,9],can:[1,5,8,13],carlo:9,cbc_mixed_integer_program:13,cbo9781107415324:14,ccv:13,cdv:13,cdv_label:13,cell:13,center:[12,14],central:[13,14],centric:1,centroid:12,ch3:14,ch5:14,ch6:14,ch81:[1,14],chain:[1,6],chang:8,channel:8,channel_prior:8,chapter:14,charl:[7,13,14],chicago:14,chose:13,church1974:[],church:[13,14],cij:13,citat:[7,15],cite:[9,10,11,12,13],clang:[9,10,11,12,13],cli2fac:13,cli2iloc:13,cli2ncov:13,cli_df:13,cli_snp:13,cli_tru:13,cli_var:13,client_count:13,clients_snap:13,cliff:14,clone:8,close:[1,13],cmap:[10,11,12,13],col:13,col_nam:13,collect:13,color:[9,10,11,12,13],column:[1,5,10,11,12,13],colun:13,com:[7,8,9,10,11,12,13,14],combin:[1,10],command:8,committe:13,compar:[10,13],compenvurbsi:14,compil:[9,10,11,12,13],complet:13,complex:14,compon:[1,5,15],compos:9,compris:1,comput:[1,2,9,14],compute_distance_to_vertic:1,compute_snap_dist:1,concav:13,concave_hul:13,conda:[9,10,11,12,13],conduct:1,confer:14,config:8,configur:13,connect:[1,14,15],connexion:14,consequ:1,constantin:14,constr:13,constrain:1,constraint:[13,14],construct:14,contain:[1,4,8],contigu:1,contiguityweight:[1,9],continu:13,contraint:13,contribut:8,control:1,convent:1,convert:[4,9,13],coord:[1,9,10,12],coordin:[1,4,9,13],coral:13,core:[1,9,10,11,12,13],corner:13,correct:1,corrupt:13,cost1_1:13,cost1_2:13,cost1_3:13,cost:1,cost_matrix:13,count:[1,13],count_per_link:[1,9],cov_count:13,cover:14,coverag:13,cpu:[9,10,11,12,13],cpython:[9,10,11,12,13],cr74:[14,15],creat:[1,3,6,8],create_patch:13,crime:[1,9],crimes_fil:1,crs:13,current:[1,3,8,9,13],custom:1,cyan:13,d2d_dist:[1,12],daniel:14,darkcyan:13,darkgoldenrod:13,darkslategrai:13,darwin:[9,10,11,12,13],das13:[1,14],daskin:[13,14],data:[1,4,7,8],dataset:[1,13],david:[7,14],db14:[1,14],decid:13,decim:1,decis:13,declar:[1,5],decompress:8,def:13,default_dict:4,defin:1,degre:1,demonstr:1,demostr:15,denni:14,densiti:13,depend:8,dependeci:[9,10,11,12,13],depth:1,deriv:9,descart:[10,13],descript:13,desir:[1,5,13],destin:[1,8,13],destpattern:[1,13],detail:[1,8],develop:7,diagon:1,dict:[1,4,5,9,13],dict_kei:1,dictionari:1,differ:9,digit:1,dij59:[1,14],dijkstra:14,dimens:[6,13],dir:9,directli:1,directori:[1,3],discret:[13,14],discuss:1,disk:[1,2,3],displai:[9,10,11,12,13],dist:[1,13],dist_snap:9,dist_to_vertex:[4,9],distanc:[1,4,9,14],distance_matrix:1,distancebandweight:1,distirbut:9,distribut:[1,8],divis:1,docsrc:[9,10,11,12,13],doe:[1,5],doi:[7,14],dominiqu:14,done:9,download:8,dtype:[1,5],ducruet:14,due:13,duplic:1,duqu:14,dv_color:13,dv_colorset:13,dvs:13,dvs_to_leg:13,dynam:14,each:[1,4,13],econom:14,econometr:14,edg:[1,9,10],edge_length:1,edgecolor:13,edit:14,editor:14,effect:14,ei_sim:9,eiselt:14,either:[1,4,5],ejor:14,elco:14,element:[1,5,9,13],element_as_gdf:[9,10,11,12,13],elif:13,els:13,elsevi:14,emerg:[13,14],empti:13,encount:9,encyclopedia:14,end:1,englewood:14,ensur:8,entri:[7,10],enum_links_vertex:1,enumer:[1,9,13],env:11,environ:[8,14],epsg:13,equal:[1,13],equit:13,esda:[1,14],euclidean:1,european:14,event:7,everi:[9,13],exact:1,exactli:1,examin:5,exampl:[1,3,5,6,9,10,12],except:[1,5,9,10,11,12,13],exclud:[1,4,13],exist:[1,5],explan:13,explicityli:13,explor:[9,14],exportmodelaslpformat:13,extend:13,exterior:6,extra:13,extract:[1,5],extract_compon:1,extractgraph:1,f_arrai:13,fac2cli:13,fac2iloc:13,fac2selectcount:13,fac:13,fac_df:13,fac_snp:13,fac_tru:13,fac_var:13,facecolor:13,facil:[7,14,15],facilit:13,facilities_snap:13,facility_count:13,facilitylocationmodel:13,fals:[1,4,5,6,9,10,13],famili:13,fancybox:[10,13],fdv:13,fdv_label:13,feasibl:13,feet:1,fernand:14,fetch:1,field:4,fig:13,figsiz:[9,10,11,12,13],figur:[9,13],file:[1,2,3,13],filenam:[1,2,3],fill:[1,13],fill_diagon:1,filler:13,fillna:13,filterwarn:[9,13],find:1,first:[1,5],fix:1,flag:[1,4,6],flatten:13,fletcher:14,flow:[1,14],folch:[7,14],folder:8,follow:[1,7,8],folow:13,fontsiz:[9,10,13],fontstyl:13,fontweight:13,for_multiplot:13,forg:[8,10,11,12,13],fork:8,form:[1,4,6,9],format:13,formul:13,forth:13,foti:14,found:[9,10,12,13],four:13,framealpha:[10,13],framework:14,fran:14,franci:14,fre:[1,9],free:[8,13],freewai:14,from:[1,2,3,4,5,7,14],fuchsia:13,full:[1,3,6,9,13],full_distance_matrix:1,fulli:[9,11],fundament:13,futur:4,fwl12:[1,14],gaboardi2018:7,gaboardi:[7,9,10,11,12,13,14],gean:14,gen_tre:[1,12],gener:[1,4,6,10,11,14,15],geo:14,geocod:1,geoda:14,geodaspac:14,geodatafram:[1,4,5,13],geoff:14,geograph:[1,4,13,14],geographi:14,geojson:9,geom:13,geom_col:5,geometr:[1,12],geometri:[1,5,10,11,12,13],geopanda:[1,4,5,13],geoseri:13,geospati:14,get_buff:13,get_fram:13,get_path:[1,3,5,9,10,12,13],get_xlim:13,get_ylim:13,getattr:13,gfh19:[1,14],git:8,github:[7,8],give:13,given:1,gmail:[9,10,11,12,13],going:13,graph:[1,13,14],graph_component2edg:1,graph_component_is_r:1,graph_component_label:1,graph_n_compon:1,gre:[1,9],greater:1,green:13,grid:6,grow:13,guid:[7,14],hagberg:14,haggett:14,hak64:[14,15],hakimi1964:[],hakimi:[13,14],half:1,hall:14,handbook:14,handl:[10,13],has:[1,5,13],have:[1,8,9,13],head:[12,13],heavi:13,help:[1,4],here:[1,7,8],higher:1,highlight:13,histogram:1,horner:14,household:13,how:[1,8,13],howev:[1,13],hspace:13,hss08:[1,14],http:[7,8,14],hull:13,human:14,i386:[9,10,11,12,13],id_col:5,ids:11,idvari:[1,4],idx:[1,13],ies:13,ignor:[9,13],ijgi4020815:14,ikuho:14,iloc:13,implement:14,importerror:[9,10,11,12,13],in_data:[1,4,9,10,11,12,13],inc:[13,14],incid:[1,4,9],includ:[1,4,9],inclus:7,increment:9,index:[1,12,13],indexerror:1,indic:[1,4,13],individu:13,infin:13,info:13,inform:[1,4,13,14],initi:[1,4],inlin:[9,10,11,12,13],innov:14,inplac:13,input:[1,4,13],instal:[7,9,10,11,12,13],instanc:[1,3],instanti:[1,5],int32:1,integ:[1,13],interact:[9,10,11,12,13],intern:14,interpattern:1,interpret:[9,10,11,12,13],intersect:13,intrapattern:1,introduc:13,intvar:13,invalid:9,invers:1,ipynb:[9,10,11,12,13],ipython:[9,10,11,12,13],isbn:14,isin:[11,13],isinst:1,island:[1,11],isol:1,ispr:14,ital:13,item:13,iter:[1,4,13],itm:14,its:[8,9,13],itself:1,ivar:13,jacqu:14,jai:7,jame:[7,9,10,11,12,13,14],januari:14,jarrod:14,jason:14,jgaboardi:[9,10,11,12,13],jlaura:1,joe:14,john:[7,13,14],journal:14,juli:14,julia:14,just:13,jvar:13,kang:[7,14],keep:1,keep_zero_dist:1,kegan:14,kei:[1,4,9,13],keiichi:14,keyerror:[5,13],keyword:[1,7,10],kitchin:14,know:1,kok:14,kokichi:14,koschinski:14,kre:[1,9],krut09:[1,14],kubi:14,kwarg:10,labb:14,labbept95:[1,14],label:[1,5,9,10,13],label_calc:13,lambda:[12,13],larg:[9,10,13],larger:[9,13],latex:13,lattic:[6,15],laura:[7,14],laurent:14,lavend:13,least:13,leav:13,left:[1,4,12,13],legend:[9,13],legend_aux:13,lemi:14,len:[1,9,13],length:[1,5,9,13],less:9,lesser:1,level:[1,13],levi:7,lfl:13,lib:11,libpys:[1,3,4,5,6,9,10],librari:[7,13,14],light_palett:13,lightskyblu:13,like:[1,9],limegreen:13,line2d:[10,13],line:[5,6,10,11,13],linear:13,linear_solv:13,linestr:[5,11,12,13],linewidth:[9,11,12,13],link:[1,7,8],list:[1,4,6,9,13],listedcolormap:13,littl:13,load:[1,2],load_ext:[9,10,11,12,13],loadnetwork:1,loc:[5,9,13],local:[8,13],locat:[1,4,5,7,12,14,15],london:14,longleftarrow:13,longrightarrow:13,lookup:[1,4,13],loop:1,low:14,lower:[1,9,13],lowerbound:1,lowerenvelop:[1,9],lp_formul:13,lscp:13,ltd:14,luc:14,lumnitz:14,luxen:14,machin:[9,10,11,12,13],made:1,magnanti:14,mai:[1,4,9,13],mainten:13,make:8,malizia:14,manag:[8,14],mani:1,manner:13,map:13,marc:14,mark:14,markdown:13,marker:[10,11,12,13],markeredgecolor:13,markers:[9,10,11,12,13],martin:14,mask:1,match:13,mathematik:14,matplotlib:[9,11,12,13],matrix:[1,11],max:13,max_coverag:13,maxim:14,maximum:[1,13],mclp:13,mdl:13,mean:[1,13],mean_dist:13,mean_mean:13,mean_std:13,measur:14,median:14,mediumseagreen:13,mediumvioletr:13,member:13,membership:13,mention:1,mere:13,messag:[9,11,13],meter:[9,13],method:[1,4,7,13,14],metropolitan:14,mhwang4:14,millisecond:13,millman:14,mimic:13,min:13,min_coverag:13,miniconda3:11,miniconda:8,minim:[8,13],minimum:[1,13],minut:13,misc:7,mline:[10,13],mlyon:14,mnsc:14,model:[1,14,15],model_nam:13,modern:14,modul:7,monkei:4,mont:9,month:7,moran:1,more:[1,13],most:[8,13],most_coverag:13,move:13,mpatch:13,mpsolver:13,ms1:13,ms2:13,msize:13,multi_plott:13,multipl:13,multiplot:13,must:[1,5,13],mynetwork:[1,3],n200:[1,9],n_cli:13,n_cli_uncov:13,n_fac:13,n_process:1,name:[1,5,12,13],nan:[1,12,13],napt:11,navig:8,ncli:13,ncov2ncli:13,ncov:13,ndarrai:[1,13],nearest:[1,4,13,14],nearestneighbordist:1,need:9,neg:1,neighbor:[1,9,13,14],neighborhood:13,net:5,nethod:14,netvtx1:4,netvtx2:4,network:[4,5,14,15],network_component2arc:1,network_component_is_r:1,network_component_label:[1,5],network_n_compon:[1,11],network_tre:1,networkf:[1,9],networkg:[1,9],networkk:[1,9],networkx:[1,14],never:1,new_lin:11,newli:[1,7],next:1,nigel:14,nline:6,no_fac:13,node:[1,9,10],non:[1,13],non_articulation_point:[1,11],non_articulation_vertic:11,non_obj_v:13,none:[1,4,5,13],north:13,note:[1,4,5,9,14],notebook:[9,10,11,12,13],notin:13,now:1,npoint:[1,4,9],npt:[1,9],nsnap:10,nstep:1,ntrue:10,ntw:[1,3,5,9,10,11,12,13],number:[1,4,6,9,13],numerisch:14,numpi:[1,9,13],numvar:13,obj:13,obj_val:13,object:[1,2,4,5,6],obliqu:12,obs_id1:4,obs_id2:4,obs_idn:4,obs_on:1,obs_to_arc:[1,4,9],obs_to_edg:1,obs_to_vertex:[4,9],observ:[1,4,5],obtain:8,oct:7,ois:14,okab:14,okunuki:14,one:[1,6,13],onli:[1,8],onlin:[9,10,11,12,13],onto:1,oos06:[1,14],opaqu:9,open:[7,8,13,14],oper:[8,13,14],operations_research:13,opr:14,optim:[7,14,15],optimum:[13,14],option:1,ord:13,order:[5,13],ordereddict:13,org:14,orig_counts_per_link:9,origin:[1,4,7,13],orlin:14,os12a:[1,14],os12b:[1,14,15],os12c:[1,14,15],os12d:[1,14],osmnx:[1,14],osullivanu10:[1,14,15],other:[1,13],otherwis:1,out:[1,3],out_data:13,outcom:14,outsid:13,oxford:14,oy01:[1,14,15],p_facil:13,p_norm:9,p_rand:9,p_sim:9,p_z_sim:9,packag:11,pad:13,page:[9,10,11,12,13,14],pahl:14,pair:[4,12],panda:13,pandana:1,paper:[13,14],paramet:[1,2,3,4,5,6],part:[5,9,10,12,13,14],pasadena:14,pass:[1,9,10,11,12,13],patch:[4,13],path:[1,3,4,5,13,15],paths_gdf:12,pattern:[1,4,5,14],paul:14,pcolor:13,pcp:13,pcp_sol:13,pdf:14,peachpuff:13,pedestrian:14,peeter:14,per:1,perc_serv:13,percent:13,percentag:13,perform:[1,9,13],permut:[1,9],person:13,philip:7,physic:14,physrep:14,pieter:14,pip:[8,13],pkl:[1,3],plabel:13,place:1,plan:13,pleas:[8,9,10,11,12,13],plot:9,plot_aux:13,plot_bas:13,plot_r:13,plotter:13,plt:[9,10,12,13],plus1:11,plus2:11,pmarker:13,pmp:13,png:13,point:[1,4,5,14],point_id:1,pointid:9,pointpattern:[1,5,9,10,13],poisson:1,polygon:13,popul:1,posit:1,post2:13,postiv:1,potenti:1,pp_name:[1,5,10,12,13],pp_ob:12,pp_obs_snap:12,practic:14,pre:[1,2],precomput:9,predetermin:13,prefer:13,prentic:14,present:13,press:14,print:[9,10,13],print_result:13,print_sol:13,print_solut:13,problem:14,proceed:14,processor:[9,10,11,12,13],profession:14,professor:13,program:13,project:13,properti:[9,14],propos:7,provid:[1,7,13],proxi:13,prune:1,pseudo:13,psize:13,pt1_size:13,pt2_size:13,pt_str:1,pts_arrai:13,publish:13,pull:8,put:13,py3_spgh_dev:11,pyplot:[9,10,12,13],pysal:[4,7,8,14,15],python3:11,python:[7,14],pywraplp:13,quantit:14,queri:1,r_cli:13,r_fac:13,ra07:[1,14],radiu:13,rais:[1,5,13],ral:[1,14],randint:13,random:1,random_pt:1,random_se:13,rang:13,rarrow:13,ravindra:14,raw:[1,5,9],re05:[14,15],read:[9,13],read_fil:13,readm:[9,10,11,12,13],reason:1,rebuild:1,reconstruct:1,record:[1,13],record_decis:13,red:[9,12],refer:[1,7,9,10,11,12,13],regard:1,regener:9,region:[13,14],regular:[6,15],regular_lattic:12,rei:[7,14],rel:9,relat:1,relationship:[13,14],releas:[9,10,11,12,13],release_900:[9,10,11,12,13],remaind:1,remedi:1,rememb:13,remov:1,replac:4,repo:8,report:14,repres:[1,13],represent:[1,7,13],request:[1,8],requir:[5,8,9,10,11,12,13],res:[1,9],res_to_plot:13,research:[9,10,11,12,13,14],reshap:13,resid:13,respect:13,result:1,retain:1,retina:[9,10,11,12,13],revel:[13,14],revelle1970:[],revelle2005:[],revers:13,review:14,richard:14,right:[1,4],ring:1,rk19:[1,14],road:13,rob:14,robert:14,rotat:13,round:[1,13],rout:[5,14],routledg:14,row:13,rrs:14,rs70:[14,15],run:8,russel:14,rwk:[1,14],s0927:14,s11067:14,s2d_dist:1,s2s_dist:1,saddlebrown:13,same:1,sampl:1,sanet:[1,14],sar:14,save:[1,2,3],save_fig:13,savefig:13,savenetwork:1,scale:[13,14],scatterpoint:10,scenario:1,schmidt:[7,14],scholasticahq:14,school:[1,9,12],schools_fil:1,schult:14,scienc:[8,13,14],scientif:7,scipi:14,scrime:10,seaborn:13,second:14,see:[1,4,5,13],seed:13,segm_counts_per_link:9,segment:[1,6,13],sei_norm:9,sei_rand:9,sei_sim:9,sel:13,select:8,selection_df:13,selection_displai:13,selection_matrix:13,selet:13,self:[1,2,3,4,13],semi:9,separ:8,sergio:[7,14],serv:13,serv_label:13,servic:[13,14],service_area:13,set2:11,set:[1,5,6,8,9,10],set_aspect:13,set_capt:13,set_facecolor:13,set_matplotlib_format:[9,10,11,12,13],set_titl:13,seth:14,shape:[1,5,13],shapefil:[1,4,9,13],sharei:13,sharex:13,she:13,shell:8,shino:14,shiod:14,shortest:[1,5,15],shortest_path:[1,5,12],should:[1,3,9,13],show:[1,9],shown:1,shp:[1,3,5,12,13],signatur:[1,4],signific:1,sij:13,sim:[1,9],sim_pt:13,simpl:[11,12],simplifi:[1,4],simul:1,simulate_observ:[1,9],simulated_geo_point:13,simulated_points_al:13,simulated_points_list:13,simulatedpointpattern:1,sinc:[9,13],singl:[1,4,9,13],site:[11,13],size:[12,13],skip:1,slightli:13,small:9,smoother:13,snap:[1,4,5],snap_dist:[1,4],snapobserv:[1,9,10,12,13],snapped_coordin:[4,9,10],snapped_crimes_df:10,snapped_schools_df:10,snkit:[1,14],softwar:1,solution_valu:13,solve_minut:13,solver:13,solver_inst:13,son:[13,14],sort:[1,13],sourc:[1,2,3,4,5,6,7,8],sourcepattern:[1,13],space:13,spacer:13,spaghetti:[11,12,15],spatial:[1,14,15],specif:[1,4,8,13],specifi:[1,13],split:[1,13],split_arc:[1,9],split_network:1,squeez:13,sschool:10,standard:1,stastist:13,stat:13,state:14,std:13,stdout:13,step:[1,13],stephen:[7,14],still:[1,9],stipul:13,store:[1,4],str:[1,2,3,4,5,13],strbuff:13,street:[1,3,5,9,10,12,14],streets_buff:13,streets_fil:1,strict:8,string:1,structur:[13,14],stub:4,studi:14,style:[6,12,13],styler:13,styliz:13,submit:8,subplot:13,subplots_adjust:13,subset:13,sugihara:14,sullivan:14,sum:[1,5,9,13],supplement:13,suppli:9,support:[8,13],suptitl:13,sure:8,survei:14,sussex:14,swain:[13,14],swart:14,swig:13,symbol:13,synth_ob:12,synthesi:14,sys:13,system:[8,9,10,11,12,13,14],tab20:10,tac:6,tag:[4,9,10,11,13],tansel:14,tar:8,tb00448:14,tb00902:14,tcc:14,tcrime:10,term:1,text:13,tfl83:[1,14],than:[1,13],them:[1,13],theoret:[1,7,9],theori:[1,7,14],therefor:13,thi:[1,3,4,5,8,10,11,12],thiss:14,thistl:13,thoma:14,those:4,thought:1,threshold:1,thrift:14,through:[1,7,8,9,10,12],tic:6,tiernei:14,time:[13,14],timothi:14,titl:[7,9,13],to_cr:13,to_fil:13,toe:6,tolist:13,tom:14,tomalrussel:14,toolbox:14,top:[1,13],topolog:[9,14],torega:[13,14],toregas1971:[],toregas1972:[],total:[1,5,13],total_bound:13,toward:13,tr72:[14,15],translat:13,transpar:13,transport:14,travel:[13,14],travi:14,tree:1,tree_nearest:1,true_crimes_df:10,true_schools_df:10,truncat:1,tschool:10,tsrb71:[14,15],tupl:[1,4,13],turn:13,tutori:7,two:[1,4,14],type:[1,4,13],typeerror:13,unary_union:13,uncov:13,under:[7,13,14],understand:9,unforseen:13,uniform:[1,9,13],union:13,uniqu:1,unique_arc:1,unit:[1,13],univers:13,unless:1,unseg:9,unselect:13,unwin:14,upchurch:14,updat:[10,13],upper:[1,9,13],upperbound:1,upperenvelop:9,urban:14,url:[7,14],usa:14,usag:7,use:[4,7],used:[1,4,9,10,11,12,13],user:[9,11],userwarn:11,using:[1,7,8,14],usr_warn:13,util:1,valid:1,valu:[1,4,9,13],valueerror:13,var_index:13,vari:13,variabl:[1,4,5,13],varoquaux:14,vaught:14,vector:[1,9,13],version:[9,10,11,12,13],vertex:[1,5,9,12],vertex_coord:[1,9],vertex_list:1,vertex_sig:1,vertic:[1,4,5,6,12],vertices200_df:9,vertices_df:[5,9,10,11],vi_norm:9,vi_rand:9,vi_sim:9,view:[13,14],visual:[13,14,15],volum:14,volunt:13,vstack:13,vtx0:1,vtx1:1,w_compon:1,w_graph:1,w_network:1,waddel:14,walk:[9,10,11,12],walltim:13,warn:[8,9,13],watermark:[9,10,11,12,13],web16:[1,14],weber:14,wei:7,weight:[1,11,12],wenwen:14,west:14,when:[1,4,5,8,13],where:[1,2,3,13],whether:[1,4],which:[1,9],white:13,wilei:[13,14],within:[1,4,5,13],without:[1,6],wolf:[7,14],work:11,worst:13,would:[1,6,7],wriglei:14,write:13,write_lp:13,wspace:13,x1_1:13,x1_2:13,x1_3:13,x2_1:13,x3_1:13,x86_64:[9,10,11,12,13],xaxi:9,xun:14,yamada:14,year:7,york:13,you:[7,8],your:[8,9,10,11,12,13],z2ss:9,z_norm:9,z_rand:9,z_sim:9,zenodo:[7,14],zero:[1,9,13],zorder:[10,11,12,13]},titles:["API reference","spaghetti.Network","spaghetti.Network.loadnetwork","spaghetti.Network.savenetwork","spaghetti.PointPattern","spaghetti.element_as_gdf","spaghetti.regular_lattice","spaghetti","Installation","Advanced pysal.spaghetti tutorial","Basic pysal.spaghetti tutorial","Connected components in a spatial network","Generating regular lattices and visualizing shortest paths","Demostrating network-based optimal facility location modeling","References","Tutorials"],titleterms:{"4x4":12,"case":9,"class":13,"function":[9,13],"new":11,"true":10,"while":11,The:11,abov:[11,13],add:11,advanc:9,all:[11,13],alloc:[9,10],alpha_shap:13,also:11,analysi:9,analyt:13,analyz:13,api:0,arc:[9,10,11,12],articul:11,attribut:[10,11],base:[11,13],basic:10,becaus:11,being:12,best:13,between:11,calcul:[9,13],can:11,candid:13,cbc:13,center:13,chain:[11,12],cite:7,client:13,close:11,cluster:9,collect:11,commun:13,comp_label:11,comparis:13,comparison:10,compon:11,conda:8,connect:11,constrain:9,context:12,coordin:10,cost:13,count:9,cover:13,creat:[9,10,11,12,13],creation:0,crime:10,data:[12,13],datafram:13,dataset:12,defin:13,degre:11,demand:13,demonstr:[9,12],demostr:[12,13],develop:8,digit:9,directli:11,disconnect:11,distanc:13,distinct:11,element:12,element_as_gdf:5,empir:[12,13],empric:[12,13],esda:9,exampl:13,extract:[0,9,11,12],facil:13,featur:0,feedstock:8,feet:9,fetch:13,field:11,file:[9,10],form:11,found:11,from:[9,10,11,12,13],gener:[9,12,13],geodatafram:[9,10,11,12],geopanda:[9,10,11,12],get:11,graph:[7,9],has:11,here:11,highli:8,hous:13,identifi:11,index:8,infer:7,inspect:11,instal:8,instanc:13,instanti:[0,9,10,11,12,13],instead:9,integr:13,intens:9,label:[11,12],lai:13,lattic:12,legend:10,libpys:[11,12,13],link:9,load:0,loadnetwork:2,locat:[10,13],loop:11,make:11,matplotlib:10,matrix:13,maxim:13,median:13,minimax:13,model:13,moran:9,need:13,network:[0,1,2,3,7,9,10,11,12,13],network_component2arc:11,nework:13,non:11,note:12,now:11,object:[9,10,11,12,13],observ:[9,10,12],onli:11,optim:13,origin:10,ortool:13,other:11,out:[11,13],packag:8,paramet:13,part:11,patch:10,path:12,pattern:[9,12],per:[9,13],plot:[10,11,12,13],point:[9,10,11,12,13],pointpattern:4,problem:13,pysal:[9,10,13],python:8,random:13,randomli:13,recommend:[8,13],refer:[0,14],regular:12,regular_lattic:6,represent:9,result:13,ring:11,rout:12,same:12,save:0,savenetwork:3,scenario:13,school:10,see:11,segment:9,select:13,set:13,sever:12,shortest:12,shp:[9,10],simul:9,slice:11,snap:[9,10,12,13],solut:13,solv:13,spaghetti:[1,2,3,4,5,6,7,8,9,10,13],spatial:[7,9,11,13],split:9,street:13,suit:13,symbol:11,synthet:[12,13],tag:12,test:[9,12],thei:11,them:12,thi:[9,13],think:13,through:11,topolog:7,tree:12,tutori:[9,10,15],two:11,use:13,using:9,util:13,valu:11,version:8,vertex:11,vertic:[9,10,11],via:8,visual:[9,10,11,12],warn:11,weight:13,which:13,within:12,without:10,would:13,you:13}}) \ No newline at end of file diff --git a/docsrc/notebooks/Shortest-path-visualization.ipynb b/docsrc/notebooks/Shortest-path-visualization.ipynb index 7524e367..130d8b23 100644 --- a/docsrc/notebooks/Shortest-path-visualization.ipynb +++ b/docsrc/notebooks/Shortest-path-visualization.ipynb @@ -28,8 +28,8 @@ "execution_count": 1, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:40.813992Z", - "start_time": "2020-01-20T21:02:40.428240Z" + "end_time": "2020-01-25T00:49:39.009055Z", + "start_time": "2020-01-25T00:49:38.778856Z" } }, "outputs": [ @@ -37,7 +37,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2020-01-20T16:02:40-05:00\n", + "2020-01-24T19:49:38-05:00\n", "\n", "CPython 3.7.3\n", "IPython 7.10.2\n", @@ -76,8 +76,8 @@ "execution_count": 2, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.786245Z", - "start_time": "2020-01-20T21:02:40.821359Z" + "end_time": "2020-01-25T00:49:40.609590Z", + "start_time": "2020-01-25T00:49:39.014427Z" }, "scrolled": true }, @@ -124,8 +124,8 @@ "execution_count": 3, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.825330Z", - "start_time": "2020-01-20T21:02:42.795236Z" + "end_time": "2020-01-25T00:49:40.623236Z", + "start_time": "2020-01-25T00:49:40.614746Z" } }, "outputs": [], @@ -151,8 +151,8 @@ "execution_count": 4, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:42.911605Z", - "start_time": "2020-01-20T21:02:42.837422Z" + "end_time": "2020-01-25T00:49:40.679484Z", + "start_time": "2020-01-25T00:49:40.627004Z" } }, "outputs": [], @@ -165,8 +165,8 @@ "execution_count": 5, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.441184Z", - "start_time": "2020-01-20T21:02:42.918431Z" + "end_time": "2020-01-25T00:49:41.132584Z", + "start_time": "2020-01-25T00:49:40.682017Z" } }, "outputs": [ @@ -204,8 +204,8 @@ "execution_count": 6, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.475086Z", - "start_time": "2020-01-20T21:02:43.451514Z" + "end_time": "2020-01-25T00:49:41.149467Z", + "start_time": "2020-01-25T00:49:41.136700Z" } }, "outputs": [], @@ -232,8 +232,8 @@ "execution_count": 7, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:43.504382Z", - "start_time": "2020-01-20T21:02:43.484622Z" + "end_time": "2020-01-25T00:49:41.171540Z", + "start_time": "2020-01-25T00:49:41.155027Z" } }, "outputs": [], @@ -249,8 +249,8 @@ "execution_count": 8, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.268327Z", - "start_time": "2020-01-20T21:02:43.515001Z" + "end_time": "2020-01-25T00:49:41.868997Z", + "start_time": "2020-01-25T00:49:41.179805Z" } }, "outputs": [ @@ -317,8 +317,8 @@ "execution_count": 9, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.308204Z", - "start_time": "2020-01-20T21:02:44.279196Z" + "end_time": "2020-01-25T00:49:41.888967Z", + "start_time": "2020-01-25T00:49:41.876074Z" } }, "outputs": [ @@ -352,8 +352,8 @@ "execution_count": 10, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.340953Z", - "start_time": "2020-01-20T21:02:44.327960Z" + "end_time": "2020-01-25T00:49:41.908913Z", + "start_time": "2020-01-25T00:49:41.895949Z" } }, "outputs": [ @@ -384,8 +384,8 @@ "execution_count": 11, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.380484Z", - "start_time": "2020-01-20T21:02:44.360298Z" + "end_time": "2020-01-25T00:49:41.919523Z", + "start_time": "2020-01-25T00:49:41.913962Z" } }, "outputs": [ @@ -429,13 +429,71 @@ "execution_count": 12, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.408333Z", - "start_time": "2020-01-20T21:02:44.392367Z" + "end_time": "2020-01-25T00:49:41.934666Z", + "start_time": "2020-01-25T00:49:41.922025Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (0 1.3, 0 1.7)
1(0, 2)LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)
2(1, 2)LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (0 1.3, 0 1.7)\n", + "1 (0, 2) LINESTRING (0 1.3, 0 1, 1 1, 2 1, 3 1, 3 1.5)\n", + "2 (1, 2) LINESTRING (0 1.7, 0 2, 1 2, 2 2, 3 2, 3 1.5)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf" ] }, { @@ -443,8 +501,8 @@ "execution_count": 13, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:44.743126Z", - "start_time": "2020-01-20T21:02:44.426394Z" + "end_time": "2020-01-25T00:49:42.237289Z", + "start_time": "2020-01-25T00:49:41.937338Z" } }, "outputs": [ @@ -481,8 +539,8 @@ "execution_count": 14, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:45.540650Z", - "start_time": "2020-01-20T21:02:44.750155Z" + "end_time": "2020-01-25T00:49:42.974129Z", + "start_time": "2020-01-25T00:49:42.241522Z" } }, "outputs": [ @@ -552,8 +610,8 @@ "execution_count": 15, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.066679Z", - "start_time": "2020-01-20T21:02:45.550136Z" + "end_time": "2020-01-25T00:49:43.473665Z", + "start_time": "2020-01-25T00:49:42.980320Z" } }, "outputs": [], @@ -567,8 +625,8 @@ "execution_count": 16, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.638924Z", - "start_time": "2020-01-20T21:02:46.071804Z" + "end_time": "2020-01-25T00:49:43.976956Z", + "start_time": "2020-01-25T00:49:43.476414Z" } }, "outputs": [ @@ -606,8 +664,8 @@ "execution_count": 17, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:46.795230Z", - "start_time": "2020-01-20T21:02:46.648884Z" + "end_time": "2020-01-25T00:49:44.084575Z", + "start_time": "2020-01-25T00:49:43.981675Z" } }, "outputs": [], @@ -634,8 +692,8 @@ "execution_count": 18, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:51.337586Z", - "start_time": "2020-01-20T21:02:46.798853Z" + "end_time": "2020-01-25T00:49:47.376145Z", + "start_time": "2020-01-25T00:49:44.087013Z" } }, "outputs": [ @@ -702,15 +760,85 @@ "execution_count": 19, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.527369Z", - "start_time": "2020-01-20T21:02:51.360401Z" + "end_time": "2020-01-25T00:49:48.072619Z", + "start_time": "2020-01-25T00:49:47.378346Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idgeometry
0(0, 1)LINESTRING (727287.664 879867.386, 727294.797 ...
1(0, 2)LINESTRING (727287.664 879867.386, 727294.797 ...
2(0, 3)LINESTRING (727287.664 879867.386, 727294.797 ...
3(0, 4)LINESTRING (727287.664 879867.386, 727294.797 ...
4(0, 5)LINESTRING (727287.664 879867.386, 727281.557 ...
\n", + "
" + ], + "text/plain": [ + " id geometry\n", + "0 (0, 1) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "1 (0, 2) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "2 (0, 3) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "3 (0, 4) LINESTRING (727287.664 879867.386, 727294.797 ...\n", + "4 (0, 5) LINESTRING (727287.664 879867.386, 727281.557 ..." + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "d2d_dist, tree = ntw.allneighbordistances(\"schools\", gen_tree=True)\n", "paths = ntw.shortest_paths(tree, \"schools\")\n", - "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)" + "paths_gdf = spaghetti.element_as_gdf(ntw, routes=paths)\n", + "paths_gdf.head()" ] }, { @@ -730,8 +858,8 @@ "execution_count": 20, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:52.905092Z", - "start_time": "2020-01-20T21:02:52.530293Z" + "end_time": "2020-01-25T00:49:48.401388Z", + "start_time": "2020-01-25T00:49:48.076955Z" } }, "outputs": [ @@ -768,8 +896,8 @@ "execution_count": 21, "metadata": { "ExecuteTime": { - "end_time": "2020-01-20T21:02:53.698330Z", - "start_time": "2020-01-20T21:02:52.917168Z" + "end_time": "2020-01-25T00:49:49.040715Z", + "start_time": "2020-01-25T00:49:48.405608Z" } }, "outputs": [