Metadata-Version: 2.1
Name: label-maker-dask
Version: 0.1.2
Summary: Run label maker as a dask job
Home-page: https://github.com/developmentseed/label-maker-dask
Author: Drew Bollinger
Author-email: drew@developmentseed.org
License: BSD
Platform: UNKNOWN
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dask
Requires-Dist: mapbox-vector-tile
Requires-Dist: mercantile
Requires-Dist: numpy
Requires-Dist: Pillow
Requires-Dist: rasterio
Requires-Dist: requests
Requires-Dist: rio-tiler (>=2)
Requires-Dist: shapely
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# label-maker-dask

Library for running [label-maker](https://github.com/developmentseed/label-maker/) as a [dask](https://dask.org/) job

# Acknowledgements

This work was undertaken with support from Microsoft to be run on the [Planetary Computer](https://planetarycomputer.microsoft.com/). With access to the Planetary Computer Hub, you can find an interactive notebook tutorial for running this library.

# Basic Example

Instantiate a distributed dask cluster
```python
from dask.distributed import Client
cluster = ...
client = Client(cluster)
```

Create a label maker job
```python
from label_maker_dask import LabelMakerJob
lmj = LabelMakerJob(
    zoom=13,
    bounds=[-44.4836425781, -23.02665962797, -43.412719726, -22.5856399016],
    classes=[
        { "name": "Roads", "filter": ["has", "highway"] },
        { "name": "Buildings", "filter": ["has", "building"] }
      ],
    imagery="http://a.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=ACCESS_TOKEN",
    ml_type="segmentation",
    label_source="https://qa-tiles-server-dev.ds.io/services/z17/tiles/{z}/{x}/{y}.pbf"
)
```

Build & execute the job
```python
lmj.build_job()
lmj.execute_job()
```

View or otherwise use the results (by passing to a machine learning framework)
```python
for result in lmj.results:
    ...
```

