A revolutionary weather probability assessment tool using 30+ years of NASA data to predict weather patterns months in advance.
- What is Project-BlueSky-Minds?
- Prerequisites
- Installation
- Configuration
- Running the Application
- Using the Application
- Troubleshooting
Project-BlueSky-Minds is NOT another weather forecast app. It's a probability-based risk assessment tool that:
- β Analyzes 30+ years of NASA historical weather data
- β Predicts weather patterns 2-3 months in advance
- β Provides statistical probabilities rather than deterministic forecasts
- β Perfect for event planning, agriculture, and climate analysis
Example Use Cases:
- Planning outdoor weddings months in advance
- Agricultural planting/harvesting decisions
- Construction project scheduling
- Climate change trend analysis
Make sure you have these installed before starting:
| Software | Version | Check Command | Download Link |
|---|---|---|---|
| Python | 3.11.9 or higher | python --version |
Download Python |
| pip | Latest | pip --version |
(Included with Python) |
| Git | Any version | git --version |
Download Git |
| Redis | 6.0 or higher | redis-server --version |
Download Redis |
cd Project-BlueSky-Mindscd backend On Windows:
python -m venv venv
venv\Scripts\activateOn macOS/Linux:
python3 -m venv venv
source venv/bin/activateYou should see (venv) in your terminal β
cd backend
pip install -r requirements.txtWait for installation to complete (~2-3 minutes)
On Windows:
- Download Redis from this link
- Extract and run
redis-server.exe
On macOS:
brew install redis
brew services start redisOn Linux (Ubuntu/Debian):
sudo apt update
sudo apt install redis-server
sudo systemctl start redis-serverVerify Redis is running:
redis-cli ping
# Should return: PONGYou need two API keys (both are FREE):
- Go to: https://urs.earthdata.nasa.gov/users/new
- Create a free account
- After login, go to Profile β Generate Token
- Copy your token (it looks like:
eyJ0eXAiOiJKV1QiLCJ...)
- Go to: https://home.openweathermap.org/users/sign_up
- Create a free account
- Go to API Keys section
- Copy your API key (32 characters)
Option A: Automated Setup (Recommended)
# From the project root directory
chmod +x setup_env.sh
./setup_env.shThis will:
- Create
.envfile automatically - Generate secure passwords
- Prompt you to add your API keys
Option B: Manual Setup
# Copy the example file
cp .env.example .env
# Edit the file
nano .env
# or use your preferred text editorOpen .env file and update these lines:
# Replace with your actual NASA token
NASA_EARTHDATA_TOKEN=paste_your_nasa_token_here
# Replace with your actual OpenWeather key
OPENWEATHER_API_KEY=paste_your_openweather_key_hereSave the file (Ctrl+O then Enter in nano, or Ctrl+S in most editors)
On macOS/Linux:
chmod 600 .envOn Windows:
- Right-click
.envβ Properties β Security - Remove all users except yourself
- Give yourself Full Control
# Make sure you're in the backend folder
cd backend
# Make sure virtual environment is active (you should see (venv) in terminal)
# Start the server
python -m uvicorn app.main:app --reloadπ§ Fix: Install Missing Dependencies bash# Make sure you're in the backend folder with venv activated
pip install aiohttpHowever, since aiohttp should be in requirements.txt, let's reinstall all dependencies properly: bash# Reinstall all requirements to catch any missing packages
pip install -r requirements.txt --upgradeπ¨ If That Doesn't Work The requirements.txt might be incomplete. Install common missing packages:
bashpip install aiohttp fastapi uvicorn redis pydantic python-dotenv requests numpy pandasβ Then Restart the Server
bashpython -m uvicorn app.main:app --reloadYou should see:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process
INFO: Application startup complete.
Open a web browser and go to:
http://localhost:8000/docs
You should see the API Documentation page β
-
Open your browser and go to:
http://localhost:8000 -
Enter location details:
- City name or coordinates (latitude/longitude)
- Example: New York, USA
-
Select a date (2-3 months in the future)
- Example: If today is January 2025, select April 2025
-
Click "Get Probability"
-
View your results:
- Temperature prediction with confidence level
- Precipitation probability
- Historical context
-
Go to the API docs:
http://localhost:8000/docs -
Find the
POST /api/weather/probabilityendpoint -
Click "Try it out"
-
Enter example data:
{ "latitude": 40.7128, "longitude": -74.0060, "target_date": "2025-04-15" } -
Click "Execute"
-
See the response with weather predictions
curl -X POST "http://localhost:8000/api/weather/probability" \
-H "Content-Type: application/json" \
-d '{
"latitude": 40.7128,
"longitude": -74.0060,
"target_date": "2025-04-15"
}'Create a file test_api.py:
import requests
# API endpoint
url = "http://localhost:8000/api/weather/probability"
# Request data
payload = {
"latitude": 40.7128, # New York latitude
"longitude": -74.0060, # New York longitude
"target_date": "2025-04-15"
}
# Make request
response = requests.post(url, json=payload)
# Print results
if response.status_code == 200:
data = response.json()
print(f"Temperature: {data['predictions']['temperature']['predicted']}Β°C")
print(f"Confidence: {data['predictions']['temperature']['confidence']}%")
print(f"Precipitation Probability: {data['predictions']['precipitation']['probability']*100}%")
else:
print(f"Error: {response.status_code}")Run it:
python test_api.py{
"location": {
"latitude": 40.7128,
"longitude": -74.0060,
"name": "New York"
},
"target_date": "2025-04-15",
"predictions": {
"temperature": {
"predicted": 15.5, β Most likely temperature
"confidence": 87.3, β How confident (87.3%)
"range": {
"min": 10.2, β Coldest likely temp
"max": 20.8 β Warmest likely temp
}
},
"precipitation": {
"probability": 0.45, β 45% chance of rain
"expected_mm": 12.3 β Expected rainfall
}
},
"historical_context": {
"years_analyzed": 30 β Based on 30 years data
}
}What does this mean?
- There's an 87.3% confidence that temperature will be around 15.5Β°C
- The temperature will likely be between 10.2Β°C and 20.8Β°C
- There's a 45% chance of precipitation (~12mm expected)
- This is based on 30 years of historical data for this location and date
Solution:
# Make sure virtual environment is activated
# You should see (venv) in your terminal
# If not activated:
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Then reinstall:
cd backend
pip install -r requirements.txtSolution:
-
Check if Redis is running:
redis-cli ping
Should return
PONG -
If not running, start Redis:
Windows: Run
redis-server.exemacOS:
brew services start redis
Linux:
sudo systemctl start redis-server
Solution:
-
Check if .env file exists:
ls -la .env
-
If it doesn't exist, create it:
cp .env.example .env
-
Add your API keys:
nano .env
Update these lines:
NASA_EARTHDATA_TOKEN=your_actual_token_here OPENWEATHER_API_KEY=your_actual_key_here -
Save and restart the server
Solution:
Find what's using the port:
Windows:
netstat -ano | findstr :8000
taskkill /PID <process_id> /FmacOS/Linux:
lsof -i :8000
kill -9 <process_id>Or use a different port:
python -m uvicorn app.main:app --reload --port 8001Then access at http://localhost:8001
Solution:
-
Check server logs for errors
-
Verify .env configuration:
cd backend python test_config.py -
Test Redis connection:
redis-cli ping
-
Check if API keys are valid:
- Go to NASA Earthdata and verify token is active
- Go to OpenWeather and check API key status
This is normal! Here's why:
- Project-BlueSky-Minds uses statistical probability based on 30-year averages
- It's designed for long-term planning (2-3 months ahead)
- Traditional weather apps use real-time atmospheric data (accurate for 1-14 days)
Think of it this way:
- β Don't use it for: "What should I wear tomorrow?"
- β Use it for: "Should I book an outdoor wedding venue in June?"
To improve results:
- Use for dates 2-3 months ahead (not tomorrow)
- Compare with historical patterns, not daily forecasts
- Focus on probability ranges, not exact values
Press Ctrl + C in the terminal where the server is running
# Stop with Ctrl+C, then:
python -m uvicorn app.main:app --reloadredis-cli FLUSHALLgit pull origin main
cd backend
pip install -r requirements.txt --upgrade# Real-time logs
tail -f backend/logs/application.log
# Last 50 lines
tail -n 50 backend/logs/application.log| Endpoint | Description | Method |
|---|---|---|
/api/health |
Check if server is running | GET |
/api/weather/probability |
Get weather probability | POST |
/api/location/search |
Search for locations | GET |
/api/weather/trends |
Get historical trends | POST |
/api/export |
Export data (CSV/JSON) | POST |
Once the server is running, visit:
- Interactive Docs: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc
| City | Latitude | Longitude |
|---|---|---|
| New York, USA | 40.7128 | -74.0060 |
| London, UK | 51.5074 | -0.1278 |
| Tokyo, Japan | 35.6762 | 139.6503 |
| Sydney, Australia | -33.8688 | 151.2093 |
| Mumbai, India | 19.0760 | 72.8777 |
| Paris, France | 48.8566 | 2.3522 |
-
Check the logs:
tail -f backend/logs/application.log
-
Verify all services are running:
# Check Redis redis-cli ping # Check server curl http://localhost:8000/api/health
-
Restart everything:
# Stop server (Ctrl+C) # Restart Redis redis-cli shutdown redis-server # Restart server cd backend python -m uvicorn app.main:app --reload
-
Create an issue on GitHub:
- Include error messages
- Include OS and Python version
- Describe what you were trying to do
# START APPLICATION
cd weather-odds-pro/backend
source venv/bin/activate # or venv\Scripts\activate on Windows
python -m uvicorn app.main:app --reload
# STOP APPLICATION
Ctrl + C
# CHECK STATUS
curl http://localhost:8000/api/health
# VIEW DOCS
http://localhost:8000/docs
# CLEAR CACHE
redis-cli FLUSHALL
# UPDATE CODE
git pull origin main
pip install -r requirements.txt --upgradeYour Project-BlueSky-Minds installation is complete. Start making long-term weather predictions!
Next Steps:
- Try predicting weather for your location 3 months ahead
- Explore the API documentation
- Compare predictions with historical data
- Share feedback and contribute to the project
**Built with β€οΈ for smarter