{ "info": { "author": "Adam Erispaha", "author_email": "aerispaha@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6" ], "description": "# sewergraph\n*v0.1.2*\n\n[![Build status](https://ci.appveyor.com/api/projects/status/tjxw4f4vhm79v3fu/branch/master?svg=true)](https://ci.appveyor.com/project/aerispaha/sewergraph/branch/master)\n[![Build Status](https://travis-ci.com/aerispaha/sewergraph.svg?branch=master)](https://travis-ci.com/aerispaha/sewergraph)\n\nBuilding upon Networkx, this package provides tools for analysis and manipulation\nof sewer network data.\n\n## Goals\nProvide graph functions to tackle analytical problems typical in sewer\ncollections systems: \n- traverse sewer networks up/downstream\n- accumulation calculations\n- downstream choke-point analysis\n- data gap handling (within reason, folks)\n- design capacity analysis\n\n## Installation\nInspired by [osmnx](https://github.com/gboeing/osmnx), sewergraph depends on [Networkx](https://github.com/networkx/networkx) and [Pandas](https://pandas.pydata.org/). For most use cases, installation is easy:\n```bash\n$ pip install sewergraph\n```\n\nAdditional functionality is provided that makes use of [GeoPandas](https://github.com/geopandas/geopandas),\nscipy and Shapely. It's recommended to install GeoPandas with conda first, then install\nsewergraph via pip:\n\n```bash\n$ conda install geopandas\n$ pip install sewergraph\n```\nIf you have ArcMap installed, be sure that the GeoPandas installation doesn't conflict with `arcpy`. To avoid risks, install sewergraph in a `conda` environment:\n\n```bash\n$ conda create --name myenv\n$ activate myenv #enter the new environment\n$ conda install geopandas\n$ pip install sewergraph\n```\n\n\n### Examples\nCreate a Networkx DiGraph with a shapefile of a sewer network.\n```python\nimport sewergraph as sg\n\n#read shapefile into DiGraph\nshapefile_path = r'path/to/sewers.shp'\nG = sg.graph_from_shp(shapefile_path)\n```\n\nAttributes of each sewer segment are stored as edge data. Geometry is parse and stored in the `geometry` attribute along with whatever other fields exist in the shapefile.\n```python\n#sewer connecting node 0 to node 1\nprint(G[0][1])\n```\n```bash\n{\n 'OBJECTID': 115081,\n 'STREET': 'ADAINVILLE DR',\n 'ShpName': 'sample_sewer_network_1',\n 'diameter': 8,\n 'facilityid': 'BCE7B25E',\n 'geometry': ,\n 'height': 0,\n 'length': 164.758,\n 'local_area': 39449.474,\n 'material': 'VCP',\n 'pipeshape': 'CIR',\n 'slope': 0.01,\n 'width': 0\n}\n```\n\nCalculate the total drainage area at each sewer by accumulating `local_area` from the top to bottom of the network (i.e. sewershed).\n\n```python\n#accumulate drainage area\nG = sg.accumulate_downstream(G, 'local_area', 'total_area')\n\n#convert to GeoDataFrame and sort the sewers by total_area\nsewers = sg.gdf_from_graph(G)\nsewers = sewers.sort_values(by = 'total_area', ascending=False)\nsewers.head()\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 \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
total_areaOBJECTIDfacilityidpipeshapediameterheightwidthlengthslopematerialSTREETlocal_areageometry
194,233,504112545A58064DFBOX01216327.2793700.0075RCPNone119043.524941LINESTRING (6558821.45028765 2032961.24586616,...
184,114,4611125465890D18FBOX01216318.0814020.0100RCPNone171961.403740LINESTRING (6558826.08945222 2032643.19829701,...
243,942,49911256312FF7372BOX01216131.3525340.0100RCPNone16557.605522LINESTRING (6558821.78250872 2032511.9163921, ...
\n
\n\nMore functions are provided for calculating basic hydraulic capacity, outfall loading, flow splits, travel time, and identifying downstream constrictions from every point of the network. \n\n```python\n#perform basic sewer capacity calculations (full flow Mannings capacity)\nG = hhcalcs_on_network(G)\n\n#id flow split sewers and calculate split fractions\nG = analyze_flow_splits(G)\n\n#accumulating travel times\nG = accumulate_travel_time(G)\n```\n\n## Running Tests\nTest are located in the sewergraph > tests directory and are run with `pytest`. \n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aerispaha/sewergraph", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "sewergraph", "package_url": "https://pypi.org/project/sewergraph/", "platform": "OS Independent", "project_url": "https://pypi.org/project/sewergraph/", "project_urls": { "Homepage": "https://github.com/aerispaha/sewergraph" }, "release_url": "https://pypi.org/project/sewergraph/0.1.2/", "requires_dist": [ "pandas", "networkx (>=2)", "numpy" ], "requires_python": "", "summary": "Tools for graph calculations on sewer networks", "version": "0.1.2" }, "last_serial": 5615749, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a8bd518292c393eae4f7647f72342d69", "sha256": "1e990cd7d42a2ce8ef8ffd689cd0965f8fb2d3813426858654ca17ce36e5f737" }, "downloads": -1, "filename": "sewergraph-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a8bd518292c393eae4f7647f72342d69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16484, "upload_time": "2017-07-11T14:13:51", "url": "https://files.pythonhosted.org/packages/82/13/9a91ebe1a9fdb1b19ad34209d15c9c157a360f4c993f5d2764ef3a1b8c15/sewergraph-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "53386e95b9381400e8fdd41559532da8", "sha256": "61aa6c77f8bf6eddade217d87d8e0af975859c419adeb5c1281fe9bfeb17642f" }, "downloads": -1, "filename": "sewergraph-0.0.2.tar.gz", "has_sig": false, "md5_digest": "53386e95b9381400e8fdd41559532da8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16504, "upload_time": "2017-07-11T14:36:27", "url": "https://files.pythonhosted.org/packages/19/85/f22e7cbce9111162e53bf9ab57196036e6a6697589eeeaa37c0ecb867541/sewergraph-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "323eec11e12925712aa52d688700ffa7", "sha256": "1bc21a792f6fc34c008b9c9ea7083f264df6d6a3dfce68138dc03dd0c1990c89" }, "downloads": -1, "filename": "sewergraph-0.0.3.tar.gz", "has_sig": false, "md5_digest": "323eec11e12925712aa52d688700ffa7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16513, "upload_time": "2017-07-11T15:07:04", "url": "https://files.pythonhosted.org/packages/72/52/7ea514d80d4ab4a1b05da43382dc720eed67b2e556bf1b53869992ca8934/sewergraph-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "bc645d30c1af5c4d42ad94f5c2afb3e0", "sha256": "3083db9d0062f4ddc754598e5ac1f0d09b2d18998e70e8226127f3923a3b2248" }, "downloads": -1, "filename": "sewergraph-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc645d30c1af5c4d42ad94f5c2afb3e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22089, "upload_time": "2018-06-26T17:19:03", "url": "https://files.pythonhosted.org/packages/12/49/d9739f59542e42dcbe973566eec80c89586129436d914151c73f49039577/sewergraph-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1a613d25547c2bb9da4f70e8fea8da75", "sha256": "3718e71dbc156fc386392ea1f33706f5d8922571f3a52dd33156820046cd6aea" }, "downloads": -1, "filename": "sewergraph-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1a613d25547c2bb9da4f70e8fea8da75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22046, "upload_time": "2018-06-26T20:42:26", "url": "https://files.pythonhosted.org/packages/68/0e/d837e4de5fb0e518c860729cdd401f5ee5ac460fa5360bb8f5384806005c/sewergraph-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a693a82a75de8a2c88d9e3616a6bdf71", "sha256": "6b01d67267da537d7f6c00ae850105f3fe93580f5e549ab9ade89d216122fef2" }, "downloads": -1, "filename": "sewergraph-0.1.2-py3.7.egg", "has_sig": false, "md5_digest": "a693a82a75de8a2c88d9e3616a6bdf71", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 60363, "upload_time": "2019-07-31T21:44:19", "url": "https://files.pythonhosted.org/packages/b1/00/e37966a26755b57920372e96e1409acb895136fe04d25b618fe8d3bd59da/sewergraph-0.1.2-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "989da629a29c4b5e08d3b9196390c287", "sha256": "0456ab105af97d658ebc61ff86e196c6f5fc685633f420c233abea340bbde7c9" }, "downloads": -1, "filename": "sewergraph-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "989da629a29c4b5e08d3b9196390c287", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28115, "upload_time": "2019-07-31T21:44:16", "url": "https://files.pythonhosted.org/packages/24/98/533cca598c102aba23c0724244034e5296291b3513db8131088edd72076d/sewergraph-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f16f839daf0ce0eccb98f00e29ad5e6", "sha256": "9ff5fb4857167da34f6a217fcf7f4ff389287d627e6e8c40e69ccdf3d6556968" }, "downloads": -1, "filename": "sewergraph-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8f16f839daf0ce0eccb98f00e29ad5e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26525, "upload_time": "2019-07-31T21:44:21", "url": "https://files.pythonhosted.org/packages/89/56/b15a24029006804dff1ee047612b60aad046666d597c48893884355edc28/sewergraph-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a693a82a75de8a2c88d9e3616a6bdf71", "sha256": "6b01d67267da537d7f6c00ae850105f3fe93580f5e549ab9ade89d216122fef2" }, "downloads": -1, "filename": "sewergraph-0.1.2-py3.7.egg", "has_sig": false, "md5_digest": "a693a82a75de8a2c88d9e3616a6bdf71", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 60363, "upload_time": "2019-07-31T21:44:19", "url": "https://files.pythonhosted.org/packages/b1/00/e37966a26755b57920372e96e1409acb895136fe04d25b618fe8d3bd59da/sewergraph-0.1.2-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "989da629a29c4b5e08d3b9196390c287", "sha256": "0456ab105af97d658ebc61ff86e196c6f5fc685633f420c233abea340bbde7c9" }, "downloads": -1, "filename": "sewergraph-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "989da629a29c4b5e08d3b9196390c287", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28115, "upload_time": "2019-07-31T21:44:16", "url": "https://files.pythonhosted.org/packages/24/98/533cca598c102aba23c0724244034e5296291b3513db8131088edd72076d/sewergraph-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f16f839daf0ce0eccb98f00e29ad5e6", "sha256": "9ff5fb4857167da34f6a217fcf7f4ff389287d627e6e8c40e69ccdf3d6556968" }, "downloads": -1, "filename": "sewergraph-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8f16f839daf0ce0eccb98f00e29ad5e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26525, "upload_time": "2019-07-31T21:44:21", "url": "https://files.pythonhosted.org/packages/89/56/b15a24029006804dff1ee047612b60aad046666d597c48893884355edc28/sewergraph-0.1.2.tar.gz" } ] }