Skip to content

Sarveshwaran20/Global-Temperature-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global Temperature Tracker & Climate Awareness Platform

A comprehensive web application for tracking global temperatures and promoting climate change awareness through interactive features and pledge systems.

Features

🌡️ Temperature Tracking

  • Real-time temperature data for multiple cities
  • Interactive graphs comparing temperature changes
  • 5-day weather forecasts
  • Historical temperature analysis

🌍 Climate Awareness

  • Educational content about global warming
  • Interactive quiz with climate facts
  • Carbon footprint calculator
  • Timeline of climate change events

🤝 Community Engagement

  • Pledge System: Users can take pledges to help combat climate change
  • Voting System: Community polls on climate solutions
  • Device-based Tracking: One pledge/vote per device for fair participation
  • Real-time Counter: Live display of total pledges taken

🛠️ Technical Features

  • Responsive Design: Works on all devices
  • Lazy Loading: Optimized performance

Project Structure

Global_Temperature_Tracker/
├── index.html          # Main landing page
├── awareness.html      # Climate awareness page with pledge system
├── data.html          # Temperature data visualization
├── map.html           # Interactive map view
├── pledge_server.py   # Flask backend API
├── script.js          # Frontend JavaScript
├── styles.css         # Styling
├── requirements.txt   # Python dependencies
├── global_temperatures.csv  # Sample temperature data
└── README.md          # This file

Setup Instructions

1. Install Dependencies

pip install -r requirements.txt

2. Start the Backend Server

python pledge_server.py

The server will run on http://localhost:5000

3. Open the Website

Open index.html in your web browser to access the application.

API Endpoints

  • GET /get_pledge - Get current pledge count
  • POST /take_pledge - Take a new pledge
  • POST /has_pledged - Check if device has pledged
  • POST /reset_pledge - Reset all pledges (admin)
  • GET /get_votes - Get current vote counts
  • POST /vote - Cast a vote
  • POST /has_voted - Check if device has voted
  • POST /reset_votes - Reset all votes (admin)

Recent Updates

2025-01-03

  • Weather Icons: Added visual weather indicators
  • Graph Improvements: Only display completed/current month data
  • Enhanced Weather Info: Additional meteorological data

2024-12-15

  • Responsive Layout: Split page into containers
  • Temperature Comparison: Interactive graphs
  • 5-Day Forecast: Extended weather predictions
  • Mobile Optimization: Improved phone viewing

2024-12-07

  • Auto-loading Data: Predetermined temperature updates
  • Complete Re-theme: Modern design overhaul
  • Batch Data Fetching: Optimized data loading
  • Removed Satellite Images: Streamlined functionality

2024-12-05 (Latest)

  • Pledge System: Complete backend integration
  • Voting System: Community engagement features
  • Performance Optimization: Lazy loading and caching
  • Code Cleanup: Removed debug logs and test functions
  • Error Handling: Improved reliability and user experience

Dark Mode Support (2025-08)

  • All major pages (index, data, map, alert, awareness, earth_pulse) now fully support dark mode.
  • Tables, buttons, banners, input fields, and map overlays adapt automatically when the theme is toggled.
  • To switch themes, use the "Toggle Theme" button on any page. Your preference is saved for future visits.
  • Improved accessibility and color contrast for all interactive elements in both light and dark modes.

About

A website to track and compare global temperature

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published