Urban Infill Development Platform
RePlot transforms urban planning by identifying underutilized land and analyzing its potential for sustainable residential development. Using AI-powered site identification, comprehensive environmental impact analysis, algorithms for data score generation, and realistic visualizations, RePlot helps cities grow smarter, not just bigger.
- Automated Urban Scanning: Uses Google Gemini to scan cities and identify underused land such as parking lots, vacant industrial sites, and low-traffic retail areas.
- Smart Exclusions: Automatically skips schools, religious buildings, and active public parks.
- Accurate Mapping: Matches satellite images with map coordinates in real time to ensure precise site identification.
- Hybrid Analysis Engine: Combines AI pattern recognition with proven scientific models to validate each site.
- Heat Analysis: Calculates land surface temperature using satellite thermal data to measure existing heat buildup.
- Climate Trends: Analyzes past temperatures and predicts future trends for each location. to give location suggestions
- Once a site is selected, the Impact Engine (impact_engine.py) runs a linear regression analysis on that specific lat/lng. It combines:
Historical Data: A 7-year lookback (2018–2024) based on local baseline temperatures. Predictive Noise: It injects an upward climate trajectory (averaging
$+0.4^\circ\text{C}$ per year) to visualize the "Cost of Inaction" if the site remains asphalt.
- Carbon Reduction: Estimates how much CO₂ can be removed each year through green roofs and urban trees.
- Urban Cooling: Calculates how much new greenery can lower local temperatures and reduce heat island effects.
- Biodiversity Impact: Measures ecological value using area, quality, and habitat condition.
- Material Reuse: Tracks how much wood, concrete, and brick can be reused instead of discarded.
- Site Characteristics: Evaluates drainage, sunlight exposure, and walkability in real time.
- Site Masking: Identifies unused space and visually replaces it without altering surrounding structures.
- Design Visuals: Generates realistic “after” images and code-ready floor plans directly on top of real site photos.
- Automated Reports: Creates city-ready PDF proposals with clear analysis and findings.
- Clear Summaries: Includes easy-to-read explanations for zoning, regulations, and community impact.
- Financial Breakdown: Provides cost estimates, return projections, and investment details.
- Live Maps: Combines interactive Mapbox maps with high-resolution satellite imagery.
- Boundary Highlighting: Automatically outlines site boundaries based on calculated data.
- Question bubbles:* to help those who may not understand the terms used, be able to learn how everything works, and what is being calculated. Simple UI with colors that make navigating the site easier, simpler, and straightforward.
- React 18 + Vite - Modern UI framework
- Tailwind CSS - Utility-first styling
- Framer Motion - Smooth animations
- Mapbox GL - Interactive maps
- Recharts - Data visualizations
- FastAPI - High-performance Python API
- OpenRouter - AI model access (Gemini models)
- Google Maps API - Geocoding and satellite imagery
- ReportLab - PDF generation
- Google Gemini 2.0 Flash - Site analysis and vision
- Google Gemini 3 Pro Image Preview - AI image generation for visualizations
- Node.js 18+ and npm
- Python 3.12+
- API Keys:
- Mapbox Token
- Google Maps API Key
- OpenRouter API Key (optional, for AI features)
-
Clone the repository
git clone https://github.com/Yimo-Liu-13196/SwampHacks.git cd SwampHacks/replot -
Install frontend dependencies
npm install
-
Install backend dependencies
cd backend pip install -r requirements.txt -
Configure environment variables
Create a
.envfile in thereplotdirectory:VITE_MAPBOX_TOKEN=your_mapbox_token_here VITE_GOOGLE_MAPS_KEY=your_google_maps_key_here GOOGLE_MAPS_KEY=your_google_maps_key_here OPENROUTER_API_KEY=your_openrouter_key_here ELEVENLABS_KEY=your_elevenlabs_key_here MONGO_URI=your_mongodb_uri_here
-
Start the backend server
cd backend python main.pyBackend runs on
http://localhost:8000 -
Start the frontend dev server
npm run dev
Frontend runs on
http://localhost:5173 -
Open your browser Navigate to
http://localhost:5173
- Enter a city name in the search bar
- AI analyzes the city and identifies potential infill sites
- Results appear on an interactive map with sustainability scores and more data!
- Click on any site marker to view detailed analysis
- Review sustainability metrics, financial projections, and environmental impact
- View AI-generated visualizations of proposed development
- Click "Generate Proposal" to create a professional PDF
- Includes all analysis, formulas, and data sources
- Download and share with stakeholders
- Click "Show Validation" to view the data transparency dashboard
- See all formulas, sources, and methodology
- Verify integrity scores and compliance status
- See all the sources that were used for analyzing data to manually cross-verify
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Health check |
/search |
POST | Find infill sites in a city |
/analyze |
POST | Analyze a specific site |
/visualize |
POST | Generate AI visualization |
/generate_pdf |
POST | Create PDF proposal |
# Search for sites
curl -X POST http://localhost:8000/search \
-H "Content-Type: application/json" \
-d '{"city": "Orlando, FL"}'
# Analyze a site
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{
"lat": 28.5383,
"lng": -81.3792,
"address": "120 N Orange Ave, Orlando, FL"
}'SwampHacks/
├── replot/
│ ├── src/
│ │ ├── App.jsx # Main application component
│ │ ├── components/
│ │ │ ├── LandingPage.jsx # Search interface
│ │ │ ├── Sidebar.jsx # Detailed analysis panel
│ │ │ ├── LeftPanel.jsx # Quick stats panel
│ │ │ ├── ProposalModal.jsx # Proposal generation
│ │ │ ├── ValidationModal.jsx # Data transparency
│ │ │ ├── TargetList.jsx # Site rankings
│ │ │ └── ...
│ │ └── main.jsx
│ ├── backend/
│ │ ├── main.py # FastAPI server
│ │ ├── impact_engine.py # Sustainability calculations
│ │ └── requirements.txt
│ ├── .env # Environment variables
│ └── package.json
└── README.md # This file
- Carbon Offset: Annual CO₂ removal (tons/year)
- Net Est. ROI: Return on investment percentage
- Biodiversity Units: Habitat value gained
- Temperature Reduction: Heat island mitigation (°C)
- Permeability: Stormwater management (%)
- Solar Potential: PV generation capacity (kWh/m²/day)
- Walk Score: Transit accessibility (0-100)
- Waste Diversion: Circular economy recovery (tons)
See ALL_METRICS_FORMULAS.md for complete formula reference.
| Variable | Description | Required |
|---|---|---|
VITE_MAPBOX_TOKEN |
Mapbox access token | Yes |
VITE_GOOGLE_MAPS_KEY |
Google Maps API key (frontend) | |
GOOGLE_MAPS_KEY |
Google Maps API key (backend) | |
OPENROUTER_API_KEY |
OpenRouter API key for AI models |
# Backend tests
cd backend
python test_backend.py
# Frontend linting
npm run lint# Frontend build
npm run build
# Preview production build
npm run preview- All Metrics Formulas - Complete formula reference
This project was developed for the SwampHacks hackathon.
- Yimo Liu - @Yimo-Liu-13196
- Pranavsai Gandikota - @pranavsaigandikota
- Jaime Breitkreutz - @jaimeb18
- Akhilesh Mallu - @akhileshreddym
- NASA - Landsat 8 thermal analysis algorithms
- Stanford Natural Capital Project - InVEST ecosystem services model
- IPCC - Carbon accounting standards
- UK Environment Act 2021 - Biodiversity Net Gain metric
- EPA - Stormwater and resource recovery standards
- OpenRouter - AI model access
- Mapbox - Mapping infrastructure
- Google Maps - Geocoding and satellite imagery
Built with ❤️ for sustainable urban development by team replot from UF and UCF