Skip to content

About

Himali Weather - Interactive weather forecasting platform covering all 77 districts of Nepal with live updates, 7-day forecasts, and an intuitive district map.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

πŸ”οΈ Himali Weather

Website License Built with React TypeScript

An interactive weather forecasting platform for all 77 districts of Nepal

Himali Weather is a modern, fast, and user-friendly web application that provides comprehensive weather information for every district across Nepal's 7 provinces. With an intuitive interactive map, live weather updates, and detailed forecasts, it's your complete guide to understanding Nepal's diverse weather patterns.


✨ Features

πŸ—ΊοΈ Interactive District Map

  • Visual Nepal Map: Click directly on any of the 77 districts to view detailed weather information
  • Province-based Coloring: Each of Nepal's 7 provinces is color-coded for easy identification
  • Hover Tooltips: Quick district identification while exploring the map
  • Responsive Design: Works seamlessly on desktop, tablet, and mobile devices

πŸ“ District Selection

  • Search Functionality: Quickly find any district by name across all 7 provinces
  • Organized Dropdown: Districts grouped by province for logical browsing
  • Featured Districts: Quick access to popular locations like Kathmandu, Pokhara, and Bhaktapur
  • Smart URL Routing: Direct links to specific district forecasts

🌑️ Live Weather Data

  • Current Conditions: Real-time temperature, feels-like temperature, and humidity
  • Wind Information: Wind speed and direction visualization
  • Precipitation Data: Current and forecasted rainfall amounts
  • Elevation Details: Geographical elevation for each district
  • Air Quality Metrics: UV index for UV safety planning

πŸ“… 7-Day Forecast

  • Daily Predictions: Complete daily outlook with min/max temperatures
  • Weather Codes: Visual indicators with emojis (β˜€οΈ β›… 🌧️ ❄️ β›ˆοΈ) for intuitive understanding
  • Precipitation Forecast: Daily rainfall predictions
  • Sunrise & Sunset: Precise timing for each day

⏰ Hourly Conditions

  • Hour-by-Hour Updates: Detailed conditions for the next 24-48 hours
  • Temperature Trends: Track temperature changes throughout the day
  • Hourly Precipitation: Understand when rain is expected

🌍 Nationwide Coverage

  • All 77 Districts: Complete coverage of Nepal's administrative divisions
  • Province-Specific Data: Weather data for all 7 provinces (Koshi, Madhesh, Bagmati, Gandaki, Lumbini, Karnali, Sudurpashchim)
  • Diverse Terrain: Covers everything from the Terai plains to the Himalayan heights

πŸ“± Mobile-Friendly Design

  • Responsive Layout: Perfect display on all screen sizes
  • Touch-Optimized: Easy navigation on smartphones and tablets
  • Fast Loading: Optimized for slow internet connections
  • Progressive Enhancement: Works smoothly across all modern browsers

πŸ“Š Rich Visual Information

  • Weather Icons & Emojis: Intuitive weather condition representation
  • Color-Coded Provinces: Easy visual identification by province
  • Smooth Animations: Delightful micro-interactions powered by Framer Motion
  • Professional Typography: Display fonts for hierarchy and readability

πŸ” SEO Optimized

  • Meta Tags: Comprehensive OpenGraph and Twitter Card support
  • Canonical URLs: Proper URL structure for each district
  • Structured Data: JSON-LD schema markup for search engines
  • Sitemap Generation: Automated sitemap for all 77 districts
  • Performance Tracking: Integrated Vercel Analytics

πŸ› οΈ Technologies & Stack

Frontend Framework

  • React 19.2 - Modern UI library with latest features
  • TypeScript 5.9 - Type-safe development experience
  • Vite 7.3 - Lightning-fast build tool with HMR

Styling & UI

  • Tailwind CSS 4.2 - Utility-first CSS framework
  • Framer Motion 12.35 - Production-ready animation library
  • Lucide React 0.577 - Beautiful SVG icon library

Routing & Navigation

  • React Router DOM 7.13 - Client-side routing
  • Dynamic Route Matching - Smart district URL handling

Data & APIs

  • Open-Meteo API - Free, no-auth-required weather data
  • GeoJSON Data - Custom district and province boundary data
  • Lightweight Geo Utilities - Custom GeoJSON parsing and projection

Development Tools

  • ESLint 9.39 - Code quality and consistency
  • TypeScript ESLint - Type-aware linting rules
  • React Hooks ESLint Plugin - Best practices enforcement

Deployment & Monitoring

  • Vercel - Hosting and continuous deployment
  • Vercel Analytics - Performance monitoring and insights

πŸ“Š Project Statistics

Metric Value
Language Composition TypeScript 77.6%, JavaScript 15.3%, CSS 4%, HTML 3.1%
Repository Size ~171 KB
Districts Covered 77
Provinces 7
Stars ⭐⭐⭐
License MIT

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone https://github.com/aakashpuree/Himali-Weather.git
    cd Himali-Weather
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev

    The app will open at http://localhost:5173

Available Scripts

# Start development server with HMR
npm run dev

# Build for production
npm run build

# Preview production build locally
npm run preview

# Generate sitemaps for SEO
npm run seo:sitemap

# Run ESLint code quality checks
npm run lint

πŸ“ Project Structure

