Discrepancies

A discrepancy is created when observed road conditions no longer match declared road data. Each discrepancy is explainable, evidence-backed, and typed.

Discrepancy Types

possible_unreported_closure

No active closure exists in configured declared-state feeds, but observed signals suggest the road may be blocked or obstructed.

Typical evidence: Visual obstruction detection, persistent low traffic flow, repeated observation of possible blockage.

Limitations: A declared-state source may not cover this road, or a closure record may exist in an unconfigured source.

declared_open_observed_blocked

A source explicitly declares the road open, but observations suggest it is blocked.

Typical evidence: Explicit open declaration from a feed, combined with visual or temporal signals showing blockage.

declared_closed_observed_normal

A source declares the road closed, but observations show normal traffic flow.

Typical evidence: Active closure record in a feed, but camera or flow signals show normal road activity.

unexpected_flow_interruption

Traffic flow suddenly dropped without a corresponding declared event.

Typical evidence: Temporal flow analysis showing a sharp decrease from baseline patterns.

source_conflict

Two or more declared-state sources report conflicting information about the same road.

Typical evidence: One source declares the road closed while another shows no active closure.

stale_declared_event

A declared event has not been updated within its expected refresh interval.

Typical evidence: A closure record with a stale timestamp beyond the source's normal update cadence.

unknown_state_anomaly

Neither declared nor observed state is clear, but available signals suggest an anomalous condition.

Typical evidence: Multiple weak or conflicting signals that individually are inconclusive but together warrant attention.

Response Format

GET /v1/discrepancies/:id
{
  "data": {
    "id": "disc_...",
    "type": "possible_unreported_closure",
    "status": "active",
    "location": {
      "road_name": "Halleck Street",
      "latitude": 37.801,
      "longitude": -122.456
    },
    "declared_state": "unknown",
    "observed_state": "possibly_blocked",
    "confidence": 0.91,
    "severity": 4,
    "summary": "Possible road-state information gap detected",
    "explanation": [
      "No active closure was found in configured declared-state feeds within 100 meters.",
      "A possible road obstruction was observed.",
      "Road activity remained abnormally low across recent observations."
    ],
    "evidence": [
      {
        "type": "visual_observation",
        "source": "configured_public_camera",
        "confidence": 0.86,
        "observed_at": "..."
      },
      {
        "type": "temporal_signal",
        "signal": "persistent_flow_interruption",
        "confidence": 0.78,
        "observed_at": "..."
      }
    ],
    "sources": [
      { "name": "511 WZDx", "role": "declared_state" },
      { "name": "DataSF Temporary Street Closures", "role": "declared_state" }
    ]
  },
  "meta": {
    "request_id": "req_..."
  }
}

Confidence

The confidence field represents a normalized evidence score. It is not a scientifically calibrated probability that an event is true.

The score considers:

  • Evidence strength and type
  • Source freshness
  • Repeated observations
  • Independent signals
  • Conflicting evidence (reduces confidence)
Do not treat the confidence score as mathematical certainty. It is an evidence-weighted score designed to help prioritize investigation.

Severity

Severity is an integer from 1 (low) to 5 (critical), reflecting the potential impact of the discrepancy.

Query Parameters

ParameterTypeDescription
latitudenumberCenter latitude for spatial search
longitudenumberCenter longitude for spatial search
radiusnumberSearch radius in meters
bboxstringBounding box: minLon,minLat,maxLon,maxLat
statusstringFilter by status: active, monitoring, resolved, dismissed
confidence_minnumberMinimum confidence threshold
sincestringISO 8601 timestamp lower bound
untilstringISO 8601 timestamp upper bound
limitintegerMaximum results (default 100, max 250)