Function for creating dendrite using Wroclaw taxonomy
Project description
wroclaw_taxonomy package
About the method
This package enables user to create dendrite out of set of points based on Wroclaw taxonomy method. It uses Euclidean distance calculated from provided variables or geographic coordinates to group objects into possibly similar groups. In the following steps, each group is merged with the other closest group until the whole dataset is combined into one coherent dendrite. In the end, dendrite can be separated into several groups/clusters to classify data points based on provided variables.
Installation
You can install this package from PyPI by running this command in terminal:
pip install wroclawtaxonomy
Or download development version of the package directly from this repository:
pip install git+https://github.com/TomekMatuszek/wroclaw_taxonomy.git
Example
Basic workflow:
import wroclaw_taxonomy as wt
dendrite = wt.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')
plotter = wt.Plotter(dendrite)
plotter.plot()
Customizing plot:
plotter.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:
plotter.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.1.0.tar.gz
.
File metadata
- Download URL: wroclawtaxonomy-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5286483223d04a0b5511d9042be3595ee250b70ea611e0c80c362090ba8c13ac |
|
MD5 | ba876a41e1e209ae7d359d1b24e96815 |
|
BLAKE2b-256 | ac9d98223777238492c471fcfc489ba67dba16f643b5199cded30bc93eec49e6 |
File details
Details for the file wroclawtaxonomy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: wroclawtaxonomy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.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 | 61ca05ba9d0f81472e82f22f51960c5ec7ed7f8c4cfa74a444ea40335fd8ef92 |
|
MD5 | 9ae340fb24e61c1db9f310ebfbc5d7b6 |
|
BLAKE2b-256 | 725792b32276dc328cb74f816a1e03b2675bb59ee65b2d39fc2ce6b481a8231e |