A web-app map designed to display "Active Fires" points detected in the last 9 days for a given country.
FIRMS API was used to query active fires data from the FIRMS - Fire Information for Resource Management System program from NASA, and Nominatim API was used to query the boundary of a selected country.
- Keep in mind that every query costs 972 transactions, therefore you can only query every 10' with one API Map Key. But the data is cached per query, so you can just change the country code to display FIRMS active fire points between different countries
This project is a combination of the two previous Streamlit-FastAPI projects which were created to demonstrate how to use the FIRMS API and the Nominatim API
Follow the setup guide below to try it out. Enjoy !!!
HTTP
git clone https://github.com/enguy-hub/streamlit_fastapi_activefires.gitSSH
git clone git@github.com:enguy-hub/streamlit_fastapi_activefires.gitFor CONDA environment (assuming conda or miniconda is already installed), run the following command at the root folder:
-
Create a conda environment from the
conda_env.ymlfile:conda env create --file conda_env.yml
-
Activate the conda environment:
conda activate stfapi
For VENV environment, perform the following commands at the root folder:
-
Create a python
venvvirtual environment:python -m venv venv
-
Activate the virtual environment:
source venv/bin/activate -
Install the dependencies:
pip install -r requirements.txt
Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
Navigate to the following URL: https://firms.modaps.eosdis.nasa.gov/api/area/
Scroll down to the bottom of the page and click on "Get MAP KEY" --> Enter your email to get the Map Key
Run the following command at the root folder:
uvicorn api.main:app --reloadThe server will be available at http://127.0.0.1:8000/
streamlit run stfapi_activefires.pyThe app will be available at http://localhost:8501
For CONDA environment, run the following command:
conda deactivateFor VENV environment, run the following command:
deactivate
