This repository contains a script to query the Google FloodHub (beta) API. As of October 2024, the API is focused on real-time forecasts and grants access to data issued at the earliest in July of 2024. Later, this is expected to be complemented with historical data spanning several decades.
When encountering a bug (or when the API itself is updated), please contact [email protected].
- Clone the repository
git clone [repo URL] cd GoogleFloodHub-data-extractor
- (Optional) Install the required dependencies
pip install -r requirements.txt
- Add a .txt with your API key
echo "[YOUR_KEY]" > key.txt
When not in possession of a valid key, contact [email protected] or, perhaps preferably, [email protected].
To run, navigate to src/
and execute main.py
with arguments:
- country: the country name of interest;
- starting date: the first issue date of interest; and
- ending date: the final issue date of interest.
The data is subsequently stored in the data/
folder.
Example usage:
python3 main.py Mali 01-10-2024 07-10-2024
See requirements.txt
. Note: only very basic functionality is used.
This project is licensed under the MIT License.