A Python project for collecting, validating, and analyzing hiking trail data from U.S. National Parks. The project combines data from the National Park Service API, OpenStreetMap, and the USGS to build a PostGIS database of park boundaries and hiking trails, queryable through a REST API and an interactive Streamlit web app with natural language search.
Tip: See https://seanangio.github.io/nps-hikes/ for the full documentation, including live demo details.
- Collect park metadata and boundaries from the NPS API.
- Extract hiking trails from OpenStreetMap and The National Map.
- Match personal hiking locations stored in Google My Maps to trail geometries.
- Explore parks and trails through a FastAPI REST API.
- Browse an interactive map, filter trails, and export data via a Streamlit web app.
- Query the API in natural language via a local LLM.
- Docker Desktop
- Python 3.12+
- A free NPS API key
See the Getting Started guide for the complete setup instructions. The short version:
git clone https://github.com/seanangio/nps-hikes.git
cd nps-hikes
cp .env.example .env # add your NPS API key and a database password
docker compose up --build -d # start the database and API
POSTGRES_HOST=localhost POSTGRES_PORT=5433 python scripts/orchestrator.py --write-db --test-limit 1Then open http://localhost:8000/docs to explore the API, or try the live web app and live API demo.
For development work, you'll need:
pip install -r requirements-dev.txt
pre-commit install
pytest tests/I've licensed this project under CC BY-NC-SA 4.0.