{
    "title": "ProjectLIGTAS Flood Risk Prediction API",
    "version": "1.0.0",
    "description": "AI-based flood risk assessment for Philippine locations",
    "endpoints": [
        {
            "method": "GET",
            "endpoint": "\/floodrisk\/predict",
            "parameters": {
                "lat": "Latitude (required, float)",
                "lng": "Longitude (required, float)"
            },
            "description": "Get real-time flood risk prediction for specific coordinates",
            "example": "\/floodrisk\/predict?lat=14.5995&lng=120.9842"
        },
        {
            "method": "GET",
            "endpoint": "\/floodrisk\/barangay",
            "parameters": {
                "barangay": "Barangay name (required)",
                "city": "City name (required)"
            },
            "description": "Get stored flood risk data for specific barangay",
            "example": "\/floodrisk\/barangay?barangay=Central&city=Manila"
        },
        {
            "method": "GET",
            "endpoint": "\/floodrisk\/all_barangays",
            "parameters": [],
            "description": "Get all barangay risk levels for mapping",
            "example": "\/floodrisk\/all_barangays"
        },
        {
            "method": "GET",
            "endpoint": "\/floodrisk\/stats",
            "parameters": [],
            "description": "Get flood risk statistics",
            "example": "\/floodrisk\/stats"
        }
    ],
    "risk_calculation": {
        "formula": "riskScore = (rainfall_mm * 0.6) + ((flood_count \/ 10) * 0.3) - ((elevation_m \/ 100) * 0.2)",
        "levels": {
            "Low Risk": "score < 40",
            "Medium Risk": "40 \u2264 score < 70",
            "High Risk": "score \u2265 70"
        },
        "data_sources": {
            "Rainfall": "WeatherAPI.com current conditions",
            "Elevation": "Google Elevation API",
            "Flood History": "ProjectLIGTAS flood_reports table (1km radius)"
        }
    }
}