The Predictive Crowd Intelligence API is fully functional with working endpoints, but uses mock/simulated data for external services due to missing API keys. The system gracefully falls back to realistic mock data when API keys are not configured.
- Required Key:
OPENWEATHER_API_KEY - Service: OpenWeatherMap API
- Current Status: Using mock weather data
- Impact: Weather-based crowd predictions use simulated conditions
- Fallback: Realistic weather patterns for demonstration
- Required Keys:
EVENTBRITE_API_KEY(Eventbrite API)TICKETMASTER_API_KEY(Ticketmaster API)
- Current Status: Using mock event data
- Impact: Event-based crowd predictions use simulated events
- Fallback: Realistic event schedules for demonstration
- Required Key:
OTP_ENDPOINT(OpenTripPlanner endpoint) - Environment Variable:
USE_MOCK_TRANSIT=false(to enable real data) - Current Status: Using mock transit data
- Impact: Public transit crowd analysis uses simulated data
- Fallback: Realistic transit patterns for demonstration
- Key:
GOOGLE_MAPS_API_KEY - Status:
⚠️ Configured but set toNone - Used For: Location services, geocoding, maps data
- Keys:
AMADEUS_API_KEYAMADEUS_API_SECRET
- Status:
⚠️ Configured but set toNone - Used For: Flight data, hotel booking data, travel insights
- Potential Keys:
- Google Earth Engine API key
- Planet Labs API key
- Sentinel Hub API key
- NASA Earthdata credentials
- Maxar API key
- Current Status: Not implemented (feature exists but not activated)
- Impact: No real-time satellite crowd analysis
- Activation: Set
include_satellite_cv=Truein API requests
- Potential Keys:
- Twitter API credentials
- Instagram API credentials
- Facebook API credentials
- TikTok API credentials
- Current Status: Not implemented
- Impact: No social media sentiment analysis for crowd predictions
-
Weather Integration:
export OPENWEATHER_API_KEY="your_openweather_api_key"
-
Event Integration:
export EVENTBRITE_API_KEY="your_eventbrite_api_key" export TICKETMASTER_API_KEY="your_ticketmaster_api_key"
-
Google Maps Integration:
export GOOGLE_MAPS_API_KEY="your_google_maps_api_key"
-
Amadeus Travel Integration:
export AMADEUS_API_KEY="your_amadeus_api_key" export AMADEUS_API_SECRET="your_amadeus_api_secret"
-
Transit Integration:
export OTP_ENDPOINT="your_opentripplanner_endpoint" export USE_MOCK_TRANSIT="false"
Create a .env file in the backend directory:
# Core API Keys for Production
OPENWEATHER_API_KEY=your_openweather_api_key
EVENTBRITE_API_KEY=your_eventbrite_api_key
TICKETMASTER_API_KEY=your_ticketmaster_api_key
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
AMADEUS_API_KEY=your_amadeus_api_key
AMADEUS_API_SECRET=your_amadeus_api_secret
# Transit Configuration
OTP_ENDPOINT=your_opentripplanner_endpoint
USE_MOCK_TRANSIT=false
# Application Settings
ENVIRONMENT=production
DEBUG=false- Website: https://openweathermap.org/api
- Plan: Free tier (1,000 calls/day) or paid plans
- Registration: Simple email signup
- Cost: Free tier available
- Website: https://www.eventbrite.com/platform/api
- Access: Free for public events
- Registration: Eventbrite developer account
- Cost: Free for most use cases
- Website: https://developer.ticketmaster.com/
- Access: Application-based approval
- Registration: Developer account required
- Cost: Free tier available with rate limits
- Website: https://developers.google.com/maps
- Access: Google Cloud Platform account
- Registration: Credit card required (free tier available)
- Cost: $200 free credit monthly
- Website: https://developers.amadeus.com/
- Access: Developer account registration
- Registration: Email verification
- Cost: Free tier with rate limits
- Option 1: Self-hosted OTP server
- Option 2: Third-party OTP service provider
- Option 3: Regional transit API integration
- Cost: Varies by implementation
When API keys are missing, the system logs:
WARNING: No OpenWeatherMap API key provided. Weather data will be mocked
WARNING: No event API keys found. Using mock event data
WARNING: Using mock transit data
WARNING: Amadeus API credentials not configured
- Weather: Realistic seasonal patterns
- Events: Plausible event schedules and attendance
- Transit: Typical public transport patterns
- Travel: Representative booking patterns
- All endpoints return HTTP 200 responses
- Data structure identical to real API responses
- Mock data includes realistic variance and patterns
- No functionality is disabled - only data sources differ
- Check logs for mock data warnings
- Compare data patterns over time
- Verify data freshness (mock data has static patterns)
- Monitor API call logs (no external calls with mock data)
- OpenWeatherMap API key configured and tested
- Event API keys (Eventbrite, Ticketmaster) configured
- Google Maps API key with appropriate quotas
- Amadeus API credentials validated
- Transit data source configured
- Environment variables properly set
- Logs show real data integration
- API rate limits configured
- Error handling tested with real APIs
- Acquire API Keys: Start with OpenWeatherMap (easiest/free)
- Test Integration: Add one API key at a time
- Monitor Performance: Check rate limits and quotas
- Update Documentation: Reflect real data integration
- Production Deployment: Full API key configuration
- The system is production-ready from an infrastructure perspective
- Mock data allows for immediate deployment and testing
- Real API integration is plug-and-play with environment variables
- All error handling and fallbacks are implemented
- No code changes required - only configuration updates