Skip to main content

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

wroclawtaxonomy-0.0.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

wroclawtaxonomy-0.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file wroclawtaxonomy-0.0.2.tar.gz.

File metadata

  • Download URL: wroclawtaxonomy-0.0.2.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

Hashes for wroclawtaxonomy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ecc03899006a760e7d764f819d966d5535d96db4597c2dc46520748ee5e37454
MD5 66e7167d9705b127dfbc94693fecd198
BLAKE2b-256 805e01ed90c89b9127e441435cf4300bfab3ac3c34c3a80be0110ff9a3ae654c

See more details on using hashes here.

File details

Details for the file wroclawtaxonomy-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for wroclawtaxonomy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39a6488c73e15eb1bdfc433128e096118bdb782a359686eede3b0128c1205b3b
MD5 6ae171e26cbebfab2b79a66678c40d0f
BLAKE2b-256 2555f7e98dbe6bb7996fedcac149c8425d8ae09965089497610c653f424eed62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page