Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pyronear/pyro-risks

Data science for wildfire risk forecasting and monitoring
https://github.com/pyronear/pyro-risks

python3 scikit-learn wildfire-forecasting

Last synced: 3 months ago
JSON representation

Data science for wildfire risk forecasting and monitoring

Awesome Lists containing this project

README

        

Pyronear Risks












Code style: black



The pyro-risks project aims at providing the pyronear-platform with a machine learning based wildfire forecasting capability.

## Table of Contents

- [Table of Contents](#table-of-contents)
- [Getting started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Web server](#web-server)
- [Examples](#examples)
- [datasets](#datasets)
- [Scripts](#scripts)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

## Getting started

### Prerequisites

- Python 3.6 (or more recent), but < 3.12.0
- [pip](https://pip.pypa.io/en/stable/)
### Installation

You can install the package from github as follows:

```shell
pip install git+https://github.com/pyronear/pyro-risks
```

## Usage

Beforehand, you will need to set a few environment variables either manually or by writing an `.env` file in the root directory of this project, like in the example below:

```
CDS_UID=my_secret_uid
CDS_API_KEY=my_very_secret_key
```
Those values will allow your web server to connect to CDS [API](https://github.com/ecmwf/cdsapi), which is mandatory for your datasets access to be fully operational.

### Web server

To be able to expose model inference, you can run a web server using docker containers with this command:

```bash
PORT=8003 docker-compose up -d --build
```

Once completed, you will notice that you have a docker container running on the port you selected, which can process requests just like any web server.

## Examples
### datasets

Access the main pyro-risks datasets locally.

```python
from pyro_risks.datasets import NASAFIRMS, NASAFIRMS_VIIRS, GwisFwi, ERA5T, ERALand

modis = NASAFIRMS()
viirs = NASAFIRMS_VIIRS()

fdi = GwisFwi()

era = ERA5T()
era_land = ERA5Land()
```
### Scripts

You are free to merge the datasets however you want and to implement any zonal statistic you want, but some are already provided for reference. In order to use them check the example scripts options as follows:

```shell
python scripts/example_ERA5_FIRMS.py --help
```

You can then run the script with your own arguments:

```shell
python scripts/example_ERA5_FIRMS.py --type_of_merged departements
```

## Documentation

The full package documentation is available [here](https://pyronear.org/pyro-risks/) for detailed specifications. The documentation was built with [Sphinx](https://www.sphinx-doc.org) using a [theme](https://github.com/readthedocs/sphinx_rtd_theme) provided by [Read the Docs](https://readthedocs.org).

## Contributing

Please refer to the [`CONTRIBUTING`](./CONTRIBUTING.md) guide if you wish to contribute to this project.

## Credits

This project is developed and maintained by the repo owner and volunteers from [Data for Good](https://dataforgood.fr/).

This project uses data from EFFIS (European Forest Fire Information System) for the FWI (Fire Weather Index). This data is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

- Dataset: [EFFIS FWI Dataset](https://effis.jrc.ec.europa.eu/applications/data-and-services)
- License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## License

Distributed under the Apache v2 License. See [`LICENSE`](./LICENSE) for more information.