Skip to content

Mapping and monitoring urban forests across Indian cities to create healthier, greener urban environments.

Notifications You must be signed in to change notification settings

liveupx/MyTreeMap

Repository files navigation

MyTreeMap Demo

MyTreeMap Demo

🌳 MyTreeMap

An interactive urban forestry platform for Indian cities

MyTreeMap is an open-source platform that maps, monitors, and celebrates India's urban forests. The project aims to create awareness about the importance of trees in our cities and provide valuable data for urban forest management and conservation efforts.

GitHub stars License: MIT Live Demo Demo Video

πŸ“‹ Quick Links

πŸ† Hackathon Submission - Website Track

Project Purpose

MyTreeMap serves as an educational and environmental platform focused on raising awareness about urban forests in India. It visualizes tree data, provides environmental impact insights, and encourages community engagement with urban forestry initiatives.

Target Audience

  • Environmental Activists: Individuals working on urban forest conservation
  • Urban Planners & Municipal Bodies: Officials making decisions about urban green spaces
  • Educational Institutions: Schools and universities teaching about environmental science
  • General Public: Citizens interested in their city's green infrastructure

Key Interactive Elements

  • Interactive Map: Explore urban tree coverage across major Indian cities
  • City Statistics Dashboard: Data visualization of environmental impact metrics
  • AI Tree Identifier: Claude-powered tool for identifying tree species from photos
  • Audio Guides: ElevenLabs-powered narrations about urban forests in each city
  • Community Contributions: Supabase-powered platform for sharing tree planting stories
  • Embeddable Widgets: Tools for sharing tree data on external websites

Desired Visitor Actions

  • Explore tree distribution and environmental impact data for their city
  • Identify trees using the AI-powered tree identification tool
  • Share their tree planting and conservation stories
  • Embed interactive widgets on their own websites
  • Learn about urban forestry research and government initiatives

Technology Integrations

  • Claude AI (Anthropic): Powers the tree species identification feature
  • Supabase: Manages user contributions and community engagement data
  • ElevenLabs: Provides text-to-speech narration for city tree tours
  • Sentry: Monitors application performance and tracks errors

πŸ“Έ Screenshots

Screenshot 1 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 9 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Screenshot 9 Screenshot 10 Screenshot 11 Screenshot 12 Screenshot 13 Screenshot 14 Screenshot 15 Screenshot 16 Screenshot 17

πŸ“Š Environmental Impact Data (2024)

City 🌳 Trees 🌿 COβ‚‚ Sequestration πŸ’¨ AQI Improvement
Delhi 2.38M 18,000 tons/yr 15-20 points
Mumbai 1.2M 12,500 tons/yr 10-15 points
Bangalore 1.8M 8,000 tons/yr 8-12 points

πŸ›οΈ Government Initiatives

National Programs

  • Green India Mission: β‚Ή944 Cr allocated
  • Nagar Van Yojana: 546 urban forests approved
  • Ek Ped Maa Ke Naam: 135 crore trees target

State Highlights

  • Delhi: Tree Transplantation Policy
  • Maharashtra: Mangrove Cell
  • Karnataka: Urban Forestry Project

✨ Features

  • πŸ—ΊοΈ Interactive Tree Map: Explore tree locations across major Indian cities
  • πŸ“ˆ City Statistics: View detailed tree statistics for each city
  • 🌀️ Air Quality Data: Real-time AQI data and its correlation with tree cover
  • πŸ€– AI Tree Identification: Identify tree species from photos using Claude AI
  • πŸ”Š Audio Tours: Listen to narrated guides about each city's urban forest
  • πŸ‘₯ Community Stories: Share and view tree planting initiatives from citizens
  • πŸ“± Embeddable Widgets: Free widgets to share tree data on your website
  • 🌿 Environmental Impact: Visualize the benefits of urban trees on air quality and climate
  • πŸ“š Research Integration: Access to research papers and methodologies

πŸ™οΈ City Coverage

The platform currently includes data for the following cities:

  • πŸ™οΈ Delhi
  • πŸ™οΈ Mumbai
  • πŸ™οΈ Bangalore
  • πŸ™οΈ Chennai
  • πŸ™οΈ Kolkata
  • πŸ™οΈ Hyderabad
  • πŸ™οΈ Ahmedabad
  • πŸ™οΈ Pune

More cities are being added regularly

πŸ› οΈ Technologies Used

React TypeScript Tailwind CSS MapBox Supabase Sentry

  • 🎨 shadcn/ui components
  • πŸ“Š Recharts for data visualization
  • πŸ” Lucide Icons for beautiful iconography
  • πŸ”„ TanStack Query for efficient data fetching
  • πŸ€– Claude AI for tree species identification
  • πŸ”Š ElevenLabs for audio tour narration
  • 🚨 Sentry for error tracking and monitoring

πŸš€ Running Locally

  1. Clone the repository:
git clone https://github.com/liveupx/MyTreeMap.git
cd MyTreeMap
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with:
VITE_MAPBOX_TOKEN=pk.YOUR_OWN_TOKEN_KEY
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

πŸ“ Project Structure

src/
β”œβ”€β”€ components/           # UI components
β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   β”œβ”€β”€ MapBox.tsx        # Map rendering component
β”‚   β”œβ”€β”€ TreeIdentifier.tsx # Claude AI tree identification
β”‚   β”œβ”€β”€ AudioGuide.tsx    # ElevenLabs audio narration
β”‚   β”œβ”€β”€ StatsPanel.tsx    # City statistics visualizations
β”‚   └── ...               # Other components
β”œβ”€β”€ pages/                # Application pages
β”‚   β”œβ”€β”€ Index.tsx         # Homepage
β”‚   β”œβ”€β”€ About.tsx         # About page
β”‚   └── ...               # Other pages
β”œβ”€β”€ hooks/                # Custom React hooks
β”œβ”€β”€ lib/                  # Utilities and helper functions
β”œβ”€β”€ App.tsx               # Main application component
└── main.tsx              # Application entry point with Sentry

