Skip to content
ย 
ย 

Repository files navigation

EcoPulse - Environmental Pollution Visualization

EcoPulse Banner Three.js License

Interactive 3D exploration of environmental pollution data through immersive visualizations. Built for Hackathon 2024 with Three.js, Chart.js, and vanilla JavaScript.

๐ŸŽฏ Overview

EcoPulse makes complex environmental data accessible through engaging 3D visualizations:

  • Air Pollution: Animated city skyline with particle-based smog simulation
  • Water Pollution: River flow with contamination particles and clickable hotspots
  • Light Pollution: Night sky visualization with light pollution intensity controls

โœจ Features

๐ŸŽจ Interactive 3D Visualizations

  • Real-time Three.js scenes with WebGL optimization
  • Particle systems for pollution visualization
  • Camera orbit and tap-to-focus controls
  • Mobile-responsive with touch gestures

๐Ÿ“Š Data Analytics

  • Chart.js visualizations (bar, line, radial gauges)
  • Regional pollution comparisons (Asia, Europe, Americas, Africa, Oceania)
  • Historical trend analysis (2018-2024)
  • Real-time data updates based on user interaction

๐ŸŽฎ Interactivity

  • Pollution level sliders (0-100%)
  • Region selector dropdown
  • Day/night toggle for light pollution
  • Export current view as PNG
  • Share functionality

โ™ฟ Accessibility

  • WCAG AA compliant
  • Keyboard navigation (Tab, Arrow keys, Escape)
  • ARIA attributes for screen readers
  • High contrast mode support
  • Focus indicators

๐Ÿ“ฑ Mobile-First Design

  • Responsive breakpoints (mobile, tablet, desktop)
  • Touch controls (pinch-to-zoom, swipe)
  • PWA support with offline capabilities
  • Optimized for low-end devices

๐ŸŽ Bonus Features

  • AI prompt generator for mitigation strategies
  • Ambient environmental sounds toggle
  • Shader effects for enhanced visuals
  • Presentation mode for hackathon judging


๐ŸŒ๐Ÿ’š ECO๐ŸŒฑPULSE โ€” Where Technology Meets Sustainability

โšก The Future of Environmental Awareness, Visualized.

EcoPulse is an advanced, interactive web platform designed to showcase the power of data-driven sustainability.
Built with love and precision, it brings together real-time analytics, immersive data visualization, and clean, futuristic UI โ€” all wrapped in a smooth, responsive experience inspired by next-gen tech aesthetics.


๐ŸŒ Visit the Live Website

๐Ÿ’ซ ๐Ÿ”— Explore EcoPulse โ€” Click Here to Visit ๐Ÿ’ซ

Dive into a visually rich experience that turns environmental insights into interactive stories.
From climate data patterns to ecological impact analysis โ€” EcoPulse makes information come alive.


๐Ÿ’ก What Makes EcoPulse Special

  • ๐ŸŒฑ Real-time interactive dashboards
  • ๐Ÿ“Š Data visualization that speaks louder than numbers
  • ๐Ÿง  Built using modern web technologies (React, Tailwind, Next.js)
  • โš™๏ธ Optimized for performance, minimal latency & responsive scaling
  • ๐Ÿ–ค Designed with an eco-minimalist philosophy

๐Ÿ› ๏ธ Our Mission

Empower individuals and organizations to understand, visualize, and act on environmental change โ€” through the beauty of interactive technology.

EcoPulse is not just another website โ€” itโ€™s a call to rethink how data and design can drive sustainability.


โญ Join the Movement

If you believe in technology for a greener tomorrow:
๐ŸŒŸ Star the repo, share your ideas, and be a part of EcoPulse.
Together, letโ€™s make innovation serve the planet ๐ŸŒŽโš™๏ธ


๐Ÿš€ Quick Start

Prerequisites

  • Modern web browser (Chrome 90+, Firefox 85+, Safari 14+, Edge 90+)
  • Local development server (Python, Node.js, or PHP)

Installation

  1. Clone or download the project

    git clone <repository-url>
    cd Hacknova
  2. Start a local server

    Option A: Python 3

    python -m http.server 8000

    Option B: Node.js

    npx serve .

    Option C: PHP

    php -S localhost:8000
  3. Open in browser

    http://localhost:8000
    

๐Ÿ“ Project Structure

Hacknova/
โ”œโ”€โ”€ index.html                 # Landing page
โ”œโ”€โ”€ air.html                   # Air pollution visualization
โ”œโ”€โ”€ water.html                 # Water pollution visualization
โ”œโ”€โ”€ light.html                 # Light pollution visualization
โ”œโ”€โ”€ presentation.html          # Hackathon presentation slides
โ”œโ”€โ”€ manifest.json              # PWA manifest
โ”œโ”€โ”€ README.md                  # Documentation
โ”œโ”€โ”€ css/
โ”‚   โ””โ”€โ”€ styles.css             # Custom styles
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ main.js                # Core functionality
โ”‚   โ”œโ”€โ”€ air-3d.js              # Air pollution 3D scene
โ”‚   โ”œโ”€โ”€ water-3d.js            # Water pollution 3D scene
โ”‚   โ”œโ”€โ”€ light-3d.js            # Light pollution 3D scene
โ”‚   โ”œโ”€โ”€ charts.js              # Chart.js visualizations
โ”‚   โ”œโ”€โ”€ shared.js              # Shared utilities (export, accessibility)
โ”‚   โ””โ”€โ”€ bonus-features.js      # AI suggestions, sounds, effects
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ sample-data.json       # Pollution metrics dataset
โ””โ”€โ”€ assets/
    โ”œโ”€โ”€ models/                # 3D models (glTF/glb)
    โ”œโ”€โ”€ sounds/                # Ambient audio files
    โ””โ”€โ”€ images/                # Images and icons

