stco


Namestco JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryAlgorithms for analyzing the stability of spatial clusters over time
upload_time2023-11-22 22:39:08
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Luke Zaruba Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords gis geospatial spatiotemporal spatialdatascience
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stco

A Python package for assessing the temporal stability of spatial clustering methods via spatial overlay analysis.

## Introduction

Typically, to look at hotspots of point patterns we might aggregate the points to polygons and use a method like LISA or Getis-Ord Gi\* to find cold and hot spots. With clustering methods like A-DBSCAN, or any other clustering method that removes noise, we can produce cluster footprints to show "hotspots." There are existing ways to examine the spatial stability of clusters (e.g., A-DBSCAN), but what about looking at temporal stability of clusters and how they change over time? Methods like ST-DBSCAN incorporate the temporal dimension directly into the clustering algorithm, which slighly differs from what we are trying to accomplish here, since we want to look at change over time rather then clustering over both space and time. This leads to the question of, is there a way to study the temporal stability of clusters and explore emerging hotspots, in a way similar to that of Esri's Space Time Cube, without having to aggregate the data? The answer is yes, through `stco`.

`stco` seeks to provide a very simple way to analyze spatial clusters over time with the help of overlay analysis, one of the fundamental operations of GIScience. Rather than runnning clustering directly on the spatiotemporal data, we run spatial clustering on periods of time (by subsetting the data and taking "snapshots") of the spatiotemporal data to produce clusters for each time step. After this, a simple or weighted overlay can be used to examine how clusters change over time. In addition, through the STCEC method, cluster overlays can be classified according to the characteristics of the temporal pattern of cluster recognition in a given area.

## Installation

To install `stco` from PyPI, use the following command.

```bash
pip install stco
```

`stco` has been tested in Python 3.9, 3.10, and 3.11, and support for 3.12 is expected to work and will be tested in the near future. `stco` depends on the following packages:

- `esda`
- `geopandas`
- `numba`
- `numpy`
- `pandas`
- `shapely`
- `tqdm`

There are also additional dependencies for development. A comprehensive list of the recommended dependencies and the version used in development can be found in the `requirements.txt` file.

## Examples & Documentation

For examples, refer to the `examples` folder within the repository, which contains several notebooks.

For documentation, refer to the `examples` folder as well as the source code in the `stco` folder. In order to view documentation through the Python REPL or a notebook, you can use the following code on any given function, class, or method.

```python
help(stco.clustering.TemporalADBSCAN)
help(stco.overlay.simple_overlay)
help(stco.overlay.weighted_overlay)
help(stco.overlay.stcec)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "stco",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "GIS,geospatial,spatiotemporal,spatialdatascience",
    "author": "",
    "author_email": "Luke Zaruba <lukeazaruba@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/38/21/c340e06ad50e939a2d10f83d73aed96fb7f71ee7594a8960769b9a6ea24e/stco-0.1.1.tar.gz",
    "platform": null,
    "description": "# stco\n\nA Python package for assessing the temporal stability of spatial clustering methods via spatial overlay analysis.\n\n## Introduction\n\nTypically, to look at hotspots of point patterns we might aggregate the points to polygons and use a method like LISA or Getis-Ord Gi\\* to find cold and hot spots. With clustering methods like A-DBSCAN, or any other clustering method that removes noise, we can produce cluster footprints to show \"hotspots.\" There are existing ways to examine the spatial stability of clusters (e.g., A-DBSCAN), but what about looking at temporal stability of clusters and how they change over time? Methods like ST-DBSCAN incorporate the temporal dimension directly into the clustering algorithm, which slighly differs from what we are trying to accomplish here, since we want to look at change over time rather then clustering over both space and time. This leads to the question of, is there a way to study the temporal stability of clusters and explore emerging hotspots, in a way similar to that of Esri's Space Time Cube, without having to aggregate the data? The answer is yes, through `stco`.\n\n`stco` seeks to provide a very simple way to analyze spatial clusters over time with the help of overlay analysis, one of the fundamental operations of GIScience. Rather than runnning clustering directly on the spatiotemporal data, we run spatial clustering on periods of time (by subsetting the data and taking \"snapshots\") of the spatiotemporal data to produce clusters for each time step. After this, a simple or weighted overlay can be used to examine how clusters change over time. In addition, through the STCEC method, cluster overlays can be classified according to the characteristics of the temporal pattern of cluster recognition in a given area.\n\n## Installation\n\nTo install `stco` from PyPI, use the following command.\n\n```bash\npip install stco\n```\n\n`stco` has been tested in Python 3.9, 3.10, and 3.11, and support for 3.12 is expected to work and will be tested in the near future. `stco` depends on the following packages:\n\n- `esda`\n- `geopandas`\n- `numba`\n- `numpy`\n- `pandas`\n- `shapely`\n- `tqdm`\n\nThere are also additional dependencies for development. A comprehensive list of the recommended dependencies and the version used in development can be found in the `requirements.txt` file.\n\n## Examples & Documentation\n\nFor examples, refer to the `examples` folder within the repository, which contains several notebooks.\n\nFor documentation, refer to the `examples` folder as well as the source code in the `stco` folder. In order to view documentation through the Python REPL or a notebook, you can use the following code on any given function, class, or method.\n\n```python\nhelp(stco.clustering.TemporalADBSCAN)\nhelp(stco.overlay.simple_overlay)\nhelp(stco.overlay.weighted_overlay)\nhelp(stco.overlay.stcec)\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Luke Zaruba  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Algorithms for analyzing the stability of spatial clusters over time",
    "version": "0.1.1",
    "project_urls": {
        "Issues": "https://github.com/lukezaruba/stco/issues",
        "Repository": "https://github.com/lukezaruba/stco"
    },
    "split_keywords": [
        "gis",
        "geospatial",
        "spatiotemporal",
        "spatialdatascience"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e18c6fec2513023e1b41577742e149f23076df8238b0bbbb87d7b352b8d55507",
                "md5": "9281efa84ad2578acfb5e8f96d4da7b0",
                "sha256": "e0dcfefc2117829ddbda33a7d188d39bdff84a4a69c836a9244d8aea4b4db885"
            },
            "downloads": -1,
            "filename": "stco-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9281efa84ad2578acfb5e8f96d4da7b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 14379,
            "upload_time": "2023-11-22T22:39:06",
            "upload_time_iso_8601": "2023-11-22T22:39:06.997294Z",
            "url": "https://files.pythonhosted.org/packages/e1/8c/6fec2513023e1b41577742e149f23076df8238b0bbbb87d7b352b8d55507/stco-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3821c340e06ad50e939a2d10f83d73aed96fb7f71ee7594a8960769b9a6ea24e",
                "md5": "fa9b857ea19f2db9c2907c5d72902623",
                "sha256": "6f2828bc8b94775308dd8e4b20a7ab74f8f9c35ed254adb78c6bf66e2206f8fa"
            },
            "downloads": -1,
            "filename": "stco-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fa9b857ea19f2db9c2907c5d72902623",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11190,
            "upload_time": "2023-11-22T22:39:08",
            "upload_time_iso_8601": "2023-11-22T22:39:08.677534Z",
            "url": "https://files.pythonhosted.org/packages/38/21/c340e06ad50e939a2d10f83d73aed96fb7f71ee7594a8960769b9a6ea24e/stco-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-22 22:39:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lukezaruba",
    "github_project": "stco",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "stco"
}
        
Elapsed time: 0.15946s