πŸ”Œ Embedding Widgets

MyTreeMap provides free embeddable widgets that can be added to any website:

  1. Visit https://preview--treecity-explorer.lovable.app/widgets
  2. Choose a widget type (Tree Count, AQI, or Statistics)
  3. Customize the widget
  4. Copy the embed code and paste it into your website

Example embed code:

<iframe 
  src="https://preview--treecity-explorer.lovable.app/embed?city=Delhi&type=treeCount&theme=light" 
  width="300" 
  height="200" 
  frameborder="0"
  title="MyTreeMap - Delhi tree count widget"
></iframe>

πŸ‘₯ Contributing

We welcome contributions from developers, data scientists, urban planners, and tree enthusiasts!

How 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 some amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you would like to change.

πŸ“Š Data Sources & Methodology

MyTreeMap uses data from various sources, including:

  • πŸ™οΈ Municipal corporation tree censuses
  • πŸ›°οΈ Satellite imagery analysis
  • πŸ‘₯ Community reporting
  • πŸ”¬ Scientific research studies

For more information about our data methodology, visit https://preview--treecity-explorer.lovable.app/methodology

πŸ”§ Technical Implementation

The MyTreeMap application integrates several advanced technologies:

Claude AI Integration

The TreeIdentifier component demonstrates Claude integration by:

  • Simulating an AI-powered tree species identification feature
  • Processing uploaded images and returning structured tree data
  • Providing confidence scores and environmental benefits information

Supabase Integration

The project uses Supabase for data storage and user contributions:

  • The supabase-client.ts file initializes the Supabase client with demo credentials
  • Community contributions are stored and retrieved from Supabase tables
  • File storage is simulated for tree images
  • Fallback to mock data when in demo mode ensures the UI remains functional

Sentry Integration

Error tracking and monitoring with Sentry:

  • Initialized in main.tsx with proper DSN configuration
  • React Router instrumentation configured in App.tsx for route-based error tracking
  • Error boundaries wrap the application to provide graceful failure handling
  • Custom error capture for API failures with proper context

ElevenLabs Integration

Audio narration capabilities:

  • The AudioGuide component uses ElevenLabs for text-to-speech narration
  • Uses ElevenLabs voices for natural-sounding city tour guides
  • Provides fallback audio content for demo mode

Lovable Implementation

The entire application is built using Lovable:

  • React and TypeScript for robust frontend development
  • Tailwind CSS for responsive design
  • shadcn/ui components for consistent UI patterns
  • Modular component architecture for maintainability
  • Responsive design principles throughout the application

This architecture ensures the application demonstrates all required integrations while maintaining a clean, maintainable codebase that gracefully handles both online and offline/demo scenarios.

🧩 Interactive Elements

The MyTreeMap platform offers several key interactive features that engage visitors:

Interactive Map:

  • The MapBox component allows users to explore urban tree coverage across major Indian cities
  • Users can zoom in/out and pan across the map
  • Tree locations are plotted with interactive markers

City Selector:

  • Dropdown menu enabling users to switch between different Indian cities
  • Each selection updates the map view, statistics, and environmental impact data

AI Tree Identifier:

  • Claude-powered feature allowing users to upload tree photos
  • Image processing provides species identification with confidence scores
  • Displays detailed information about identified tree species and benefits

Audio Guide Tours:

  • ElevenLabs-powered narration about urban forests in each city
  • Play/pause functionality with visual playback indicators
  • Audio controls for volume adjustment

Community Contributions:

  • Supabase-powered feature where users can view and share tree planting stories
  • Image upload capability for community contribution photos
  • Like and comment functionality on community posts

Environmental Impact Dashboard:

  • Interactive data visualizations showing environmental metrics
  • Toggles between different environmental impact categories
  • Responsive charts that adapt to different screen sizes

🚢 Visitor Actions

The platform encourages several key user actions:

1. Exploration:

  • Visitors can explore tree distribution across different cities
  • View detailed statistics about urban forests in each location
  • Access research data and methodology information

2. Identification:

  • Upload photos to identify tree species using AI technology
  • Learn about specific tree benefits and characteristics
  • Discover native and non-native species in their area

3. Contribution:

  • Share personal tree planting experiences and photos
  • Engage with content from other community members
  • Participate in tree planting initiatives

4. Learning:

  • Listen to audio narrations about urban forests
  • Access research papers and government initiatives
  • Understand environmental impacts of urban trees

5. Sharing:

  • Embed interactive tree data widgets on external websites
  • Share city statistics and environmental impact data
  • Integrate tree count displays on personal or organization sites

The platform is designed to be educational, engaging, and action-oriented, encouraging visitors to not only learn about urban forests but also participate in their preservation and expansion.

πŸ“ž Contact & Support

🀝 Partners

Liveupx.com MentorJi.live Widgetx.Site SayEarth.Org CaringAdoptions.org Pitch-Deck.Agency Gurjar.App AlfaCare

πŸ“„ License

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

πŸ™ Acknowledgments

  • πŸ‘¨β€πŸ’» Developed by Mohit Chaprana, Founder of Liveupx.com
  • πŸŒ† Inspired by NYC's Tree Map project
  • 🀝 Thanks to all our partner organizations
  • ✨ Special thanks to all contributors and tree enthusiasts

About

Mapping and monitoring urban forests across Indian cities to create healthier, greener urban environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages