How azavo/bugfinder works
BugFinder predicts insect species for a selected northeastern or midwestern US location and date. Users set location on the map, optionally enter an iNaturalist username and order filter, and submit a request; the backend assembles environmental and temporal features, scores species with a loaded model, applies optional filters, and returns ranked results for display. The README documents the product’s regional focus; sampled source shows the prediction and unseen-species workflow. Model assets are fetched from GitHub when absent. Other README-level capabilities were not specified.
Main entry points: main.py FastAPI endpoints · App.jsx Prediction form · MapPicker.jsx Location map · model_loader.py Model and metadata loader
Components 14
User interface
- Prediction form
root/frontend/src/App.jsx - Location map
root/frontend/src/MapPicker.jsx
Prediction API
- FastAPI endpoints
root/backend/main.py
Environmental context
- Location and time features
root/backend/features.py - Weather lookup
root/backend/weather.py - Seen-species lookup
root/backend/inat.py
Species prediction
- Model and metadata loader
root/backend/model_loader.py - Model and geo assets
- Species classifier
root/backend/model_loader.py
Other components
- BugFinder user
- OpenStreetMap tiles
- Open-Meteo
- iNaturalist API
- GitHub releases
Connections 15
- BugFinder user → Prediction form: sets inputs
root/frontend/src/App.jsx - Prediction form → Location map: selects location
root/frontend/src/App.jsx - Location map → Prediction form: reports coordinates
root/frontend/src/MapPicker.jsx - Location map → OpenStreetMap tiles: loads tiles
root/frontend/src/MapPicker.jsx - Prediction form → FastAPI endpoints: requests predictions
root/frontend/src/App.jsx - FastAPI endpoints → Prediction form: returns predictions
root/backend/main.py - FastAPI endpoints → Location and time features: computes features
root/backend/main.py - FastAPI endpoints → Weather lookup: gets weather
root/backend/main.py - Weather lookup → Open-Meteo: fetches conditions
root/backend/weather.py - FastAPI endpoints → Model and metadata loader: uses model assets
root/backend/main.py - Model and metadata loader → Model and geo assets: loads assets
root/backend/model_loader.py - Model and metadata loader → GitHub releases: downloads missing assets
root/backend/model_loader.py - FastAPI endpoints → Species classifier: scores features
root/backend/main.py - FastAPI endpoints → Seen-species lookup: filters seen species
root/backend/main.py - Seen-species lookup → iNaturalist API: fetches observations
root/backend/inat.py