NASA Space Apps Challenge 2025 Project
Forecasting air quality using TEMPO satellite data, ground sensors, and machine learning
- Python 3.9+ (tested with 3.12+)
- UV package manager (optional but recommended)
- Node.js 18+ (for frontend, optional)
# 1. Clone the repository
git clone https://github.com/bethwel3001/predictions.git
cd predictions/predictions
# 2. Create virtual environment with UV (fast!)
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install dependencies
uv pip install fastapi uvicorn requests pyyaml pydantic pydantic-settings python-multipart python-dotenv
# 4. Add envrionment variables
EARTHDATA_USERNAME="your_username"
EARTHDATA_PASSWORD="your_password"
# 5. Start the backend server
cd backend
python3 src/api/main.pyThat's it! π
- Backend API: http://localhost:8000
- API Docs (Interactive): http://localhost:8000/docs
- Health Check: http://localhost:8000/health
# Test OpenAQ (global ground monitoring)
curl "http://localhost:8000/api/v1/openaq/latest?country=US&limit=5"
# Test Pandora (NASA validation network)
curl "http://localhost:8000/api/v1/pandora/sites"
# Test Data Attribution
curl "http://localhost:8000/api/v1/attribution"Focus: Backend API & Data Processing
predictions/
βββ backend/ # Python backend (CORE)
β βββ src/
β βββ data_ingestion/ # β Data fetchers (OpenAQ, Pandora, TEMPO, AirNow, PurpleAir)
β βββ database/ # SQLAlchemy models
β βββ ml_models/ # Forecasting models
β βββ api/ # β FastAPI endpoints (14 endpoints)
β βββ notifications/ # Alert system
β βββ pipeline/ # Data orchestration
β βββ utils/ # Helper functions
βββ frontend/ # React frontend (ready for integration)
β βββ src/ # React components
β βββ public/ # Static assets
βββ config/ # Configuration files
βββ data/ # Data storage (cache, raw, processed)
βββ models/ # Saved ML models
βββ scripts/ # Setup scripts
βββ tests/ # Test suites
βββ docker-compose.yml # Local development
βββ requirements.txt # Python dependencies
- API Framework: FastAPI 0.118+ with auto-generated OpenAPI docs
- Data Fetchers:
- OpenAQ (global ground monitoring)
- Pandora (NASA satellite validation)
- TEMPO (satellite data)
- AirNow (EPA network)
- PurpleAir (community sensors)
- Data Processing: pandas, numpy, xarray
- Database: PostgreSQL with PostGIS (optional)
- Cache: Redis (optional)
- ML Models: scikit-learn, TensorFlow (optional)
- Framework: React 18 + Vite
- Styling: Tailwind CSS
- Icons: React Icons
- Package Manager: UV (ultra-fast Python package manager)
- Containers: Docker & Docker Compose
- Testing: pytest
See prompt.md for detailed branching strategy.
# Create feature branch
git checkout -b feature/data-tempo-fetcher
# Make changes and commit
git add .
git commit -m "feat(data): implement TEMPO satellite data fetcher"
# Push and create PR
git push origin feature/data-tempo-fetcherFollow Conventional Commits:
feat: New featurefix: Bug fixdocs: Documentationrefactor: Code refactoringtest: Testschore: Maintenance
# Run Python tests
pytest tests/
#OR
# Make sure you are in the 'predictions/' directory
python -m pytest -v tests/test_tempo_fetcher.py #for temp_fetcher
# Run with coverage
pytest --cov=src tests/
# Run frontend tests
cd frontend
npm test- NASA TEMPO: Satellite air quality data
- EPA AirNow: Ground-based sensor network
- PurpleAir: Community air quality sensors
- OpenWeather: Meteorological data
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
NASA Space Apps Challenge 2025 Team
- NASA for TEMPO satellite data
- EPA for AirNow API access
- PurpleAir for sensor data
- OpenWeather for meteorological data
For questions or issues, please open an issue on GitHub.
Built with β€οΈ for NASA Space Apps Challenge 2025