Skip to main content

GET /api/lead-lag

Requires Bearer token.
Survival curve analysis showing how one signal leads or lags another. Useful for predicting which neighborhoods will gentrify, decline, or see permit surges. Query parameters
NameTypeRequiredDefaultDescription
causestringLeading signal group (e.g. businessVitality, populationMomentum).
effectstringLagging signal group (e.g. developmentPipeline, economicStrength).
metrostringMetro slug filter. Omit for all metros.
lag_monthsint12Maximum lag window in months (1-24).
Example
curl "https://axiomlocus.io/api/lead-lag?cause=businessVitality&effect=developmentPipeline&metro=sf" \
  -H "Authorization: Bearer al_your_key_here"
Response
{
  "cause": "businessVitality",
  "effect": "developmentPipeline",
  "metro": "sf",
  "peak_lag_months": 6,
  "peak_correlation": 0.72,
  "survival_curve": [
    { "month": 0, "correlation": 0.12 },
    { "month": 3, "correlation": 0.45 },
    { "month": 6, "correlation": 0.72 },
    { "month": 9, "correlation": 0.58 },
    { "month": 12, "correlation": 0.31 }
  ],
  "interpretation": "Business vitality changes lead development pipeline activity by ~6 months in SF."
}
FieldTypeDescription
peak_lag_monthsintMonth offset where correlation is strongest.
peak_correlationfloatPearson correlation at peak lag (0-1).
survival_curvearrayMonthly correlation values over the lag window.
interpretationstringHuman-readable summary of the lead-lag relationship.

GET /api/permits/predict

Requires Bearer token.
Sequence prediction for building permit activity at the H3 cell level. Uses historical permit patterns to forecast future issuance. Query parameters
NameTypeRequiredDefaultDescription
h3_indexstringH3 hex index at resolution 8.
horizonint6Forecast horizon in months (1-12).
Example
curl "https://axiomlocus.io/api/permits/predict?h3_index=882a100d63fffff&horizon=6" \
  -H "Authorization: Bearer al_your_key_here"
Response
{
  "h3_index": "882a100d63fffff",
  "historical_avg_monthly": 4.2,
  "forecast": [
    { "month": "2026-04", "predicted_permits": 5, "confidence": 0.85 },
    { "month": "2026-05", "predicted_permits": 6, "confidence": 0.78 },
    { "month": "2026-06", "predicted_permits": 4, "confidence": 0.71 },
    { "month": "2026-07", "predicted_permits": 7, "confidence": 0.65 },
    { "month": "2026-08", "predicted_permits": 5, "confidence": 0.59 },
    { "month": "2026-09", "predicted_permits": 4, "confidence": 0.52 }
  ],
  "trend": "increasing",
  "model": "arima_h3_v2"
}
FieldTypeDescription
historical_avg_monthlyfloatAverage monthly permits over the last 12 months.
forecastarrayMonthly predictions with confidence intervals.
forecast[].predicted_permitsintPredicted permit count for the month.
forecast[].confidencefloatModel confidence (0-1), decreases with horizon.
trendstringOverall trend direction: increasing, stable, or decreasing.