{ "info": { "author": "Krzysztof Jurewicz", "author_email": "krzysztof.jurewicz@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: GIS" ], "description": "yacluster\n========\n\nyacluster is a Python library which does `distance-based clustering`_ for 2D points. Only Python 3.4+ is officially supported, though other versions may work too. The project uses `semantic versioning`_ and is licensed under `the MIT license`_.\n\nUsage\n-----\n\nThe main utility is the ``yacluster.cluster`` function which takes two arguments:\n\n* an iterable which yields two-element point tuples, each containing:\n - a two-element tuple with X and Y coordinates;\n - the actual object being clustered (or its identifier);\n* a distance threshold; if a point is included into a cluster, it must be closer to its centroid than this value.\n\nThe function returns an iterable of two-element cluster tuples, each containing:\n\n* a two-element tuple with X and Y coordinates of the cluster center;\n* a list of objects belonging to the cluster.\n\nCluster\u2019s centroid is defined as average coordinates of the cluster\u2019s members.\n\nExample\n-------\n\n.. code-block:: python\n\n from yacluster import cluster\n\n points = [\n ((1, 1.0), 'Foo'),\n ((1.0, 2), 'Bar'),\n ((2.0, 2.0), 'Baz'),\n ]\n threshold = 1.1\n expected_result = [\n ((1.0, 1.5), ['Foo', 'Bar']),\n ((2.0, 2.0), ['Baz']),\n ]\n assert expected_result == list(cluster(points, threshold))\n\nDevelopment\n-----------\n\nDevelopment requirements are listed in the ``requirements-development.txt`` file.\n\nTo run tests, execute ``./tests.py``.\n\nCoding style is checked using `flake8 3.x`_.\n\n.. _distance-based clustering: https://developers.google.com/maps/articles/toomanymarkers#distancebasedclustering\n.. _flake8 3.x: http://flake8.pycqa.org/en/latest/\n.. _semantic versioning: http://semver.org\n.. _the MIT license: LICENSE", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/KrzysiekJ/yacluster", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "yacluster", "package_url": "https://pypi.org/project/yacluster/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yacluster/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/KrzysiekJ/yacluster" }, "release_url": "https://pypi.org/project/yacluster/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Distance-based clustering tool", "version": "1.0.0" }, "last_serial": 2201435, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "43d3f498af66da99e21fb323e3bc8089", "sha256": "ef7e103a9dca2ca0445f204c36c9fbdc32f20d8a667062ef0f4c55aa696e41be" }, "downloads": -1, "filename": "yacluster-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "43d3f498af66da99e21fb323e3bc8089", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5030, "upload_time": "2016-07-04T09:56:06", "url": "https://files.pythonhosted.org/packages/13/cd/753bddc2c22be14785b4b5506dd790f856cb0c2c3f3472aaaa441d760c58/yacluster-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57f4caedf2d580c2751b1354c87018ae", "sha256": "4ad583e5169c2bd360f3bda999624d413ddcd01e4934bee12f356860fe02f551" }, "downloads": -1, "filename": "yacluster-1.0.0.tar.gz", "has_sig": false, "md5_digest": "57f4caedf2d580c2751b1354c87018ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5578, "upload_time": "2016-07-04T09:56:10", "url": "https://files.pythonhosted.org/packages/84/84/bdd5757415eaab3872ada18a64c8047a9a476be75ea0c1ea465fc9f5e321/yacluster-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "43d3f498af66da99e21fb323e3bc8089", "sha256": "ef7e103a9dca2ca0445f204c36c9fbdc32f20d8a667062ef0f4c55aa696e41be" }, "downloads": -1, "filename": "yacluster-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "43d3f498af66da99e21fb323e3bc8089", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5030, "upload_time": "2016-07-04T09:56:06", "url": "https://files.pythonhosted.org/packages/13/cd/753bddc2c22be14785b4b5506dd790f856cb0c2c3f3472aaaa441d760c58/yacluster-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57f4caedf2d580c2751b1354c87018ae", "sha256": "4ad583e5169c2bd360f3bda999624d413ddcd01e4934bee12f356860fe02f551" }, "downloads": -1, "filename": "yacluster-1.0.0.tar.gz", "has_sig": false, "md5_digest": "57f4caedf2d580c2751b1354c87018ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5578, "upload_time": "2016-07-04T09:56:10", "url": "https://files.pythonhosted.org/packages/84/84/bdd5757415eaab3872ada18a64c8047a9a476be75ea0c1ea465fc9f5e321/yacluster-1.0.0.tar.gz" } ] }