Metadata-Version: 2.1
Name: deafrica-tools
Version: 2.0.3
Summary: Functions and algorithms for analysing Digital Earth Africa data.
Home-page: https://github.com/digitalearthafrica/deafrica-sandbox-notebooks
License: Apache-2.0
Author: Digital Earth Africa
Author-email: systems@digitalearthafrica.org
Requires-Python: >=3.9,<3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiohttp (>=3.8.4)
Requires-Dist: boto3 (>=1.24.59)
Requires-Dist: botocore (>=1.27.59)
Requires-Dist: branca (>=0.6.0)
Requires-Dist: dask-ml (>=2023.3.24)
Requires-Dist: dask[array,complete,dataframe] (>=2023.3.1)
Requires-Dist: datacube[celery,performance,s3] (>=1.8.13)
Requires-Dist: datetime (>=5.1)
Requires-Dist: fiona (>=1.9.4.post1)
Requires-Dist: folium (>=0.12.1)
Requires-Dist: fsspec (>=2023.3.0)
Requires-Dist: gdal (==3.6.3)
Requires-Dist: geojson (>=3.0.1)
Requires-Dist: geopandas (>=0.13.2)
Requires-Dist: geopy (>=2.3.0)
Requires-Dist: hdstats (>=0.2.1)
Requires-Dist: ipyleaflet (>=0.17.2)
Requires-Dist: ipython (>=8.13.1)
Requires-Dist: ipywidgets (>=8.0.6)
Requires-Dist: joblib (>=1.2.0)
Requires-Dist: matplotlib (>=3.7.1)
Requires-Dist: numexpr (>=2.8.4)
Requires-Dist: odc-algo (>=0.2.3)
Requires-Dist: odc-ui (>=0.2.1.dev3673)
Requires-Dist: otps (>=0.3.2)
Requires-Dist: owslib (>=0.29.2)
Requires-Dist: packaging (>=23.1)
Requires-Dist: pandas (>=2.0.2)
Requires-Dist: pyproj (>=3.5.0)
Requires-Dist: pystac (>=1.7.3)
Requires-Dist: pytz (>=2023.3)
Requires-Dist: rasterio (>=1.3.7)
Requires-Dist: rasterstats (>=0.19.0)
Requires-Dist: requests (>=2.31.0)
Requires-Dist: rioxarray (>=0.14.1)
Requires-Dist: scikit-image (>=0.21.0)
Requires-Dist: scikit-learn (>=1.2.2)
Requires-Dist: scipy (>=1.10.1)
Requires-Dist: seaborn (>=0.12.2)
Requires-Dist: shapely (>=2.0.1)
Requires-Dist: tqdm (>=4.65.0)
Requires-Dist: traitlets (>=5.9.0)
Requires-Dist: xarray (>=2023.5.0)
Project-URL: Bug Tracker, https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/issues
Project-URL: Documentation, https://docs.digitalearthafrica.org/en/latest/sandbox/notebooks/Tools/index.html
Project-URL: Repository, https://github.com/digitalearthafrica/deafrica-sandbox-notebooks
Description-Content-Type: text/markdown

<img align="centre" src="https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/blob/main/Supplementary_data/Github_banner.jpg?raw=true" width="100%">

# Digital Earth Africa Tools Package

Python functions and algorithms developed to assist in analysing Digital Earth Africa data (e.g. loading data, plotting, spatial analysis, machine learning).

## Installation

This module is automatically installed on the Digital Earth Africa Sandbox. If for some reason the module isn't available on the Digital Earth Africa Sandbox, you can also `pip install` the module from the terminal.

You can install the `deafrica-tools` package from PyPI using:

```
python -m pip install --extra-index-url="https://packages.dea.ga.gov.au" deafrica-tools 
```
or install the package from the `Tools` directory:

```
python -m pip install --extra-index-url="https://packages.dea.ga.gov.au" -e Tools/
```
       
To install this module from the source on any other system with `pip`:

```
python -m pip install --extra-index-url="https://packages.dea.ga.gov.au" git+https://github.com/digitalearthafrica/deafrica-sandbox-notebooks.git#subdirectory=Tools
```



## Citing Digital Earth Africa Tools

The code in this module is an adaptation of code from the [Digital Earth Australia](https://github.com/GeoscienceAustralia/dea-notebooks) `dea-tools` package. If you use any of the code in this repository in your work, please reference them using the following citation:

    Krause, C., Dunn, B., Bishop-Taylor, R., Adams, C., Burton, C., Alger, M., Chua, S., Phillips, C., Newey, V., Kouzoubov, K., Leith, A., Ayers, D., Hicks, A., DEA Notebooks contributors 2021. Digital Earth Australia notebooks and tools repository. Geoscience Australia, Canberra. https://doi.org/10.26186/145234
    
    
## Translation

Translation of the module into other languages is done using `gettext` and `pot/po/mo` files.

We welcome contributors to help in translating the project by joining this project https://poeditor.com/join/project?hash=0Q33A7sRM6.

The template `.pot` file can be generated by running `pybabel extract -o deafrica_tools.pot *` from the `Tools/` directory.

This file can then be uploaded to the [deafrica_tools project](https://poeditor.com/join/project?hash=0Q33A7sRM6) on POEditor.com

To get the most recent terms and translations, download the files from the [deafrica_tools project](https://poeditor.com/join/project?hash=0Q33A7sRM6) and export the the `deafrica_tools.po` and `deafrica_tools.mo` files to the `deafrica_tools/locales/fr/LC_MESSAGES/` directory.

Currently, uploading and downloading terms and translations is accomplished using Github Actions. 

In python code, strings surrounded by an underscore function `_('')` will be translated.

This `_()` function is declared as a global after [`deafrica_tools.set_lang('fr')`](deafrica_tools/__init__.py) is called. 

Calling `deafrica_tools.set_lang()` with no argument will use the language set by JupyterLab under **Settings -> Language**.

See [wetlandsinsighttool.py](deafrica_tools/app/wetlandsinsighttool.py) as an example.