๐ŸŽจ Technology Stack

  • Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
  • 3D Graphics: Three.js r128 (via CDN)
  • Data Visualization: Chart.js (via CDN)
  • Styling: Tailwind CSS + Custom CSS
  • Fonts: Google Fonts (Inter)
  • PWA: Service Worker + Manifest

๐Ÿ“Š Data Integration

Using Sample Data

The project includes data/sample-data.json with comprehensive pollution metrics:

{
  "pollution_data": {
    "air": { "current_data": {...}, "historical_trends": {...} },
    "water": { "current_data": {...}, "historical_trends": {...} },
    "light": { "current_data": {...}, "historical_trends": {...} }
  }
}

Integrating Real APIs

To replace sample data with live API data:

  1. Modify js/charts.js:

    async loadData() {
        try {
            // Replace with your API endpoint
            const response = await fetch('https://api.example.com/pollution');
            this.data = await response.json();
            this.initializeCharts();
        } catch (error) {
            console.error('API load failed:', error);
            this.loadFallbackData();
        }
    }
  2. Recommended APIs:

๐ŸŒ Deployment

Deploy to Netlify (One-Liner)

npx netlify-cli deploy --prod --dir .

Deploy to Vercel

npx vercel --prod

Deploy to GitHub Pages

  1. Push to GitHub repository
  2. Settings โ†’ Pages โ†’ Select branch โ†’ Save

Deploy to Firebase

npm install -g firebase-tools
firebase login
firebase init hosting
firebase deploy

๐ŸŽฎ Usage Guide

Navigation

  • Desktop: Click navigation links, use mouse to interact with 3D scenes
  • Mobile: Tap menu icon, swipe to navigate, pinch-to-zoom on 3D scenes

Controls

  • Pollution Slider: Adjust pollution levels (0-100%)
  • Region Selector: Choose geographic region for data
  • Day/Night Toggle: Switch light pollution visualization mode
  • Export Button: Save current view as PNG image
  • Share Button: Copy shareable link

Keyboard Shortcuts

  • Tab: Navigate between interactive elements
  • Arrow Keys: Navigate presentation slides
  • Escape: Close modals and dropdowns
  • Spacebar: Play/pause animations (where applicable)

๐Ÿ”ง Customization

Changing Colors

Edit css/styles.css:

:root {
    --eco-blue: #0ea5e9;
    --eco-green: #10b981;
    --eco-orange: #f97316;
    --eco-red: #ef4444;
}

Adjusting 3D Scene Performance

In js/air-3d.js (similar for other scenes):

const particleCount = Math.min(1000, Math.floor(this.pollutionLevel * 15));
// Reduce multiplier for better performance: * 10 instead of * 15

Adding New Data Regions

Update data/sample-data.json:

{
  "pollution_data": {
    "air": {
      "current_data": {
        "new_region": {
          "pm25": 30.5,
          "aqi": 120,
          ...
        }
      }
    }
  }
}

โšก Performance Optimization

Current Optimizations

  • Particle count scales with device capability
  • LOD (Level of Detail) for 3D models
  • Lazy loading of assets
  • Debounced window resize handlers
  • RequestAnimationFrame for smooth 60fps
  • CDN usage for faster library loading

Further Optimizations

  • Use production builds of Three.js
  • Implement code splitting
  • Enable gzip compression on server
  • Add service worker for offline caching
  • Minify CSS and JavaScript

๐Ÿ› Troubleshooting

3D Scenes Not Loading

  • Issue: WebGL not supported
  • Solution: Fallback SVG animations will display automatically

Charts Not Rendering

  • Issue: Chart.js CDN failed to load
  • Solution: Check internet connection or use local Chart.js file

Mobile Performance Issues

  • Issue: Laggy animations on older devices
  • Solution: Reduce particle count in *-3d.js files

CORS Errors with Local Files

  • Issue: Cannot load JSON data
  • Solution: Must use a local server (see Quick Start)

๐Ÿ“– Browser Support

Browser Version Status
Chrome 90+ โœ… Full Support
Firefox 85+ โœ… Full Support
Safari 14+ โœ… Full Support
Edge 90+ โœ… Full Support
Opera 76+ โœ… Full Support
Mobile iOS 14+ / Android 10+ โœ… Full Support

๐Ÿค Contributing

This is a hackathon project, but contributions are welcome!

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

๐Ÿ“„ License

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

๐Ÿ™ Acknowledgments

  • Data Sources: WHO, EPA, Scientific Research Papers
  • Libraries: Three.js, Chart.js, Tailwind CSS
  • Inspiration: Environmental awareness campaigns worldwide
  • Event: Hackathon 2024

๐Ÿ“ง Contact

Project Team: EcoPulse Development Team
Event: Hackathon 2024
Category: Environmental Data Visualization


Built with โค๏ธ for environmental awareness | Hackathon 2024

About

We are working on project of detecting air pollution.Water percent noise pollution using s thirty two based on a web based api with serial monitoring

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages