Metadata-Version: 2.1
Name: wroclawtaxonomy
Version: 0.1.1
Summary: Function for creating dendrite using Wroclaw taxonomy
Author-email: Tomasz Matuszek <tom.mateuszek@gmail.com>
Project-URL: Homepage, https://github.com/TomekMatuszek/wroclaw_taxonomy
Project-URL: Bug Reports, https://github.com/TomekMatuszek/wroclaw_taxonomy/issues
Description-Content-Type: text/markdown

# 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:

```python
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()
```

![](https://github.com/TomekMatuszek/wroclaw_taxonomy/blob/35c8045b73ee65029bdb1d9afc5ed75f6a6e136c/img/dendrite.png)

Customizing plot:

```python
plotter.plot(
    level=1, lines=True,
    style = {
        "markersize": 20,
        "cmap": 'gist_rainbow',
        "line_color": '#000000',
        "object_color": '#0000ff'
    }
)
```

![](https://github.com/TomekMatuszek/wroclaw_taxonomy/blob/35c8045b73ee65029bdb1d9afc5ed75f6a6e136c/img/dendrite_custom.png)

Animation showing every stage of the dendrite creation:

```python
plotter.animate(out_file='dendrite.gif', frame_duration=1)
```

![](https://github.com/TomekMatuszek/wroclaw_taxonomy/blob/35c8045b73ee65029bdb1d9afc5ed75f6a6e136c/img/dendrite.gif)

More examples can be found in file [examples.ipynb](https://github.com/TomekMatuszek/wroclaw_taxonomy/blob/main/examples.ipynb)
