Function for creating dendrite using Wroclaw taxonomy
Project description
wroclaw_taxonomy package
About
This package consists of one class called Dendrite
which enables user to create dendrite out of set of points based on Wroclaw taxonomy method.
It uses euclidean distance to group objects into possibly similar groups.
In the next steps, each group is merged with the other closest group until the whole dataset is combined into one coherent dendrite.
User can export results to GeoJSON file or visualise them using plot()
and animate()
.
Installation
You can install this package from PyPI by typing in terminal:
pip install wroclawtaxonomy
Or download it directly from source repo:
pip install git+https://github.com/TomekMatuszek/wroclaw_taxonomy.git
Example
Basic workflow:
from wroclaw_taxonomy.Dendrite import Dendrite
dendrite = Dendrite(src='data/citiesPL_pop.geojson')
dendrite.calculate(columns=['lat', 'lon'], normalize=False)
dendrite.export_objects(out_file='dendrite_points.geojson')
dendrite.export_dendrite(out_file='dendrite.geojson')
dendrite.plot()
Customizing plot:
dendrite.plot(
level=1, lines=True,
style = {
"markersize": 20,
"cmap": 'gist_rainbow',
"line_color": '#000000',
"object_color": '#0000ff'
}
)
Animation showing every stage of the dendrite creation:
dendrite.animate(out_file='dendrite.gif', frame_duration=1)
More examples can be found in file examples.ipynb
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wroclawtaxonomy-0.0.3.tar.gz
.
File metadata
- Download URL: wroclawtaxonomy-0.0.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ece26e64528fcce6eca01744c5d93ece016c2a3e7d34859ba001bc08bd9677e |
|
MD5 | df7130c859a68ae1c58e135f42dbb007 |
|
BLAKE2b-256 | 8802854e013f739d6ddac57cda82b62187e1177b16823097d63d88e717a67f6a |
File details
Details for the file wroclawtaxonomy-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: wroclawtaxonomy-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c658fd56ccc447b668e5146ab04d7e0a4a971abd27b3f7ab9b09546fda5d34b5 |
|
MD5 | fafc03b7f1744dffbc141d56e2b6d350 |
|
BLAKE2b-256 | 2d4e862a87f70e728c1371fff090431371e0f7228846b1b8e894fd869a54e91f |