"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Badge } from "@/components/ui/badge"; import { Progress } from "@/components/ui/progress"; import { Slider } from "@/components/ui/slider"; import { ChevronRight, Home, BarChart2, LineChart, Droplets, Wind, Sun, MapPin, Bus, School, ShoppingBag, Building, ArrowRight, Info, FileText, RefreshCw, Check, ChevronDown, } from "lucide-react"; import Link from "next/link"; import PageHeader from "@/components/page-header"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; export default function PricePredictionPage() { const [propertySize, setPropertySize] = useState(150); const [propertyAge, setPropertyAge] = useState(5); const [adjustedPrice, setAdjustedPrice] = useState(15000000); const [activeTab, setActiveTab] = useState("property-details"); const [selectedModel, setSelectedModel] = useState("Standard ML Model v2.4"); const models = [ "Standard ML Model v2.4", "Enhanced Neural Network v1.8", "Geospatial Regression v3.1", "Time Series Forecast v2.0", "Custom Model (User #1242)", ]; const handleSizeChange = (value: number[]) => { setPropertySize(value[0]); // Simple calculation for demo purposes const newPrice = 15000000 + (value[0] - 150) * 50000; setAdjustedPrice(newPrice); }; const handleAgeChange = (value: number[]) => { setPropertyAge(value[0]); // Simple calculation for demo purposes const newPrice = 15000000 - (value[0] - 5) * 200000; setAdjustedPrice(newPrice); }; const handleGenerateReport = () => { // In a real implementation, this would generate and download a PDF alert("Generating PDF report with the selected model: " + selectedModel); }; return (
Map Price Prediction Model
{models.map((model) => ( setSelectedModel(model)} className="flex items-center gap-2"> {model === selectedModel && } {model} ))} Manage Models...
Property Details Feature Analysis Market Comparison Environmental Factors Final Prediction
Property Details 123 Sukhumvit Road, Bangkok
Type Condominium
Size {propertySize} sqm
Bedrooms 3
Bathrooms 2
Age {propertyAge} years
Floor 15
Adjust Parameters See how changes affect the prediction
Property Size {propertySize} sqm
Property Age {propertyAge} years
Adjusted Price ฿{adjustedPrice.toLocaleString()}

{adjustedPrice > 15000000 ? "+" : ""} {adjustedPrice - 15000000 === 0 ? "±0" : (adjustedPrice - 15000000).toLocaleString()} THB from original prediction

Property Overview Basic information used in our prediction model

Our AI model begins by analyzing the core attributes of your property. These fundamental characteristics form the baseline for our prediction.

Property Type

Condominium properties in this area have specific market dynamics

Size & Layout

150 sqm with 3 bedrooms and 2 bathrooms

Property Age

Built 5 years ago, affecting depreciation calculations

Floor & View

Located on floor 15, impacting value and desirability

Feature Analysis How different features impact the predicted price

Our model analyzes various features of your property and determines how each one contributes to the final price prediction. Below is a breakdown of the most important factors.

Location
+35%
Size
+25%
Age
-15%
Amenities
+10%
Floor
+8%
Air Quality
-7%

Key Insights

  • Location is the strongest factor, contributing +35% to the price
  • The property's size (150 sqm) positively impacts the valuation
  • The age of the property (5 years) has a moderate negative impact (-15%)
  • Poor air quality in the area reduces the value by 7%
  • High floor (15) adds a premium of 8% to the property value
Market Comparison How your property compares to similar properties in the area

Our model analyzes comparable properties in the same area to provide context for your property's valuation. This helps ensure the prediction is aligned with current market conditions.

Property Size Bedrooms Age Floor Price Price/sqm
Your Property 150 sqm 3 5 years 15 ฿15,000,000 ฿100,000
Comp #1 145 sqm 3 4 years 12 ฿14,500,000 ฿100,000
Comp #2 160 sqm 3 6 years 18 ฿15,800,000 ฿98,750
Comp #3 140 sqm 2 3 years 10 ฿13,800,000 ฿98,571
Comp #4 155 sqm 3 7 years 14 ฿14,700,000 ฿94,839

Market Analysis

  • Your property's predicted price is in line with comparable properties
  • The price per square meter (฿100,000) is slightly above the area average
  • Properties on higher floors command a 3-5% premium in this building
  • Recent sales in this area show a stable market with slight appreciation
Environmental Factors How environmental conditions affect the property value

Environmental factors can significantly impact property values. Our model considers various environmental conditions to provide a more accurate prediction.

Flood Risk

Moderate

Historical data shows moderate flood risk in this area

Air Quality

Poor

Air quality is below average, affecting property value

Noise Level

Low

The area has relatively low noise pollution

Proximity to Amenities

Public Transport

300m

Schools

1.2km

Shopping

500m

Hospitals

2.5km

Environmental Impact Analysis

  • The moderate flood risk reduces the property value by approximately 3%
  • Poor air quality has a negative impact of about 7% on the valuation
  • Excellent proximity to public transport adds a 4% premium
  • Overall, environmental factors have a -6% net impact on the property value
Final Prediction The predicted price and confidence level

Predicted Price

฿15,000,000

Confidence Level: 92%

Price Range

Based on our model's confidence level, the price could range between:

Lower Bound

฿14,250,000

Prediction

฿15,000,000

Upper Bound

฿15,750,000

Summary of Factors

The final prediction is based on a combination of all factors analyzed in previous steps:

  • Property characteristics (size, age, layout)
  • Location and neighborhood analysis
  • Market trends and comparable properties
  • Environmental factors and amenities
); }