A FastAPI-based REST API for querying and analyzing water quality data from the USGS Water Quality Portal, with a focus on California rivers.
- 🔍 Query water quality data with flexible filters
- 📊 Generate comprehensive reports (Summary, Detailed, Trend Analysis)
- 🏞️ Focus on California rivers and watersheds
- ⚡ Fast, async API built with FastAPI
- 🐳 Docker support for easy deployment
- 📈 Built-in monitoring and logging
- 🧪 Comprehensive test suite
# Clone the repository
git clone https://github.com/yourusername/usgs-water-quality-api.git
cd usgs-water-quality-api
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
make dev
# Run the application
uvicorn app.main:app --reload
# Visit http://localhost:8000/docs for API documentation# Build and run with Docker
make docker-build
make docker-run
# Or use docker-compose for development
make docker-dev# Run all tests
make test
# Run tests with coverage
pytest tests/ --cov=app --cov-report=html
# Run linting
make lintDeploy to your preferred cloud platform:
# Google Cloud Run
make deploy-gcp
# AWS ECS
make deploy-aws
# Or follow the deployment guides in docs/- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.