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 wroclaw_taxonomy
Or download it directly from source repo:
pip install git+https://github.com/TomekMatuszek/wroclaw_taxonomy.git
Example
Basic workflow:
from wroclaw_taxonomy 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.1.tar.gz
.
File metadata
- Download URL: wroclawtaxonomy-0.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 421c4a04527d4ac3ab9fea9eba18871e8139966e1c6fac067659364fc81d3602 |
|
MD5 | 9c7bd0335e45aeb4031162873cc5284d |
|
BLAKE2b-256 | cbce409006fd11d0c807db3f28f7a22f2c5b24f072f608e54ac630986058d01c |
File details
Details for the file wroclawtaxonomy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: wroclawtaxonomy-0.0.1-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.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22378e7f41e05bf64cc4a7c245aab724cc1e9c87544e9ac1a974a42ef90f23eb |
|
MD5 | 00eb158648101bc294edca32665d2888 |
|
BLAKE2b-256 | 6af598b55b384f049aa54183e7558c06e51dfce1842fc3d0fdfa02248b3d1ee9 |