A demo web-map application designed to visualize country boundaries based on user selection.
This project uses FastAPI backend with a Streamlit Folium frontend, and the OSM boundary dataset accessed through the Nominatim Search API. Follow the setup guide below to try it out. Enjoy !!!
HTTP
git clone https://github.com/enguy-hub/streamlit_fastapi_nominatim.git
SSH
git clone git@github.com:enguy-hub/streamlit_fastapi_nominatim.git
For 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.yml
file:conda env create --file conda_env.yml
-
Activate the conda environment:
conda activate stfapi
-
Install the packages/dependencies in editable mode:
pip install -e .
For VENV
environment, perform the following commands at the root folder:
-
Create a python
venv
virtual environment:python -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
-
Install the package in editable mode:
pip install -e .
Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
Run the following command at the root folder:
uvicorn api.main:app --reload
The server will be available at http://127.0.0.1:8000/
streamlit run stfapi_nominatim.py
The app will be available at http://localhost:8501
For CONDA
environment, run the following command:
conda deactivate
For VENV
environment, run the following command:
deactivate