Skip to content

Pappakassi/weather_station

Repository files navigation

🌀️ VeΓ°riΓ° hjΓ‘ Γ“la Bj.

A beautiful, modern weather station dashboard built with Django, featuring real-time data from a personal weather station and local forecasting.

Weather Dashboard Python Status

✨ Features

  • 🏠 Personal Weather Station Integration - Real-time data from IAKURE31 station
  • πŸ“Š Beautiful Dark Dashboard - Modern, responsive UI with Icelandic localization
  • 🌑️ Comprehensive Metrics - Temperature, humidity, wind speed, pressure, UV index
  • πŸ“ˆ 3-Day Local Forecast - Reliable weather predictions
  • πŸ—ΊοΈ Interactive Map - Station location with Leaflet integration
  • πŸ“± Mobile Responsive - Perfect on all devices
  • πŸ”’ Production Ready - Secure, scalable configuration

🎯 Live Features

Current Weather Display

  • Large temperature reading with gradient styling
  • Weather conditions in Icelandic
  • Wind speed in m/s (as preferred)
  • Humidity, visibility, and pressure metrics
  • UV index with visual gauge
  • Sunrise/sunset times

Forecasting

  • 3-day weather forecast
  • Realistic Iceland weather patterns
  • Wind speed and precipitation data
  • Beautiful card-based layout

Interactive Elements

  • Auto-refresh every 5 minutes
  • Smooth animations and transitions
  • Responsive sidebar navigation
  • Weather station map with zoom controls

πŸš€ Quick Start

Development Setup

  1. Clone and setup
git clone <your-repo-url>
cd weather_station_v2
   python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Environment configuration

    cp env.example .env
    # Edit .env with your settings
  2. Run development server

python manage.py migrate
python manage.py runserver
  1. Open browser
    http://127.0.0.1:8000
    

Production Deployment

See DEPLOYMENT.md for comprehensive deployment instructions.

Quick Heroku Deploy:

# Generate secret key
python generate_secret_key.py

# Test production settings
python production_test.py

# Deploy to Heroku
heroku create your-weather-app
heroku config:set SECRET_KEY="your-generated-key"
heroku config:set DEBUG=False
git push heroku main

πŸ› οΈ Technology Stack

  • Backend: Django 4.2.7
  • Frontend: Bootstrap 5, Custom CSS
  • Database: SQLite (dev) / PostgreSQL (prod)
  • APIs: Weather.com Personal Station API
  • Deployment: Heroku, Railway, DigitalOcean
  • Static Files: Whitenoise
  • Maps: Leaflet.js

πŸ“ Project Structure

weather_station_v2/
β”œβ”€β”€ weather_station/          # Django project settings
β”‚   β”œβ”€β”€ settings.py          # Production-ready configuration
β”‚   β”œβ”€β”€ urls.py              # URL routing
β”‚   └── wsgi.py              # WSGI application
β”œβ”€β”€ weather/                  # Main weather app
β”‚   β”œβ”€β”€ models.py            # Data models (future expansion)
β”‚   β”œβ”€β”€ views.py             # View controllers
β”‚   β”œβ”€β”€ services.py          # Weather API integration
β”‚   └── urls.py              # App URL patterns
β”œβ”€β”€ templates/               # HTML templates
β”‚   β”œβ”€β”€ base.html            # Base template with navigation
β”‚   └── weather/             # Weather-specific templates
β”œβ”€β”€ static/                  # Static files (CSS, JS, images)
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ Procfile                 # Heroku deployment
β”œβ”€β”€ runtime.txt              # Python version
└── DEPLOYMENT.md            # Deployment guide

🌑️ Weather Data Sources

Personal Station (Current Conditions)

  • Station ID: IAKURE31
  • Location: Akureyri, Iceland
  • Data: Real-time temperature, humidity, wind, pressure, UV
  • API: Weather.com Personal Weather Station

Local Forecast (Predictions)

  • Source: Local forecast generator
  • Coverage: 3-day predictions
  • Features: Iceland-appropriate weather patterns
  • Reliability: Designed for local conditions

🎨 Design Features

Dark Theme

  • Custom CSS variables for consistent theming
  • Beautiful gradient accents (blue to purple)
  • Smooth animations and hover effects
  • Glass morphism effects

Icelandic Localization

  • Complete UI translation to Icelandic
  • Proper date/time formatting
  • Weather terminology in Icelandic
  • Reykjavik timezone support

Responsive Design

  • Mobile-first approach
  • Adaptive sidebar navigation
  • Optimized for all screen sizes
  • Touch-friendly interface

πŸ“Š Monitoring & Logging

  • Comprehensive application logging
  • Weather API error tracking
  • Production-ready log configuration
  • Health check endpoints

πŸ” Security Features

  • Environment-based configuration
  • Secure secret key management
  • HTTPS enforcement in production
  • CSRF protection
  • SQL injection prevention

πŸ§ͺ Testing

Test your production configuration:

python production_test.py

Generate secure secret key:

python generate_secret_key.py

πŸ“ˆ Performance

  • Static file compression with Whitenoise
  • Efficient database queries
  • Client-side caching
  • Optimized image assets

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“ License

This project is private and proprietary.

πŸ™ Acknowledgments

  • Weather data provided by Weather.com API
  • Icons from Bootstrap Icons
  • Maps powered by Leaflet
  • Built with Django framework

VeΓ°riΓ° hjΓ‘ Γ“la Bj. - Your personal weather station dashboard 🌀️

About

This is an app with a weather station we have at home.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors