-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
# Near real-time rainfall pipeline | ||
|
||
TBD | ||
Near real-time rainfall monitoring. Part of the project RIPOSTE for Cameroon Red Cross Society. | ||
|
||
## Description | ||
The pipeline roughly consists of three steps: | ||
|
||
- Extract daily data on rainfall measurement of the past days (e.g. last 14 days) from [NOAA's GPM](https://gpm.nasa.gov/data/directory) | ||
- Transform the data into pre-defined areas (health districts) and calculate average rainfall of the past days. Then determine which area has its average rainfall higher than pre-defined thresholds. | ||
- Send this data as alert to the EspoCRM for the NS. | ||
|
||
## Basic Usage | ||
To run the pipeline locally | ||
|
||
1. Fill in the secrets in .env.example and rename the file to .env; in this way, they will be loaded as environment variables | ||
2. Install requirements | ||
``` | ||
pip install poetry | ||
poetry install --no-interaction | ||
``` | ||
3. Run the pipeline : `python nrt_rainfall_pipeline.py --extract --transform --send` | ||
``` | ||
Usage: nrt_rainfall_pipeline.py [OPTIONS] | ||
Options: | ||
--country TEXT country ISO3 | ||
--extract extract rainfall data | ||
--transform calculate rainfall data into pre-defined | ||
--send send to IBF app | ||
--dateend specify date until which the data should be extracted | ||
--help Show this message and exit. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters