Skip to content

Latest commit

 

History

History
118 lines (83 loc) · 4.43 KB

README.md

File metadata and controls

118 lines (83 loc) · 4.43 KB

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

Getting started

Prerequisites

  • Python 3.6 (or more recent), but < 3.12.0
  • pip

Installation

You can install the package from github as follows:

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

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.

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:

python scripts/example_ERA5_FIRMS.py --help

You can then run the script with your own arguments:

python scripts/example_ERA5_FIRMS.py --type_of_merged departements

Documentation

The full package documentation is available here for detailed specifications. The documentation was built with Sphinx using a theme provided by Read the Docs.

Contributing

Please refer to the CONTRIBUTING 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.

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.

License

Distributed under the Apache v2 License. See LICENSE for more information.