A powerful tool for tracking and analyzing mushroom observations using iNaturalist data. Monitor seasonal patterns, generate detailed reports, and visualize mushroom distributions with interactive heatmaps.
- 🗺️ Interactive heatmaps showing observation distributions
- 📊 Detailed monthly statistics and quality grade analysis
- 🔮 Seasonal prediction system for mushroom appearances
- 📈 Historical data tracking and trend analysis
- 🔄 Automated data updates with manual override options
- 📑 Comprehensive HTML reports with visualizations
- 💾 Efficient data caching system
python -m pip install -r requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/mushroom-observer.git
cd mushroom-observer
- Install dependencies:
pip install -r requirements.txt
-
Configure the application (see Configuration section)
-
Run the application:
python mushroom_observer.py
The following variables can be modified in the script to customize the application:
# Location Settings
PLACE_IDS = [10] # Default: Oregon (10)
# Find your place ID at: https://www.inaturalist.org/places/
# Common Place IDs:
# - Oregon: 10
# - Washington: 11
# - California: 14
# Multiple areas can be added: PLACE_IDS = [10, 11, 14]
# Map Display Settings
DEFAULT_MAP_CENTER = [43.8041, -120.5542] # Default: Oregon center
# Format: [latitude, longitude]
# Common centers:
# - Oregon: [43.8041, -120.5542]
# - Washington: [47.7511, -120.7401]
# - California: [36.7783, -119.4179]
# API Settings
API_RATE_LIMIT = 0.5 # Seconds between requests
API_BASE_URL = 'https://api.inaturalist.org/v1'
# Cache Settings
CACHE_TIMEOUT = 43200 # 12 hours in seconds
DATA_DIR = 'mushroom_data' # Cache directory
To modify the search area:
- Visit iNaturalist Places
- Search for your desired location
- The place ID is in the URL (e.g.,
/places/10
for Oregon) - Update
PLACE_IDS
with your desired location(s)
To change the default map center:
- Find your desired coordinates using Google Maps
- Right-click on the location and copy the coordinates
- Update
DEFAULT_MAP_CENTER
with [latitude, longitude]
The application uses the iNaturalist API v1. By default, it:
- Respects rate limits (0.5 seconds between requests)
- Caches data for 12 hours
- Uses the public API endpoint
To modify API behavior:
- Adjust
API_RATE_LIMIT
for faster/slower requests - Change
CACHE_TIMEOUT
for different cache duration - Update
API_BASE_URL
if endpoint changes
- Select "Add Mushroom" from the main menu
- You'll need:
- Mushroom name (for your reference)
- iNaturalist taxon ID
To find a taxon ID:
- Search for the species on iNaturalist
- The taxon ID is in the URL (e.g.,
/taxa/48978
)
Individual Reports:
- Select "Generate Report"
- Choose a mushroom
- Report includes:
- Heatmap of observations
- Monthly statistics
- Quality grade distribution
- Seasonal predictions
Consolidated Reports:
- Select "Generate Consolidated Report"
- Includes all tracked mushrooms in one report
Update Options:
- "Update All Data": Updates all mushrooms
- "Manual Update": Force update single mushroom
- "Purge Cache": Clear all cached data
Cache System:
- Data is cached in
DATA_DIR
- Each mushroom has its own cache file
- Cache expires based on
CACHE_TIMEOUT
- Shows observation density
- Interactive zoom and pan
- Color intensity indicates observation frequency
- Monthly observation totals
- Quality grade distribution
- Historical trends
- Year-over-year comparisons
- Based on historical data
- Shows likely appearance times
- Includes confidence levels
Common Issues:
-
No Data Loading
- Check internet connection
- Verify taxon ID exists
- Ensure place ID is correct
-
Slow Performance
- Check
API_RATE_LIMIT
- Verify internet speed
- Consider reducing search area
- Check
-
Map Not Displaying
- Check coordinates in
DEFAULT_MAP_CENTER
- Verify data exists for location
- Check browser compatibility
- Check coordinates in
- folium (mapping)
- pandas (data analysis)
- requests (API calls)
- rich (terminal interface)
- plotly (data visualization)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Data provided by iNaturalist
- Mapping functionality powered by Folium
- Terminal interface created with Rich
- Created using [Claude] (https://claude.ai)