Himali-Weather/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ NepalMap.tsx         # Interactive SVG map component
β”‚   β”‚   β”œβ”€β”€ DistrictSelect.tsx   # Search & select dropdown
β”‚   β”‚   β”œβ”€β”€ WeatherPanel.tsx     # Weather display panel
β”‚   β”‚   β”œβ”€β”€ SeoHead.tsx          # SEO meta tags management
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ geo.ts              # GeoJSON utilities & projections
β”‚   β”‚   β”œβ”€β”€ weather.ts          # Open-Meteo API integration
β”‚   β”‚   β”œβ”€β”€ provinces.ts        # Province definitions & colors
β”‚   β”‚   β”œβ”€β”€ site.ts             # SEO & site configuration
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ App.tsx                  # Main app component & routing
β”‚   └── main.tsx                 # Application entry point
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ districts.geojson   # District boundary data
β”‚   β”‚   └── states.geojson      # Province boundary data
β”‚   └── og-cover.svg            # Social media preview image
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ generate-sitemap.mjs    # Dynamic sitemap generation
β”‚   └── generate-static-pages.mjs # Static page generation
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ vite.config.ts
└── README.md

🎨 Design & Visual Identity

Color Palette

Each of Nepal's 7 provinces has a distinctive color:

  • Koshi - Warm Coral (#e07a5f)
  • Madhesh - Sage Green (#81b29a)
  • Bagmati - Golden Yellow (#f2cc8f)
  • Gandaki - Warm Taupe (#a78a7f)
  • Lumbini - Slate Blue (#6f9ab8)
  • Karnali - Mauve (#c08497)
  • Sudurpashchim - Olive (#8d8741)

Typography

  • Display Font - Modern, legible fonts for headings
  • Monospace Font - Technical labels and coordinates
  • System Font Stack - Fast-loading, readable body text

Animation & Interactions

  • Framer Motion - Smooth page transitions and micro-interactions
  • Hover Effects - Visual feedback on interactive elements
  • Loading States - Animated skeleton screens and spinners
  • Smooth Scrolling - Polished scroll behavior

🌐 How It Helps Users

Travelers & Tourists

Plan your trip with accurate weather forecasts for specific regions of Nepal. Pack appropriately knowing the conditions in the Terai, hills, or mountains.

Farmers & Agriculture

Make informed decisions about planting, harvesting, and livestock care based on district-specific weather patterns and rainfall predictions.

Event Planners

Check weather conditions for outdoor events with 7-day forecasts and hourly details for precise timing.

Mountain Climbers & Trekkers

Get detailed forecasts for mountainous regions, including altitude-specific weather patterns and sunrise/sunset times for adventure planning.

Weather Enthusiasts

Explore Nepal's diverse climate zones and understand how terrain and elevation influence weather patterns across the nation.

Locals

Stay informed about local weather conditions with real-time updates and accurate forecasts for daily planning.


πŸ“‘ Data Sources

Weather Data

  • Open-Meteo API: Free, open-source weather data without requiring API keys
  • Real-time Updates: Current conditions refreshed regularly
  • Historical Accuracy: Based on global weather models

Geographic Data

  • GeoJSON Boundaries: Precise district and province boundary data
  • Map Projection: Custom azimuthal equidistant projection for Nepal
  • Centroid Calculations: Accurate district center points for weather data retrieval

πŸ”§ API Integration

Open-Meteo Weather API

// Fetches comprehensive weather data
const response = await fetch(
  `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&...`
);

Available Data Points:

  • Current temperature and conditions
  • Hourly forecasts (24-48 hours)
  • Daily forecasts (7-14 days)
  • Weather codes with descriptions
  • Sunrise/sunset times
  • Elevation data

πŸ“ˆ Performance Optimizations

  • Code Splitting: Lazy loading of components and data
  • Image Optimization: SVG maps and optimized assets
  • Caching: Efficient browser caching strategies
  • Vercel CDN: Global content delivery network
  • Bundle Analysis: TypeScript compilation optimization
  • Responsive Images: Adaptive loading based on device

πŸ” SEO Features

βœ… Meta Tags - Comprehensive OpenGraph support
βœ… Canonical URLs - Proper URL structure
βœ… Sitemap - Auto-generated for all districts
βœ… JSON-LD Schema - Structured data for search engines
βœ… Robots.txt - Search engine indexing guidance
βœ… Analytics - Vercel Analytics integration


🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your code follows the ESLint configuration and includes appropriate TypeScript types.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™‹ FAQ

Q: Does Himali Weather cover all 77 districts of Nepal?
A: Yes! Himali Weather provides weather forecasts for all 77 districts across Nepal's 7 provinces through an interactive map, search functionality, and direct district links.

Q: What weather information is available?
A: Each district page displays temperature, feels-like temperature, humidity, wind speed/direction, precipitation, elevation, UV index, sunrise, sunset, hourly conditions, and a 7-day forecast.

Q: Why do different districts show different weather on the same day?
A: Nepal has significant elevation and terrain differences. Weather varies considerably between the flat Terai region, hill districts, valleys, and high Himalayan areas, resulting in diverse conditions.

Q: Is the data real-time?
A: Yes, weather data is fetched from Open-Meteo API in real-time and updated regularly throughout the day.

Q: Does the site work on mobile?
A: Absolutely! Himali Weather is fully responsive and optimized for all devices from smartphones to desktops.

Q: Is there an API available?
A: Currently, the site uses Open-Meteo API for weather data. Custom API offerings are not available, but the Open-Meteo API is free and open for integration.


πŸ“ž Support & Contact

For issues, suggestions, or feedback:


🌟 Acknowledgments

  • Open-Meteo - Free weather data API
  • React & Vite - Amazing development tools
  • Tailwind CSS - Beautiful utility-first styling
  • Framer Motion - Smooth animations
  • Vercel - Excellent hosting platform

Made with ❀️ by Aakash Puree

⭐ If you find this project helpful, please consider giving it a star!

About

Himali Weather - Interactive weather forecasting platform covering all 77 districts of Nepal with live updates, 7-day forecasts, and an intuitive district map.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages