Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.47
    Preparing search index...

    Module scripts/polling-fetch

    Aggregates latest polling-wave context for Sifo, Novus, and Demoskop.

    The script fetches a single page per provider, extracts the latest visible party percentages when possible, computes a simple cross-provider mean, and persists a versioned cache (data/polling-context.json by default) so the news pre-warm step has a stable polling context artifact even when one or more upstream pages fail.

    PollingWave
    PollingAggregatePoint
    PollingContext
    PollingProviderDefinition
    PollingFetchConfig
    PartyCode
    PollProviderKey
    PARTY_CODES
    DEFAULT_POLLING_OUTPUT
    POLLING_REQUEST_TIMEOUT_MS
    DEFAULT_POLLING_PROVIDERS
    extractPollingWaveFromHtml
    buildPollingAggregate
    fetchPollingContext
    persistPollingContext