{"id":15253682,"url":"https://github.com/lovasoa/kdsearch","last_synced_at":"2025-04-11T14:32:52.397Z","repository":{"id":62573849,"uuid":"83602860","full_name":"lovasoa/kdsearch","owner":"lovasoa","description":"Search k-dimensional datasets efficiently using KDTrees","archived":false,"fork":false,"pushed_at":"2017-03-03T14:03:27.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T10:42:35.688Z","etag":null,"topics":["kd-tree","numpy","pandas","python3","scipy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovasoa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-01T21:20:13.000Z","updated_at":"2023-04-19T12:01:28.000Z","dependencies_parsed_at":"2022-11-03T17:30:30.487Z","dependency_job_id":null,"html_url":"https://github.com/lovasoa/kdsearch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fkdsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fkdsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fkdsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fkdsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovasoa","download_url":"https://codeload.github.com/lovasoa/kdsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279196,"owners_count":21077406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kd-tree","numpy","pandas","python3","scipy"],"created_at":"2024-09-29T22:00:42.360Z","updated_at":"2025-04-11T14:32:52.364Z","avatar_url":"https://github.com/lovasoa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KDSearch\n\nEfficient K-dimensional queries in python using KDTrees with pandas and numpy.\n\n[![Build Status](https://travis-ci.org/lovasoa/kdsearch.svg?branch=master)](https://travis-ci.org/lovasoa/kdsearch)\n\n## Requirements\n\n - python 3.5+\n - numpy\n - pandas\n\n## Installation\n\nTo install this package for the current user:\n\n```\npip3 install --user kdsearch\n```\n\n## example\n```python\nimport pandas\nfrom kdsearch import KDTree\n\n# We create a dataset with three points (1,3), (2,3) and (3,4)\ndf = pandas.DataFrame({\"x\": [1,2,3], \"y\":[3,3,4], \"target\": [0,1,1]})\ntree = KDTree(df, ('x','y'), 'target')\n# \u003cKDTree of dimension 2\u003e\n\n# Query all points with x between 0 and 10 and y between 0 and 3 (inclusive)\n\ntree.query({\"x\":[0,10], \"y\":[0,3]})\n# Statistics(sum=1, length=2)\n\ntree.query({\"x\":[0,10], \"y\":[0,10]})\n# Statistics(sum=2, length=3)\n\ntree.query({\"x\":[5,10], \"y\":[5,10]})\n# Statistics(sum=0, length=0)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasoa%2Fkdsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovasoa%2Fkdsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasoa%2Fkdsearch/lists"}