EU Parliament Monitor - API Documentation - v0.7.19
    Preparing search index...

    Function buildStakeholderOutcomeMatrix

    • Build a StakeholderOutcomeMatrix row for a single parliamentary action. Derives outcomes from per-stakeholder scores: score > 0.6 → winner, score < 0.4 → loser, otherwise neutral.

      Parameters

      • action: string

        The parliamentary action being assessed

      • scores: Partial<Record<AnalysisStakeholderType, number>> = {}

        Per-stakeholder importance scores (0-1); defaults to 0.5

      • confidence: "high" | "medium" | "low" = 'medium'

        Confidence level for the outcome assessments

      Returns StakeholderOutcomeMatrix

      A StakeholderOutcomeMatrix row