Compare commits
20
Commits
cd44d8fbba
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68be25a953 | ||
|
|
faf9572b9f | ||
|
|
3e6b1328b4 | ||
|
|
d9c6c3649e | ||
|
|
fe418cce1f | ||
|
|
0f7e003879 | ||
|
|
7bd0142734 | ||
|
|
d03b9643e9 | ||
|
|
ccf1a4c755 | ||
|
|
405c21a8c5 | ||
|
|
79639e5319 | ||
|
|
4bd4e5b2db | ||
|
|
b7b7f2f648 | ||
|
|
a59d475e6b | ||
|
|
b06f17e587 | ||
|
|
bf19e503f9 | ||
|
|
1f945b8bad | ||
|
|
9c58bb3d8f | ||
|
|
b4e26bb296 | ||
|
|
256906e9fe |
No files matched your search
@@ -12,6 +12,13 @@ POLITRACK_READER_PASSWORD=change-me-too
|
|||||||
POLITRACK_USER_AGENT=PolitrackBot/0.1 (+https://example.org/about; contact: you@example.org)
|
POLITRACK_USER_AGENT=PolitrackBot/0.1 (+https://example.org/about; contact: you@example.org)
|
||||||
POLITRACK_MIN_REQUEST_INTERVAL=2.0
|
POLITRACK_MIN_REQUEST_INTERVAL=2.0
|
||||||
|
|
||||||
|
# Shown on /impressum and /datenschutz. Required before the site goes public (§ 5 ECG, §§ 24, 25 MedienG).
|
||||||
|
# POLITRACK_LEGAL_NAME=
|
||||||
|
# POLITRACK_LEGAL_ADDRESS=
|
||||||
|
# POLITRACK_LEGAL_EMAIL=
|
||||||
|
# Defaults to POLITRACK_LEGAL_EMAIL.
|
||||||
|
# POLITRACK_CORRECTIONS_EMAIL=
|
||||||
|
|
||||||
# Legislative periods of the Austrian parliament to ingest in detail (JSON list).
|
# Legislative periods of the Austrian parliament to ingest in detail (JSON list).
|
||||||
POLITRACK_PARLAMENT_PERIODS=["XXVII","XXVIII"]
|
POLITRACK_PARLAMENT_PERIODS=["XXVII","XXVIII"]
|
||||||
|
|
||||||
@@ -24,6 +31,10 @@ POLITRACK_API_CORS_ORIGINS=["http://localhost:3000"]
|
|||||||
# Moderation endpoints (/api/v1/review, /api/v1/admin/runs). Leave empty to moderate via the CLI only.
|
# Moderation endpoints (/api/v1/review, /api/v1/admin/runs). Leave empty to moderate via the CLI only.
|
||||||
# POLITRACK_ADMIN_TOKEN=
|
# POLITRACK_ADMIN_TOKEN=
|
||||||
|
|
||||||
|
# Nightly database dumps (backup service). Ideally on a different disk or share than DATA_DIR.
|
||||||
|
# BACKUP_DIR=/mnt/user/backups/politrack
|
||||||
|
# BACKUP_KEEP_DAYS=14
|
||||||
|
|
||||||
# Raw-response archive inside the containers (mounted from ${DATA_DIR}/raw by docker-compose.yml).
|
# Raw-response archive inside the containers (mounted from ${DATA_DIR}/raw by docker-compose.yml).
|
||||||
POLITRACK_RAW_DIR=/data/raw
|
POLITRACK_RAW_DIR=/data/raw
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
# Golden fixtures are compared byte for byte; never convert their line endings.
|
# Golden fixtures are compared byte for byte; never convert their line endings.
|
||||||
backend/tests/fixtures/** -text
|
backend/tests/fixtures/** -text
|
||||||
|
# Shell scripts run in Linux containers: LF even in a Windows checkout.
|
||||||
|
*.sh text eol=lf
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE vote_event ADD COLUMN part_vote BOOLEAN NOT NULL DEFAULT FALSE;
|
||||||
|
COMMENT ON COLUMN vote_event.part_vote IS 'TRUE for a vote on an amendment or a single part of a text (European Parliament), FALSE for a vote on the text as a whole. Claims of part votes carry data.part_vote = true and are left out of general lists by default, because a sitting has over a hundred of them.';
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
ALTER TABLE claim DROP CONSTRAINT claim_claim_type_check;
|
||||||
|
ALTER TABLE claim ADD CONSTRAINT claim_claim_type_check CHECK (claim_type IN (
|
||||||
|
'role', 'vote', 'donation', 'money_flow', 'statement', 'appearance', 'meeting', 'travel',
|
||||||
|
'side_job', 'legal_proceeding', 'lobbying', 'media_mention', 'career',
|
||||||
|
'parliamentary_question', 'government_decision', 'wiki_edit', 'declaration', 'ownership',
|
||||||
|
'affiliation', 'party_finance', 'election_result', 'other'));
|
||||||
|
COMMENT ON COLUMN claim.claim_type IS 'Kind of fact. election_result: a party''s result in a region (counterpart = the elected body) or a candidate''s preference votes (person, counterpart = party).';
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- enrich.embed looks up claims and documents without a chunk on every batch. chunk_uniq is an expression index
|
||||||
|
-- (COALESCE(...)), which those lookups can't use, so each batch scanned the whole table: after the history
|
||||||
|
-- backfill (over a million claims) a run took hours and blocked the other enrichers. Built CONCURRENTLY by hand on
|
||||||
|
-- 2026-11-14; IF NOT EXISTS makes this a no-op there.
|
||||||
|
CREATE INDEX IF NOT EXISTS chunk_claim_idx ON chunk (claim_id) WHERE claim_id IS NOT NULL;
|
||||||
|
CREATE INDEX IF NOT EXISTS chunk_document_idx ON chunk (document_id) WHERE document_id IS NOT NULL;
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- enrich.topics fetches the next batch of untagged claims on every iteration; without an index each batch scanned
|
||||||
|
-- all claims (over a million after the history backfill) and a run took hours, blocking the enrich queue. The
|
||||||
|
-- predicate must stay identical to the query in enrich/topics.py. Built CONCURRENTLY by hand on 2026-11-14.
|
||||||
|
CREATE INDEX IF NOT EXISTS claim_untagged_idx ON claim (id)
|
||||||
|
WHERE claim_type IN ('media_mention', 'statement', 'donation', 'side_job', 'appearance', 'meeting', 'travel',
|
||||||
|
'money_flow', 'government_decision', 'wiki_edit', 'career')
|
||||||
|
AND NOT (data ? 'topics_tagged');
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
-- State MPs: trust the official Landtag member lists (adapters landtag.*) where they exist. Wikidata often has no
|
||||||
|
-- end date for state mandates, so former members looked current; for states that enrich.landtage marks as covered,
|
||||||
|
-- open-ended Wikidata Landtag roles no longer count, and official Landtag roles count as verified.
|
||||||
|
CREATE OR REPLACE FUNCTION landtag_key(role_title TEXT) RETURNS TEXT LANGUAGE sql IMMUTABLE AS $$
|
||||||
|
SELECT CASE
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%niederösterreich%%' THEN 'noe'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%oberösterreich%%' THEN 'ooe'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND (role_title ILIKE '%%steir%%' OR role_title ILIKE '%%steiermark%%') THEN 'stmk'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%tirol%%' THEN 'tirol'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%vorarlberg%%' THEN 'vbg'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%salzburg%%' THEN 'sbg'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%burgenl%%' THEN 'bgld'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%wien%%' THEN 'wien'
|
||||||
|
WHEN role_title ILIKE '%%landtag%%' AND role_title ILIKE '%%kärnt%%' THEN 'ktn'
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
COMMENT ON FUNCTION landtag_key(TEXT) IS 'State key (noe, ooe, ...) of a Landtag role title from Wikidata, NULL for other roles.';
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW person_status AS
|
||||||
|
WITH covered AS (
|
||||||
|
SELECT jsonb_array_elements_text(value) AS key FROM state WHERE adapter = 'enrich.landtage' AND key = 'covered'
|
||||||
|
),
|
||||||
|
current_roles AS (
|
||||||
|
SELECT r.person_id, r.level, r.role, r.party_id, r.start_date, c.created_by
|
||||||
|
FROM role r JOIN claim c ON c.id = r.claim_id
|
||||||
|
WHERE c.merged_into IS NULL AND (r.end_date IS NULL OR r.end_date >= current_date)
|
||||||
|
AND (c.created_by LIKE 'parlament%%' OR c.created_by LIKE 'europarl%%' OR c.created_by LIKE 'landtag.%%'
|
||||||
|
OR r.end_date IS NOT NULL OR r.level = 'party'
|
||||||
|
OR (r.start_date IS NOT NULL AND r.start_date >= current_date - interval '15 years'))
|
||||||
|
AND NOT (c.created_by = 'wikidata.politicians' AND r.end_date IS NULL AND r.level = 'state'
|
||||||
|
AND landtag_key(r.role) IN (SELECT key FROM covered))
|
||||||
|
)
|
||||||
|
SELECT p.id AS person_id,
|
||||||
|
CASE
|
||||||
|
WHEN p.death_date IS NOT NULL THEN 'deceased'
|
||||||
|
WHEN EXISTS (SELECT 1 FROM current_roles cr WHERE cr.person_id = p.id AND cr.level <> 'party') THEN 'active'
|
||||||
|
WHEN EXISTS (SELECT 1 FROM current_roles cr WHERE cr.person_id = p.id AND cr.level = 'party') THEN 'party_member'
|
||||||
|
ELSE 'former'
|
||||||
|
END AS status,
|
||||||
|
EXISTS (SELECT 1 FROM current_roles cr WHERE cr.person_id = p.id AND cr.level <> 'party'
|
||||||
|
AND (cr.created_by LIKE 'parlament%%' OR cr.created_by LIKE 'europarl%%' OR cr.created_by LIKE 'landtag.%%'))
|
||||||
|
AS verified,
|
||||||
|
(SELECT max(r.end_date) FROM role r JOIN claim c ON c.id = r.claim_id
|
||||||
|
WHERE r.person_id = p.id AND c.merged_into IS NULL AND r.level <> 'party') AS last_office_end,
|
||||||
|
(SELECT array_agg(DISTINCT cr.role) FROM current_roles cr WHERE cr.person_id = p.id AND cr.level <> 'party')
|
||||||
|
AS current_roles,
|
||||||
|
(SELECT array_agg(DISTINCT cr.party_id) FROM current_roles cr WHERE cr.person_id = p.id AND cr.party_id IS NOT NULL)
|
||||||
|
AS current_party_ids
|
||||||
|
FROM person p;
|
||||||
|
COMMENT ON VIEW person_status IS 'active = current office (verified = confirmed by Parliament/EP data or an official Landtag list); party_member = only party membership; former; deceased. For states covered by an official Landtag list (enrich.landtage), open-ended Wikidata Landtag roles are ignored.';
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- normalize() now maps ß to ss, as SQL unaccent() does, so 'Stroißnig' and 'Stroissnig' are one alias.
|
||||||
|
-- Bring stored aliases in line (dropping those that would collide with an existing ss spelling).
|
||||||
|
DELETE FROM alias a
|
||||||
|
WHERE a.alias_norm LIKE '%%ß%%'
|
||||||
|
AND EXISTS (SELECT 1 FROM alias b WHERE b.entity_type = a.entity_type AND b.entity_id = a.entity_id
|
||||||
|
AND b.alias_norm = replace(a.alias_norm, 'ß', 'ss'));
|
||||||
|
UPDATE alias SET alias_norm = replace(alias_norm, 'ß', 'ss') WHERE alias_norm LIKE '%%ß%%';
|
||||||
@@ -12,6 +12,7 @@ from typing import Annotated
|
|||||||
|
|
||||||
from fastapi import Depends, FastAPI, Header, HTTPException, Query
|
from fastapi import Depends, FastAPI, Header, HTTPException, Query
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
|
from fastapi.responses import JSONResponse
|
||||||
from psycopg import Connection
|
from psycopg import Connection
|
||||||
|
|
||||||
from politrack import queries
|
from politrack import queries
|
||||||
@@ -66,6 +67,23 @@ def healthz(conn: DB) -> dict:
|
|||||||
return {"ok": True}
|
return {"ok": True}
|
||||||
|
|
||||||
|
|
||||||
|
BACKUP_SCHEDULE = "30 2 * * *" # the `backup` service in docker-compose.yml logs each dump as a run
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/api/v1/status/sources", include_in_schema=False)
|
||||||
|
def source_status(conn: DB) -> JSONResponse:
|
||||||
|
"""For monitoring (e.g. Uptime Kuma): HTTP 503 as soon as a scheduled source or the nightly backup missed its
|
||||||
|
last two slots. Lists every task with its last successful run."""
|
||||||
|
from politrack.core import registry
|
||||||
|
|
||||||
|
registry.load_builtin()
|
||||||
|
schedules = {name: cls.schedule for name, cls in {**registry.ADAPTERS, **registry.ENRICHERS}.items() if cls.schedule}
|
||||||
|
schedules["backup"] = BACKUP_SCHEDULE
|
||||||
|
rows = queries.source_freshness(conn, schedules)
|
||||||
|
stale = [r["adapter"] for r in rows if r["stale"]]
|
||||||
|
return JSONResponse({"ok": not stale, "stale": stale, "sources": rows}, status_code=503 if stale else 200)
|
||||||
|
|
||||||
|
|
||||||
# -- reference data -----------------------------------------------------------------------
|
# -- reference data -----------------------------------------------------------------------
|
||||||
|
|
||||||
@app.get("/api/v1/stats", response_model=s.Stats)
|
@app.get("/api/v1/stats", response_model=s.Stats)
|
||||||
@@ -133,8 +151,10 @@ def get_person(slug: str, conn: DB):
|
|||||||
|
|
||||||
|
|
||||||
@app.get("/api/v1/persons/{slug}/votes", response_model=list[s.PersonVote])
|
@app.get("/api/v1/persons/{slug}/votes", response_model=list[s.PersonVote])
|
||||||
def get_person_votes(slug: str, conn: DB, topics: str | None = None, limit: Limit = 100, offset: Offset = 0):
|
def get_person_votes(slug: str, conn: DB, topics: str | None = None, include_parts: bool = False, limit: Limit = 100,
|
||||||
return queries.person_votes(conn, slug, topics=csv_list(topics), limit=limit, offset=offset)
|
offset: Offset = 0):
|
||||||
|
return queries.person_votes(conn, slug, topics=csv_list(topics), include_parts=include_parts, limit=limit,
|
||||||
|
offset=offset)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/api/v1/persons/{slug}/network", response_model=s.Network)
|
@app.get("/api/v1/persons/{slug}/network", response_model=s.Network)
|
||||||
@@ -218,9 +238,10 @@ def get_wiki_edits(conn: DB, limit: Limit = 100, offset: Offset = 0):
|
|||||||
|
|
||||||
@app.get("/api/v1/votes", response_model=list[s.VoteItem])
|
@app.get("/api/v1/votes", response_model=list[s.VoteItem])
|
||||||
def get_votes(conn: DB, party: str | None = None, topics: str | None = None, roll_call: bool | None = None,
|
def get_votes(conn: DB, party: str | None = None, topics: str | None = None, roll_call: bool | None = None,
|
||||||
since: date | None = None, until: date | None = None, limit: Limit = 50, offset: Offset = 0):
|
since: date | None = None, until: date | None = None, include_parts: bool = False, limit: Limit = 50,
|
||||||
|
offset: Offset = 0):
|
||||||
return queries.list_votes(conn, party=party, topics=csv_list(topics), roll_call=roll_call, since=since,
|
return queries.list_votes(conn, party=party, topics=csv_list(topics), roll_call=roll_call, since=since,
|
||||||
until=until, limit=limit, offset=offset)
|
until=until, include_parts=include_parts, limit=limit, offset=offset)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/api/v1/votes/{vote_id}", response_model=s.VoteDetail)
|
@app.get("/api/v1/votes/{vote_id}", response_model=s.VoteDetail)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict
|
|||||||
ClaimType = Literal["role", "vote", "donation", "money_flow", "statement", "appearance", "meeting", "travel",
|
ClaimType = Literal["role", "vote", "donation", "money_flow", "statement", "appearance", "meeting", "travel",
|
||||||
"side_job", "legal_proceeding", "lobbying", "media_mention", "career", "parliamentary_question",
|
"side_job", "legal_proceeding", "lobbying", "media_mention", "career", "parliamentary_question",
|
||||||
"government_decision", "wiki_edit", "declaration", "ownership", "affiliation", "party_finance",
|
"government_decision", "wiki_edit", "declaration", "ownership", "affiliation", "party_finance",
|
||||||
"other"]
|
"election_result", "other"]
|
||||||
PersonStatus = Literal["active", "former", "party_member", "deceased"]
|
PersonStatus = Literal["active", "former", "party_member", "deceased"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class Loader:
|
|||||||
retrieved_at = now()
|
retrieved_at = now()
|
||||||
RETURNING id
|
RETURNING id
|
||||||
""",
|
""",
|
||||||
(src["id"], ev.url, ev.title, ev.doc_type, ev.published_at, short, full_text, fetch_id,
|
(src["id"], ev.url, ev.title, ev.doc_type, ev.published_at or None, short, full_text, fetch_id,
|
||||||
Jsonb({**ev.meta, **({"tdm_reserved": True} if tdm else {})})),
|
Jsonb({**ev.meta, **({"tdm_reserved": True} if tdm else {})})),
|
||||||
).fetchone()
|
).fetchone()
|
||||||
self.ctx.stats["documents"] += 1
|
self.ctx.stats["documents"] += 1
|
||||||
@@ -162,7 +162,7 @@ class Loader:
|
|||||||
def person(self, rec: PersonRecord) -> int | None:
|
def person(self, rec: PersonRecord) -> int | None:
|
||||||
person_id = self.resolver.person_by_ids(rec.ref.ids)
|
person_id = self.resolver.person_by_ids(rec.ref.ids)
|
||||||
if person_id is None and rec.match_by_name:
|
if person_id is None and rec.match_by_name:
|
||||||
person_id = self.resolver.person_by_name(rec.full_name)
|
person_id = self.resolver.person_by_name(rec.full_name, rec.birth_date, rec.match_landtag)
|
||||||
if person_id is None:
|
if person_id is None:
|
||||||
if not self.ctx.creates_persons:
|
if not self.ctx.creates_persons:
|
||||||
self.ctx.stats["persons_not_created"] += 1
|
self.ctx.stats["persons_not_created"] += 1
|
||||||
@@ -250,14 +250,15 @@ class Loader:
|
|||||||
chamber = self.resolver.org(rec.chamber, create=False) if rec.chamber else None
|
chamber = self.resolver.org(rec.chamber, create=False) if rec.chamber else None
|
||||||
row = self.conn.execute(
|
row = self.conn.execute(
|
||||||
"""INSERT INTO vote_event (event_key, chamber_id, item_ref, item_title, stage, voted_on, result, roll_call,
|
"""INSERT INTO vote_event (event_key, chamber_id, item_ref, item_title, stage, voted_on, result, roll_call,
|
||||||
url, protocol_url, raw_text)
|
url, protocol_url, raw_text, part_vote)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||||
ON CONFLICT (event_key) DO UPDATE SET result = EXCLUDED.result, raw_text = EXCLUDED.raw_text,
|
ON CONFLICT (event_key) DO UPDATE SET result = EXCLUDED.result, raw_text = EXCLUDED.raw_text,
|
||||||
roll_call = EXCLUDED.roll_call, item_title = EXCLUDED.item_title,
|
roll_call = EXCLUDED.roll_call, item_title = EXCLUDED.item_title, part_vote = EXCLUDED.part_vote,
|
||||||
|
item_ref = EXCLUDED.item_ref, stage = EXCLUDED.stage,
|
||||||
protocol_url = COALESCE(EXCLUDED.protocol_url, vote_event.protocol_url)
|
protocol_url = COALESCE(EXCLUDED.protocol_url, vote_event.protocol_url)
|
||||||
RETURNING id""",
|
RETURNING id""",
|
||||||
(rec.key, chamber, rec.item_ref, rec.title, rec.stage, rec.voted_on, rec.result, rec.roll_call, rec.url,
|
(rec.key, chamber, rec.item_ref, rec.title, rec.stage, rec.voted_on, rec.result, rec.roll_call, rec.url,
|
||||||
rec.protocol_url, rec.raw_text),
|
rec.protocol_url, rec.raw_text, rec.part_vote),
|
||||||
).fetchone()
|
).fetchone()
|
||||||
self.ctx.stats["vote_events"] += 1
|
self.ctx.stats["vote_events"] += 1
|
||||||
return row["id"]
|
return row["id"]
|
||||||
@@ -314,7 +315,8 @@ class Loader:
|
|||||||
updated_at = now()
|
updated_at = now()
|
||||||
RETURNING id, (xmax = 0) AS inserted
|
RETURNING id, (xmax = 0) AS inserted
|
||||||
""",
|
""",
|
||||||
(c.claim_type, fp, person_id, org_id, cp_person, cp_org, c.occurred_at, c.valid_from, c.valid_to,
|
(c.claim_type, fp, person_id, org_id, cp_person, cp_org, c.occurred_at or None, c.valid_from or None,
|
||||||
|
c.valid_to or None,
|
||||||
c.summary_de, c.summary_en, Jsonb(c.data), c.sensitive or c.claim_type == "legal_proceeding",
|
c.summary_de, c.summary_en, Jsonb(c.data), c.sensitive or c.claim_type == "legal_proceeding",
|
||||||
"pending" if c.review else "published", self.ctx.adapter),
|
"pending" if c.review else "published", self.ctx.adapter),
|
||||||
).fetchone()
|
).fetchone()
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ class PersonRecord:
|
|||||||
#: if no identifier matches, merge with an existing person of exactly this (unambiguous) name before
|
#: if no identifier matches, merge with an existing person of exactly this (unambiguous) name before
|
||||||
#: creating a new one - for authoritative sources that share no id with others (e.g. EP)
|
#: creating a new one - for authoritative sources that share no id with others (e.g. EP)
|
||||||
match_by_name: bool = False
|
match_by_name: bool = False
|
||||||
|
#: with match_by_name: state key ('noe', ...) of a Landtag list, to tell homonyms apart and accept name
|
||||||
|
#: variants among that Landtag's members (Resolver.person_by_name)
|
||||||
|
match_landtag: str | None = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -149,6 +152,7 @@ class VoteEvent:
|
|||||||
url: str | None = None
|
url: str | None = None
|
||||||
protocol_url: str | None = None
|
protocol_url: str | None = None
|
||||||
raw_text: str | None = None
|
raw_text: str | None = None
|
||||||
|
part_vote: bool = False # a vote on an amendment or part of a text, not on the whole text
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ Order (first hit wins, ambiguity never guesses):
|
|||||||
Hint strategies for persons (documented in docs/data-model.md):
|
Hint strategies for persons (documented in docs/data-model.md):
|
||||||
surname_in_body + on members of a chamber on a date with that surname (roll-call lists)
|
surname_in_body + on members of a chamber on a date with that surname (roll-call lists)
|
||||||
office + on holder of an office title on a date (Council of Ministers minutes)
|
office + on holder of an office title on a date (Council of Ministers minutes)
|
||||||
|
birth_year exact name and year of birth (candidate lists); add no_name_match so that a name
|
||||||
|
alone never matches when the year doesn't
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -26,6 +28,24 @@ OFFICE_FILLER = re.compile(r"\b(der republik osterreich|der bundesrepublik oster
|
|||||||
r"\(osterreich\)")
|
r"\(osterreich\)")
|
||||||
|
|
||||||
|
|
||||||
|
def name_parts(name: str) -> tuple[str, str]:
|
||||||
|
"""'Mag. Chiara-Sophia Glawogger' -> ('chiara', 'glawogger'): first given name and surname, normalised."""
|
||||||
|
tokens = normalize(strip_titles(name)).replace(",", " ").split()
|
||||||
|
if len(tokens) < 2:
|
||||||
|
return "", ""
|
||||||
|
return tokens[0].split("-")[0], tokens[-1]
|
||||||
|
|
||||||
|
|
||||||
|
def variant_of(a: str, b: str) -> bool:
|
||||||
|
"""Same person written differently: surnames equal or one is part of the other's double surname
|
||||||
|
('Kirchmayr' / 'Kirchmayr-Felbermaier'), first names share their first three letters ('Rudi' / 'Rudolf')."""
|
||||||
|
(ga, sa), (gb, sb) = name_parts(a), name_parts(b)
|
||||||
|
if not (ga and sa and gb and sb):
|
||||||
|
return False
|
||||||
|
surname = sa == sb or sa in sb.split("-") or sb in sa.split("-")
|
||||||
|
return surname and len(ga) >= 3 and len(gb) >= 3 and ga[:3] == gb[:3]
|
||||||
|
|
||||||
|
|
||||||
def office_key(title: str) -> str:
|
def office_key(title: str) -> str:
|
||||||
"""'Bundesministerin für Justiz' / 'Bundeskanzler der Republik Österreich' -> 'bundesminister fur justiz' /
|
"""'Bundesministerin für Justiz' / 'Bundeskanzler der Republik Österreich' -> 'bundesminister fur justiz' /
|
||||||
'bundeskanzler' (gender-neutral, without filler, punctuation-free) for comparing office titles."""
|
'bundeskanzler' (gender-neutral, without filler, punctuation-free) for comparing office titles."""
|
||||||
@@ -107,18 +127,54 @@ class Resolver:
|
|||||||
self._person_cache[cache_key] = found
|
self._person_cache[cache_key] = found
|
||||||
return found
|
return found
|
||||||
|
|
||||||
def person_by_name(self, name: str) -> int | None:
|
def person_by_name(self, name: str, birth_date: date | None = None, landtag: str | None = None) -> int | None:
|
||||||
|
"""Exact alias match. A known birth date rules out persons born on another day; `landtag` (state key such
|
||||||
|
as 'noe') prefers, among homonyms, the one who has sat in that Landtag, and falls back to name variants
|
||||||
|
among that Landtag's members (landtag_member_by_variant)."""
|
||||||
norm = normalize(strip_titles(name))
|
norm = normalize(strip_titles(name))
|
||||||
rows = self.conn.execute(
|
rows = self.conn.execute(
|
||||||
"""SELECT DISTINCT a.entity_id AS id, ps.status
|
"""SELECT DISTINCT a.entity_id AS id, ps.status, p.birth_date,
|
||||||
FROM alias a LEFT JOIN person_status ps ON ps.person_id = a.entity_id
|
%s::text IS NOT NULL AND EXISTS (
|
||||||
|
SELECT 1 FROM role r JOIN claim c ON c.id = r.claim_id
|
||||||
|
WHERE r.person_id = a.entity_id AND c.merged_into IS NULL AND r.level = 'state'
|
||||||
|
AND (landtag_key(r.role) = %s OR c.created_by = 'landtag.' || %s)) AS in_landtag
|
||||||
|
FROM alias a JOIN person p ON p.id = a.entity_id
|
||||||
|
LEFT JOIN person_status ps ON ps.person_id = a.entity_id
|
||||||
WHERE a.entity_type = 'person' AND a.alias_norm = %s""",
|
WHERE a.entity_type = 'person' AND a.alias_norm = %s""",
|
||||||
(norm,),
|
(landtag, landtag, landtag, norm),
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
if birth_date:
|
||||||
|
same = [r for r in rows if r["birth_date"] == birth_date]
|
||||||
|
if len(same) == 1:
|
||||||
|
return same[0]["id"]
|
||||||
|
rows = [r for r in rows if r["birth_date"] is None]
|
||||||
if len(rows) == 1:
|
if len(rows) == 1:
|
||||||
return rows[0]["id"]
|
return rows[0]["id"]
|
||||||
active = [r for r in rows if r["status"] == "active"]
|
for preferred in ([r for r in rows if r["in_landtag"]], [r for r in rows if r["status"] == "active"]):
|
||||||
return active[0]["id"] if len(active) == 1 else None
|
if len(preferred) == 1:
|
||||||
|
return preferred[0]["id"]
|
||||||
|
if not rows and landtag:
|
||||||
|
return self.landtag_member_by_variant(name, landtag, birth_date)
|
||||||
|
return None
|
||||||
|
|
||||||
|
def landtag_member_by_variant(self, name: str, landtag: str, birth_date: date | None = None) -> int | None:
|
||||||
|
"""A Landtag list writes 'Rudi Hemetsberger', 'Chiara-Sophia Glawogger' or 'Helena Kirchmayr-Felbermaier'
|
||||||
|
where Wikidata has 'Rudolf Hemetsberger', 'Chiara Glawogger' and 'Helena Kirchmayr'. Among persons who
|
||||||
|
have sat in that Landtag, accept the single one whose surname matches (or is one part of a double surname)
|
||||||
|
and whose first name shares its first three letters, unless the birth dates differ."""
|
||||||
|
given, surname = name_parts(name)
|
||||||
|
if not given or not surname:
|
||||||
|
return None
|
||||||
|
rows = self.conn.execute(
|
||||||
|
"""SELECT DISTINCT p.id, p.full_name, p.birth_date FROM person p
|
||||||
|
JOIN role r ON r.person_id = p.id JOIN claim c ON c.id = r.claim_id
|
||||||
|
WHERE c.merged_into IS NULL AND r.level = 'state' AND landtag_key(r.role) = %s""",
|
||||||
|
(landtag,),
|
||||||
|
).fetchall()
|
||||||
|
hits = {row["id"] for row in rows
|
||||||
|
if not (birth_date and row["birth_date"] and row["birth_date"] != birth_date)
|
||||||
|
and variant_of(name, row["full_name"])}
|
||||||
|
return hits.pop() if len(hits) == 1 else None
|
||||||
|
|
||||||
def _person_by_hints(self, ref: PersonRef) -> int | None:
|
def _person_by_hints(self, ref: PersonRef) -> int | None:
|
||||||
hints = ref.hints
|
hints = ref.hints
|
||||||
@@ -133,6 +189,14 @@ class Resolver:
|
|||||||
return suffix[0]["id"] if len(suffix) == 1 else None
|
return suffix[0]["id"] if len(suffix) == 1 else None
|
||||||
if "office" in hints:
|
if "office" in hints:
|
||||||
return self.office_holder(hints["office"], on)
|
return self.office_holder(hints["office"], on)
|
||||||
|
if "birth_year" in hints and ref.name:
|
||||||
|
rows = self.conn.execute(
|
||||||
|
"""SELECT DISTINCT a.entity_id AS id FROM alias a JOIN person p ON p.id = a.entity_id
|
||||||
|
WHERE a.entity_type = 'person' AND a.alias_norm = %s
|
||||||
|
AND EXTRACT(YEAR FROM p.birth_date) = %s""",
|
||||||
|
(normalize(strip_titles(ref.name)), int(hints["birth_year"])),
|
||||||
|
).fetchall()
|
||||||
|
return rows[0]["id"] if len(rows) == 1 else None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def office_holder(self, office: str, on: date | None) -> int | None:
|
def office_holder(self, office: str, on: date | None) -> int | None:
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ into ~1,200 character chunks. Embeddings are computed by an Ollama server
|
|||||||
otherwise only German full-text search is available.
|
otherwise only German full-text search is available.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from psycopg import Connection
|
from psycopg import Connection
|
||||||
|
|
||||||
@@ -30,7 +32,17 @@ class Chunker(Enricher):
|
|||||||
schedule = "*/15 * * * *"
|
schedule = "*/15 * * * *"
|
||||||
|
|
||||||
def run(self, ctx: RunContext) -> None:
|
def run(self, ctx: RunContext) -> None:
|
||||||
while (n := build_chunks(ctx.conn)):
|
# Claims are chunked in id order: a cursor saves scanning the >1 M claims that already have one (or never
|
||||||
|
# get one, like EP part votes) on every batch. Once a day the cursor starts over, so claims that became
|
||||||
|
# visible later (e.g. approved after review) are picked up too.
|
||||||
|
today = date.today().isoformat()
|
||||||
|
after = ctx.state.get("claim_cursor", 0) if ctx.state.get("cursor_day") == today else 0
|
||||||
|
ctx.state.set("cursor_day", today)
|
||||||
|
while True:
|
||||||
|
n, after = build_chunks(ctx.conn, after=after)
|
||||||
|
ctx.state.set("claim_cursor", after)
|
||||||
|
if not n:
|
||||||
|
break
|
||||||
ctx.stats["chunks"] += n
|
ctx.stats["chunks"] += n
|
||||||
ctx.stats["embedded"] = embed_pending(ctx.conn)
|
ctx.stats["embedded"] = embed_pending(ctx.conn)
|
||||||
return None
|
return None
|
||||||
@@ -51,7 +63,9 @@ def split_text(text: str, size: int = CHUNK_SIZE) -> list[str]:
|
|||||||
return chunks
|
return chunks
|
||||||
|
|
||||||
|
|
||||||
def build_chunks(conn: Connection, batch: int = 5000) -> int:
|
def build_chunks(conn: Connection, batch: int = 5000, after: int = 0) -> tuple[int, int]:
|
||||||
|
"""Chunks for up to `batch` claims with an id above `after` and for unchunked documents.
|
||||||
|
Returns (number of claims and documents chunked, highest claim id looked at)."""
|
||||||
claims = conn.execute(
|
claims = conn.execute(
|
||||||
"""
|
"""
|
||||||
SELECT c.id, c.claim_type, c.summary_de, c.occurred_at, p.full_name, o.name AS org_name,
|
SELECT c.id, c.claim_type, c.summary_de, c.occurred_at, p.full_name, o.name AS org_name,
|
||||||
@@ -63,11 +77,14 @@ def build_chunks(conn: Connection, batch: int = 5000) -> int:
|
|||||||
JOIN document d ON d.id = e.document_id
|
JOIN document d ON d.id = e.document_id
|
||||||
JOIN source s ON s.id = d.source_id
|
JOIN source s ON s.id = d.source_id
|
||||||
WHERE c.merged_into IS NULL AND c.review_status = 'published'
|
WHERE c.merged_into IS NULL AND c.review_status = 'published'
|
||||||
|
AND NOT COALESCE((c.data->>'part_vote')::boolean, FALSE)
|
||||||
AND NOT EXISTS (SELECT 1 FROM chunk ch WHERE ch.claim_id = c.id)
|
AND NOT EXISTS (SELECT 1 FROM chunk ch WHERE ch.claim_id = c.id)
|
||||||
|
AND c.id > %s
|
||||||
GROUP BY c.id, p.full_name, o.name
|
GROUP BY c.id, p.full_name, o.name
|
||||||
|
ORDER BY c.id
|
||||||
LIMIT %s
|
LIMIT %s
|
||||||
""",
|
""",
|
||||||
(batch,),
|
(after, batch),
|
||||||
).fetchall()
|
).fetchall()
|
||||||
for c in claims:
|
for c in claims:
|
||||||
who = c["full_name"] or c["org_name"] or ""
|
who = c["full_name"] or c["org_name"] or ""
|
||||||
@@ -76,18 +93,18 @@ def build_chunks(conn: Connection, batch: int = 5000) -> int:
|
|||||||
conn.execute(UPSERT_CHUNK, (c["id"], None, 0, text.strip()))
|
conn.execute(UPSERT_CHUNK, (c["id"], None, 0, text.strip()))
|
||||||
|
|
||||||
docs = conn.execute(
|
docs = conn.execute(
|
||||||
"""
|
r"""
|
||||||
SELECT d.id, d.title, d.full_text FROM document d
|
SELECT d.id, d.title, d.full_text FROM document d
|
||||||
WHERE d.full_text IS NOT NULL AND NOT EXISTS (SELECT 1 FROM chunk ch WHERE ch.document_id = d.id)
|
WHERE d.full_text ~ '\S' AND NOT EXISTS (SELECT 1 FROM chunk ch WHERE ch.document_id = d.id)
|
||||||
LIMIT %s
|
LIMIT %s
|
||||||
""",
|
""",
|
||||||
(batch // 10,),
|
(batch // 10,),
|
||||||
).fetchall()
|
).fetchall()
|
||||||
for d in docs:
|
for d in docs: # blank texts are excluded above: they yield no chunks and would be selected forever
|
||||||
for i, part in enumerate(split_text(d["full_text"])):
|
for i, part in enumerate(split_text(d["full_text"])):
|
||||||
conn.execute(UPSERT_CHUNK, (None, d["id"], i, f"{d['title'] or ''}\n{part}".strip()))
|
conn.execute(UPSERT_CHUNK, (None, d["id"], i, f"{d['title'] or ''}\n{part}".strip()))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
return len(claims) + len(docs)
|
return len(claims) + len(docs), max((c["id"] for c in claims), default=after)
|
||||||
|
|
||||||
|
|
||||||
def embed_texts(texts: list[str]) -> list[list[float]]:
|
def embed_texts(texts: list[str]) -> list[list[float]]:
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ Sources:
|
|||||||
* Parlamentskorrespondenz and government news: title + full text (official works / CC BY),
|
* Parlamentskorrespondenz and government news: title + full text (official works / CC BY),
|
||||||
* news headlines: title only (we do not store article text).
|
* news headlines: title only (we do not store article text).
|
||||||
|
|
||||||
The event date is the publication date of the source (`data.date_precision =
|
The event date comes from the sentence when it names one ("gestern", "am Montag", "am 12. November",
|
||||||
"publication"`). The claim key is (kind, person, place/counterpart, ISO week),
|
"12.11.2026"; `data.date_precision = "day"`), otherwise it is the publication date of the source
|
||||||
|
(`"publication"`). The claim key is (kind, person, place/counterpart, ISO week),
|
||||||
so reports from different sources about the same trip attach to the same claim
|
so reports from different sources about the same trip attach to the same claim
|
||||||
as additional evidence and corroborate it. corroborate.merge_events() also
|
as additional evidence and corroborate it. corroborate.merge_events() also
|
||||||
merges near-duplicates whose dates differ by a few days.
|
merges near-duplicates whose dates differ by a few days.
|
||||||
@@ -21,7 +22,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from datetime import datetime
|
from datetime import date, datetime, timedelta
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from psycopg.types.json import Jsonb
|
from psycopg.types.json import Jsonb
|
||||||
@@ -69,6 +70,64 @@ def counterpart_anchor(text: str) -> str:
|
|||||||
return normalize(words[-1]) if words else normalize(text)[:25]
|
return normalize(words[-1]) if words else normalize(text)[:25]
|
||||||
|
|
||||||
|
|
||||||
|
MONTHS = {m: i for i, m in enumerate(["jänner", "februar", "märz", "april", "mai", "juni", "juli", "august",
|
||||||
|
"september", "oktober", "november", "dezember"], start=1)} | {"januar": 1}
|
||||||
|
WEEKDAYS = {d: i for i, d in enumerate(["montag", "dienstag", "mittwoch", "donnerstag", "freitag", "samstag",
|
||||||
|
"sonntag"])}
|
||||||
|
RELATIVE = {"vorgestern": -2, "gestern": -1, "heute": 0, "morgen": 1, "übermorgen": 2}
|
||||||
|
NAMED_DATE = re.compile(r"\b(\d{1,2})\.\s*(" + "|".join(MONTHS) + r")(?:\s+(\d{4}))?", re.IGNORECASE)
|
||||||
|
NUMERIC_DATE = re.compile(r"\b(\d{1,2})\.(\d{1,2})\.(\d{4}|\d{2})?(?!\d)")
|
||||||
|
WEEKDAY_RE = re.compile(r"\b(?:am|kommenden|vergangenen|letzten)\s+(" + "|".join(WEEKDAYS) + r")\b", re.IGNORECASE)
|
||||||
|
RELATIVE_RE = re.compile(r"\b(" + "|".join(RELATIVE) + r")\b(?!\s*(?:früh|abend|nacht)?\s*-)", re.IGNORECASE)
|
||||||
|
MAX_DISTANCE = timedelta(days=60)
|
||||||
|
|
||||||
|
|
||||||
|
def event_date(text: str, published: date) -> date | None:
|
||||||
|
"""The date a sentence gives for its event, if any and plausible (within 60 days of publication).
|
||||||
|
|
||||||
|
Explicit dates win over relative words; a date without a year takes the year that puts it closest to the
|
||||||
|
publication date; a weekday is the nearest one to the publication date (reports cover the days around it).
|
||||||
|
"""
|
||||||
|
def plausible(d: date | None) -> date | None:
|
||||||
|
return d if d and abs(d - published) <= MAX_DISTANCE else None
|
||||||
|
|
||||||
|
def closest_year(day: int, month: int) -> date | None:
|
||||||
|
options = []
|
||||||
|
for year in (published.year - 1, published.year, published.year + 1):
|
||||||
|
try:
|
||||||
|
options.append(date(year, month, day))
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
return min(options, key=lambda d: abs(d - published), default=None)
|
||||||
|
|
||||||
|
if (m := NAMED_DATE.search(text)):
|
||||||
|
day, month = int(m.group(1)), MONTHS[m.group(2).lower()]
|
||||||
|
try:
|
||||||
|
d = date(int(m.group(3)), month, day) if m.group(3) else closest_year(day, month)
|
||||||
|
except ValueError:
|
||||||
|
d = None
|
||||||
|
if plausible(d):
|
||||||
|
return d
|
||||||
|
if (m := NUMERIC_DATE.search(text)):
|
||||||
|
day, month = int(m.group(1)), int(m.group(2))
|
||||||
|
if 1 <= month <= 12:
|
||||||
|
year = m.group(3)
|
||||||
|
try:
|
||||||
|
d = (date(int(year) + (2000 if len(year) == 2 else 0), month, day) if year
|
||||||
|
else closest_year(day, month))
|
||||||
|
except ValueError:
|
||||||
|
d = None
|
||||||
|
if plausible(d):
|
||||||
|
return d
|
||||||
|
if (m := WEEKDAY_RE.search(text)):
|
||||||
|
target = WEEKDAYS[m.group(1).lower()]
|
||||||
|
diff = (target - published.weekday()) % 7
|
||||||
|
return published + timedelta(days=diff if diff <= 3 else diff - 7)
|
||||||
|
if (m := RELATIVE_RE.search(text)):
|
||||||
|
return published + timedelta(days=RELATIVE[m.group(1).lower()])
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def find_places(text: str) -> list[tuple[str, str]]:
|
def find_places(text: str) -> list[tuple[str, str]]:
|
||||||
"""Places in order of preference: those introduced by "in/nach" first (the destination)."""
|
"""Places in order of preference: those introduced by "in/nach" first (the destination)."""
|
||||||
matches = list(PLACE_RE.finditer(text))
|
matches = list(PLACE_RE.finditer(text))
|
||||||
@@ -105,6 +164,12 @@ class EventExtractor(Enricher):
|
|||||||
|
|
||||||
def run(self, ctx: RunContext) -> Iterator[Any]:
|
def run(self, ctx: RunContext) -> Iterator[Any]:
|
||||||
conn = ctx.conn
|
conn = ctx.conn
|
||||||
|
if ctx.params.get("redo"): # -p redo=true: rebuild all extracted trips/meetings (after a rule change)
|
||||||
|
ctx.stats["claims_removed"] = conn.execute("DELETE FROM claim WHERE created_by = %s", (self.name,)).rowcount
|
||||||
|
conn.execute("DELETE FROM event e WHERE NOT EXISTS (SELECT 1 FROM event_participant p WHERE p.event_id = e.id) "
|
||||||
|
"AND e.source_id = (SELECT id FROM source WHERE slug = %s)", (self.spec.slug,))
|
||||||
|
conn.execute("UPDATE document SET meta = meta - 'events_at' - 'events' WHERE meta ? 'events_at'")
|
||||||
|
conn.commit()
|
||||||
linker = MentionLinker(conn)
|
linker = MentionLinker(conn)
|
||||||
while True:
|
while True:
|
||||||
docs = conn.execute(
|
docs = conn.execute(
|
||||||
@@ -151,7 +216,9 @@ class EventExtractor(Enricher):
|
|||||||
|
|
||||||
def event_records(conn, doc: dict, person_id: int, ev: dict, sentence: str, official: bool) -> Iterator[Any]:
|
def event_records(conn, doc: dict, person_id: int, ev: dict, sentence: str, official: bool) -> Iterator[Any]:
|
||||||
published = doc["published_at"]
|
published = doc["published_at"]
|
||||||
week = published.strftime("%G-W%V")
|
on = event_date(sentence, published.date())
|
||||||
|
when = on or published
|
||||||
|
week = when.strftime("%G-W%V")
|
||||||
anchor = ev.get("country") if ev["kind"] == "foreign_trip" else counterpart_anchor(ev.get("counterpart") or "")
|
anchor = ev.get("country") if ev["kind"] == "foreign_trip" else counterpart_anchor(ev.get("counterpart") or "")
|
||||||
row = conn.execute("SELECT full_name, family_name FROM person WHERE id = %s", (person_id,)).fetchone()
|
row = conn.execute("SELECT full_name, family_name FROM person WHERE id = %s", (person_id,)).fetchone()
|
||||||
# A sentence like "X empfing Y" yields the meeting for X and Y; never record "Y met Y".
|
# A sentence like "X empfing Y" yields the meeting for X and Y; never record "Y met Y".
|
||||||
@@ -164,14 +231,14 @@ def event_records(conn, doc: dict, person_id: int, ev: dict, sentence: str, offi
|
|||||||
summary_de = f"Treffen mit {ev['counterpart']}{where}"
|
summary_de = f"Treffen mit {ev['counterpart']}{where}"
|
||||||
summary_en = f"Meeting with {ev['counterpart']}{where}"
|
summary_en = f"Meeting with {ev['counterpart']}{where}"
|
||||||
event_key = fingerprint("event", ev["kind"], person_id, anchor, week)
|
event_key = fingerprint("event", ev["kind"], person_id, anchor, week)
|
||||||
yield Event(key=event_key, kind=ev["kind"], title=f"{row['full_name']}: {summary_de}", starts_at=published,
|
yield Event(key=event_key, kind=ev["kind"], title=f"{row['full_name']}: {summary_de}", starts_at=when,
|
||||||
location=ev.get("place"), country=ev.get("country"), url=doc["url"], description=excerpt(sentence, 400))
|
location=ev.get("place"), country=ev.get("country"), url=doc["url"], description=excerpt(sentence, 400))
|
||||||
foreign = ev.get("country") and ev["country"] not in AUSTRIA.values()
|
foreign = ev.get("country") and ev["country"] not in AUSTRIA.values()
|
||||||
yield Claim(
|
yield Claim(
|
||||||
claim_type=ev["claim_type"], person=PersonRef(ids={"politrack": str(person_id)}), occurred_at=published,
|
claim_type=ev["claim_type"], person=PersonRef(ids={"politrack": str(person_id)}), occurred_at=when,
|
||||||
summary_de=summary_de, summary_en=summary_en,
|
summary_de=summary_de, summary_en=summary_en,
|
||||||
data={"place": ev.get("place"), "country": ev.get("country"), "counterpart": ev.get("counterpart"),
|
data={"place": ev.get("place"), "country": ev.get("country"), "counterpart": ev.get("counterpart"),
|
||||||
"date_precision": "publication", "extracted": "rules"},
|
"date_precision": "day" if on else "publication", "extracted": "rules"},
|
||||||
evidence=[Evidence(url=doc["url"], source=doc["source"], title=doc["title"], published_at=published,
|
evidence=[Evidence(url=doc["url"], source=doc["source"], title=doc["title"], published_at=published,
|
||||||
quote=excerpt(sentence, 400), confidence=0.8 if official else 0.6)],
|
quote=excerpt(sentence, 400), confidence=0.8 if official else 0.6)],
|
||||||
topics=("Außenpolitik",) if foreign else (),
|
topics=("Außenpolitik",) if foreign else (),
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ def list_claims(
|
|||||||
) -> str:
|
) -> str:
|
||||||
"""Claims about a person/party/organisation, newest first. claim_types: role, vote, donation, money_flow,
|
"""Claims about a person/party/organisation, newest first. claim_types: role, vote, donation, money_flow,
|
||||||
statement, appearance, meeting, travel, side_job, legal_proceeding, lobbying, media_mention, career,
|
statement, appearance, meeting, travel, side_job, legal_proceeding, lobbying, media_mention, career,
|
||||||
parliamentary_question, government_decision, wiki_edit, declaration, ownership, affiliation, party_finance.
|
parliamentary_question, government_decision, wiki_edit, declaration, ownership, affiliation, party_finance,
|
||||||
|
election_result.
|
||||||
Dates as YYYY-MM-DD."""
|
Dates as YYYY-MM-DD."""
|
||||||
with connection() as conn:
|
with connection() as conn:
|
||||||
return _dump(queries.list_claims(
|
return _dump(queries.list_claims(
|
||||||
@@ -170,11 +171,12 @@ def calendar(start: str, end: str, person: str | None = None, party: str | None
|
|||||||
|
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
def person_votes(slug: str, topics: list[str] | None = None, limit: int = 50) -> str:
|
def person_votes(slug: str, topics: list[str] | None = None, include_parts: bool = False, limit: int = 50) -> str:
|
||||||
"""Votes: individual roll-call votes (with dissent flag) and faction votes during the person's mandates.
|
"""Votes: individual roll-call votes (with dissent flag) and faction votes during the person's mandates.
|
||||||
`spoke` links a speech by the person on the same item (say vs. vote)."""
|
`spoke` links a speech by the person on the same item (say vs. vote). include_parts adds European
|
||||||
|
Parliament votes on amendments and parts of a text."""
|
||||||
with connection() as conn:
|
with connection() as conn:
|
||||||
return _dump(queries.person_votes(conn, slug, topics=topics, limit=limit))
|
return _dump(queries.person_votes(conn, slug, topics=topics, include_parts=include_parts, limit=limit))
|
||||||
|
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
"""Read queries shared by the REST API and the MCP server (one module per domain)."""
|
"""Read queries shared by the REST API and the MCP server (one module per domain)."""
|
||||||
|
|
||||||
from politrack.queries.admin import list_sources, list_topics, pending_claims, recent_runs, set_review, stats
|
from politrack.queries.admin import (
|
||||||
|
list_sources,
|
||||||
|
list_topics,
|
||||||
|
pending_claims,
|
||||||
|
recent_runs,
|
||||||
|
set_review,
|
||||||
|
source_freshness,
|
||||||
|
stats,
|
||||||
|
)
|
||||||
from politrack.queries.claims import calendar, list_claims, timeline_histogram
|
from politrack.queries.claims import calendar, list_claims, timeline_histogram
|
||||||
from politrack.queries.common import SourceFilter
|
from politrack.queries.common import SourceFilter
|
||||||
from politrack.queries.money import list_money, money_summary, social_feed, wiki_edits
|
from politrack.queries.money import list_money, money_summary, social_feed, wiki_edits
|
||||||
@@ -13,5 +21,5 @@ __all__ = [
|
|||||||
"SourceFilter", "calendar", "former_overview", "get_organization", "get_party", "get_person", "list_claims",
|
"SourceFilter", "calendar", "former_overview", "get_organization", "get_party", "get_person", "list_claims",
|
||||||
"list_money", "list_organizations", "list_parties", "list_persons", "list_sources", "list_topics", "list_votes",
|
"list_money", "list_organizations", "list_parties", "list_persons", "list_sources", "list_topics", "list_votes",
|
||||||
"money_summary", "pending_claims", "recent_runs", "person_network", "person_votes", "search", "set_review", "social_feed",
|
"money_summary", "pending_claims", "recent_runs", "person_network", "person_votes", "search", "set_review", "social_feed",
|
||||||
"stats", "timeline_histogram", "vote_detail", "wiki_edits",
|
"source_freshness", "stats", "timeline_histogram", "vote_detail", "wiki_edits",
|
||||||
]
|
]
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from datetime import datetime, timedelta, timezone
|
||||||
|
|
||||||
from psycopg import Connection
|
from psycopg import Connection
|
||||||
|
|
||||||
|
|
||||||
@@ -61,6 +63,27 @@ def stats(conn: Connection) -> dict:
|
|||||||
).fetchone()
|
).fetchone()
|
||||||
|
|
||||||
|
|
||||||
|
def source_freshness(conn: Connection, schedules: dict[str, str], now: datetime | None = None) -> list[dict]:
|
||||||
|
"""Last successful run per scheduled task. Stale = its two latest scheduled slots passed without a
|
||||||
|
successful run (plus an hour's grace for long runs), so one slow or failed run alone never alerts."""
|
||||||
|
from croniter import croniter
|
||||||
|
|
||||||
|
now = now or datetime.now(timezone.utc)
|
||||||
|
last_ok = {r["adapter"]: r["at"] for r in conn.execute(
|
||||||
|
"SELECT adapter, max(COALESCE(finished_at, started_at)) AS at FROM run "
|
||||||
|
"WHERE status IN ('ok', 'partial') GROUP BY adapter")}
|
||||||
|
rows = []
|
||||||
|
for name, schedule in sorted(schedules.items()):
|
||||||
|
it = croniter(schedule, now)
|
||||||
|
due = it.get_prev(datetime)
|
||||||
|
before = it.get_prev(datetime)
|
||||||
|
deadline = before - timedelta(hours=1)
|
||||||
|
last = last_ok.get(name)
|
||||||
|
rows.append({"adapter": name, "schedule": schedule, "last_success": last.isoformat() if last else None,
|
||||||
|
"stale": last is None or last < deadline, "latest_slot": due.isoformat()})
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
def recent_runs(conn: Connection, limit: int = 50) -> list[dict]:
|
def recent_runs(conn: Connection, limit: int = 50) -> list[dict]:
|
||||||
return conn.execute(
|
return conn.execute(
|
||||||
"SELECT adapter, mode, status, started_at, finished_at, stats, left(error, 2000) AS error FROM run "
|
"SELECT adapter, mode, status, started_at, finished_at, stats, left(error, 2000) AS error FROM run "
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from datetime import date
|
|||||||
|
|
||||||
from psycopg import Connection
|
from psycopg import Connection
|
||||||
|
|
||||||
from politrack.queries.common import VISIBLE, SourceFilter
|
from politrack.queries.common import NOT_PART_VOTE, VISIBLE, SourceFilter
|
||||||
|
|
||||||
|
|
||||||
def list_claims(
|
def list_claims(
|
||||||
@@ -62,6 +62,7 @@ def list_claims(
|
|||||||
WHERE e.claim_id = c.id AND {source_sql}
|
WHERE e.claim_id = c.id AND {source_sql}
|
||||||
) ev
|
) ev
|
||||||
WHERE ev.evidence IS NOT NULL AND {VISIBLE}
|
WHERE ev.evidence IS NOT NULL AND {VISIBLE}
|
||||||
|
AND (%(claim_id)s::bigint IS NOT NULL OR {NOT_PART_VOTE})
|
||||||
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
||||||
AND (%(party)s::text IS NULL OR o.slug = %(party)s
|
AND (%(party)s::text IS NULL OR o.slug = %(party)s
|
||||||
OR c.counterpart_org_id = (SELECT id FROM organization WHERE slug = %(party)s))
|
OR c.counterpart_org_id = (SELECT id FROM organization WHERE slug = %(party)s))
|
||||||
@@ -97,7 +98,7 @@ def timeline_histogram(conn: Connection, *, sources: SourceFilter, person: str |
|
|||||||
LEFT JOIN organization o ON o.id = c.organization_id
|
LEFT JOIN organization o ON o.id = c.organization_id
|
||||||
JOIN claim_evidence e ON e.claim_id = c.id JOIN document d ON d.id = e.document_id
|
JOIN claim_evidence e ON e.claim_id = c.id JOIN document d ON d.id = e.document_id
|
||||||
JOIN source s ON s.id = d.source_id
|
JOIN source s ON s.id = d.source_id
|
||||||
WHERE {VISIBLE} AND {source_sql} AND COALESCE(c.occurred_at, c.valid_from::timestamptz) IS NOT NULL
|
WHERE {VISIBLE} AND {NOT_PART_VOTE} AND {source_sql} AND COALESCE(c.occurred_at, c.valid_from::timestamptz) IS NOT NULL
|
||||||
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
||||||
AND (%(party)s::text IS NULL OR o.slug = %(party)s)
|
AND (%(party)s::text IS NULL OR o.slug = %(party)s)
|
||||||
AND c.claim_type <> 'role'
|
AND c.claim_type <> 'role'
|
||||||
@@ -149,7 +150,7 @@ def calendar(conn: Connection, *, sources: SourceFilter, start: date, end: date,
|
|||||||
LEFT JOIN organization o ON o.id = c.organization_id
|
LEFT JOIN organization o ON o.id = c.organization_id
|
||||||
JOIN claim_evidence e ON e.claim_id = c.id JOIN document d ON d.id = e.document_id
|
JOIN claim_evidence e ON e.claim_id = c.id JOIN document d ON d.id = e.document_id
|
||||||
JOIN source s ON s.id = d.source_id
|
JOIN source s ON s.id = d.source_id
|
||||||
WHERE {VISIBLE} AND {source_sql} AND c.occurred_at::date BETWEEN %(start)s AND %(end)s
|
WHERE {VISIBLE} AND {NOT_PART_VOTE} AND {source_sql} AND c.occurred_at::date BETWEEN %(start)s AND %(end)s
|
||||||
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
AND (%(person)s::text IS NULL OR p.slug = %(person)s OR cpp.slug = %(person)s)
|
||||||
AND (%(party)s::text IS NULL OR o.slug = %(party)s)
|
AND (%(party)s::text IS NULL OR o.slug = %(party)s)
|
||||||
GROUP BY 1, 2 ORDER BY 1
|
GROUP BY 1, 2 ORDER BY 1
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ from typing import Any
|
|||||||
|
|
||||||
VISIBLE = ("c.merged_into IS NULL AND (c.review_status = 'published' OR "
|
VISIBLE = ("c.merged_into IS NULL AND (c.review_status = 'published' OR "
|
||||||
"(%(include_pending)s AND c.review_status = 'pending'))")
|
"(%(include_pending)s AND c.review_status = 'pending'))")
|
||||||
|
# Votes on amendments and parts of a text only appear where someone asks for them: they would bury everything else.
|
||||||
|
NOT_PART_VOTE = "NOT COALESCE((c.data->>'part_vote')::boolean, FALSE)"
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ def get_person(conn: Connection, slug: str) -> dict | None:
|
|||||||
r["claim_type"]: r["count"]
|
r["claim_type"]: r["count"]
|
||||||
for r in conn.execute(
|
for r in conn.execute(
|
||||||
"SELECT claim_type, count(*) AS count FROM claim WHERE person_id = %s AND merged_into IS NULL "
|
"SELECT claim_type, count(*) AS count FROM claim WHERE person_id = %s AND merged_into IS NULL "
|
||||||
"AND review_status = 'published' GROUP BY claim_type",
|
"AND review_status = 'published' AND NOT COALESCE((data->>'part_vote')::boolean, FALSE) GROUP BY claim_type",
|
||||||
(person["id"],),
|
(person["id"],),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ SPOKE = """
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def person_votes(conn: Connection, slug: str, *, topics: list[str] | None = None, limit: int = 100,
|
def person_votes(conn: Connection, slug: str, *, topics: list[str] | None = None, include_parts: bool = False,
|
||||||
offset: int = 0) -> list[dict]:
|
limit: int = 100, offset: int = 0) -> list[dict]:
|
||||||
"""Votes concerning a person.
|
"""Votes concerning a person (include_parts: also votes on amendments and parts of a text).
|
||||||
|
|
||||||
* individual=true: roll-call votes with the person's own vote; dissent=true when it differs from the
|
* individual=true: roll-call votes with the person's own vote; dissent=true when it differs from the
|
||||||
majority of their faction (vote_position.party_id = their faction that day).
|
majority of their faction (vote_position.party_id = their faction that day).
|
||||||
@@ -41,7 +41,8 @@ def person_votes(conn: Connection, slug: str, *, topics: list[str] | None = None
|
|||||||
JOIN organization ch ON ch.id = ve.chamber_id
|
JOIN organization ch ON ch.id = ve.chamber_id
|
||||||
LEFT JOIN organization fo ON fo.id = vp.party_id
|
LEFT JOIN organization fo ON fo.id = vp.party_id
|
||||||
LEFT JOIN vote_position fp ON fp.vote_event_id = ve.id AND fp.organization_id = vp.party_id
|
LEFT JOIN vote_position fp ON fp.vote_event_id = ve.id AND fp.organization_id = vp.party_id
|
||||||
WHERE (%(topics)s::text[] IS NULL OR EXISTS (
|
WHERE (%(include_parts)s OR NOT ve.part_vote)
|
||||||
|
AND (%(topics)s::text[] IS NULL OR EXISTS (
|
||||||
SELECT 1 FROM topic_assignment ta JOIN topic t ON t.id = ta.topic_id
|
SELECT 1 FROM topic_assignment ta JOIN topic t ON t.id = ta.topic_id
|
||||||
WHERE ta.claim_id = vp.claim_id AND t.slug = ANY(%(topics)s)))
|
WHERE ta.claim_id = vp.claim_id AND t.slug = ANY(%(topics)s)))
|
||||||
UNION ALL
|
UNION ALL
|
||||||
@@ -63,13 +64,13 @@ def person_votes(conn: Connection, slug: str, *, topics: list[str] | None = None
|
|||||||
ORDER BY voted_on DESC NULLS LAST
|
ORDER BY voted_on DESC NULLS LAST
|
||||||
LIMIT %(limit)s OFFSET %(offset)s
|
LIMIT %(limit)s OFFSET %(offset)s
|
||||||
""",
|
""",
|
||||||
{"slug": slug, "topics": topics, "limit": limit, "offset": offset},
|
{"slug": slug, "topics": topics, "include_parts": include_parts, "limit": limit, "offset": offset},
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
|
|
||||||
def list_votes(conn: Connection, *, party: str | None = None, topics: list[str] | None = None,
|
def list_votes(conn: Connection, *, party: str | None = None, topics: list[str] | None = None,
|
||||||
roll_call: bool | None = None, since: date | None = None, until: date | None = None,
|
roll_call: bool | None = None, since: date | None = None, until: date | None = None,
|
||||||
limit: int = 50, offset: int = 0) -> list[dict]:
|
include_parts: bool = False, limit: int = 50, offset: int = 0) -> list[dict]:
|
||||||
return conn.execute(
|
return conn.execute(
|
||||||
"""
|
"""
|
||||||
SELECT ve.id, ve.item_title, ve.item_ref, ve.stage, ve.voted_on, ve.result, ve.url, ve.protocol_url,
|
SELECT ve.id, ve.item_title, ve.item_ref, ve.stage, ve.voted_on, ve.result, ve.url, ve.protocol_url,
|
||||||
@@ -83,7 +84,8 @@ def list_votes(conn: Connection, *, party: str | None = None, topics: list[str]
|
|||||||
JOIN organization ch ON ch.id = ve.chamber_id
|
JOIN organization ch ON ch.id = ve.chamber_id
|
||||||
LEFT JOIN vote_position vp ON vp.vote_event_id = ve.id AND vp.organization_id IS NOT NULL
|
LEFT JOIN vote_position vp ON vp.vote_event_id = ve.id AND vp.organization_id IS NOT NULL
|
||||||
LEFT JOIN organization o ON o.id = vp.organization_id
|
LEFT JOIN organization o ON o.id = vp.organization_id
|
||||||
WHERE (%(party)s::text IS NULL OR EXISTS (
|
WHERE (%(include_parts)s OR NOT ve.part_vote)
|
||||||
|
AND (%(party)s::text IS NULL OR EXISTS (
|
||||||
SELECT 1 FROM vote_position v2 JOIN organization o2 ON o2.id = v2.organization_id
|
SELECT 1 FROM vote_position v2 JOIN organization o2 ON o2.id = v2.organization_id
|
||||||
WHERE v2.vote_event_id = ve.id AND o2.slug = %(party)s))
|
WHERE v2.vote_event_id = ve.id AND o2.slug = %(party)s))
|
||||||
AND (%(topics)s::text[] IS NULL OR EXISTS (
|
AND (%(topics)s::text[] IS NULL OR EXISTS (
|
||||||
@@ -97,7 +99,7 @@ def list_votes(conn: Connection, *, party: str | None = None, topics: list[str]
|
|||||||
LIMIT %(limit)s OFFSET %(offset)s
|
LIMIT %(limit)s OFFSET %(offset)s
|
||||||
""",
|
""",
|
||||||
{"party": party, "topics": topics, "roll_call": roll_call, "since": since, "until": until,
|
{"party": party, "topics": topics, "roll_call": roll_call, "since": since, "until": until,
|
||||||
"limit": limit, "offset": offset},
|
"include_parts": include_parts, "limit": limit, "offset": offset},
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,235 @@
|
|||||||
|
"""Official election results from the Federal Ministry of the Interior (BMI, Bundeswahlbehörde).
|
||||||
|
|
||||||
|
Per election: the final result (XLSX, one row per region with votes per party) and the preference votes of the
|
||||||
|
candidates (XLSX, per list). Only the federal and state totals of the result are kept; municipal rows stay in the
|
||||||
|
raw archive. Candidates become claims only if they resolve to a known politician: by exact name plus birth year
|
||||||
|
where the file has one, otherwise by exact, unambiguous name. Unknown candidates are counted, never stored, and
|
||||||
|
their occupation is never kept.
|
||||||
|
|
||||||
|
Not covered yet: the 2019 state and regional lists (a print layout with side-by-side columns), elections before
|
||||||
|
2019, Landtag and municipal elections (published by the states).
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import io
|
||||||
|
import re
|
||||||
|
from collections.abc import Iterator
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from datetime import date
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from politrack.core import Adapter, Request, Response, RunContext, SourceSpec, register
|
||||||
|
from politrack.core.records import Claim, Evidence, OrgRef, PersonRef
|
||||||
|
from politrack.text import strip_titles
|
||||||
|
|
||||||
|
BMI = "https://www.bmi.gv.at/412"
|
||||||
|
SPEC = SourceSpec(
|
||||||
|
slug="bmi-wahlen", name="Bundesministerium für Inneres – Wahlergebnisse", kind="official",
|
||||||
|
homepage=f"{BMI}/start.aspx", license="Amtliches Werk (§7 UrhG); Ergebnisse auch als CC BY 4.0 auf data.gv.at",
|
||||||
|
access="bulk", trust=95, min_interval=3.0,
|
||||||
|
tos_notes="Final results and preference votes as published by the Bundeswahlbehörde (XLSX). robots.txt sets "
|
||||||
|
"no rules. Only candidates who resolve to a known politician are stored; occupations are never kept.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class Election:
|
||||||
|
key: str
|
||||||
|
name_de: str
|
||||||
|
name_en: str
|
||||||
|
held_on: date
|
||||||
|
body: str # slug of the elected body
|
||||||
|
path: str # folder on bmi.gv.at
|
||||||
|
result: str | None # None: only in a format we can't read (EU 2019: legacy .xls)
|
||||||
|
preferences: tuple[tuple[str, str], ...] # (layout, file): layouts "bund", "land", "eu"
|
||||||
|
|
||||||
|
|
||||||
|
ELECTIONS = (
|
||||||
|
Election("nrw2024", "Nationalratswahl 2024", "2024 National Council election", date(2024, 9, 29), "nationalrat",
|
||||||
|
"nationalratswahlen/nationalratswahl_2024/files", "endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx",
|
||||||
|
(("bund", "nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx"),
|
||||||
|
("land", "nrw2024_aufstellung_der_vorzugsstimmen_der_landes_undregionalbewerber_16102024.xlsx"))),
|
||||||
|
Election("nrw2019", "Nationalratswahl 2019", "2019 National Council election", date(2019, 9, 29), "nationalrat",
|
||||||
|
"nationalratswahlen/nationalratswahl_2019/files", "endgultiges_gesamtergebnis_nrw19_16102019.xlsx",
|
||||||
|
(("bund", "nrw19_vorzugsstimmen_bundesweit_16102019.xlsx"),)),
|
||||||
|
Election("euw2024", "Europawahl 2024", "2024 European Parliament election", date(2024, 6, 9),
|
||||||
|
"europaeisches-parlament", "europawahlen/europawahl_2024/files", "endgueltiges_ergebnis_europawahl_26062024.xlsx",
|
||||||
|
(("eu", "gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx"),)),
|
||||||
|
Election("nrw2017", "Nationalratswahl 2017", "2017 National Council election", date(2017, 10, 15), "nationalrat",
|
||||||
|
"nationalratswahlen/nationalratswahl_2017/files", "nrw17_endgueltiges_gesamtergebnis.xlsx",
|
||||||
|
(("bund", "nrw17_vorzugsstimmen_bundesweit.xlsx"),)),
|
||||||
|
Election("euw2019", "Europawahl 2019", "2019 European Parliament election", date(2019, 5, 26),
|
||||||
|
"europaeisches-parlament", "europawahlen/europawahl_2019/files/endgueltiges_ergebnis", None,
|
||||||
|
(("eu", "euw_2019_vorzugsstimmen_gesamthomepage.xlsx"),)),
|
||||||
|
)
|
||||||
|
BY_KEY = {e.key: e for e in ELECTIONS}
|
||||||
|
|
||||||
|
REGION_CODE = re.compile(r"^G\d0000$") # G00000 Österreich, G10000 Burgenland ... G90000 Wien
|
||||||
|
PARTY_HEAD = re.compile(r"\(([^()]+)\)\s*$")
|
||||||
|
LIST_HEAD = re.compile(r"^(Landes|Regional)parteilisten im (?:Landes|Regional)wahlkreis\s+(.+?)\s*$")
|
||||||
|
|
||||||
|
|
||||||
|
def de_int(n: int) -> str:
|
||||||
|
return f"{n:,}".replace(",", ".")
|
||||||
|
|
||||||
|
|
||||||
|
def de_pct(p: float) -> str:
|
||||||
|
return f"{p:.2f}".replace(".", ",")
|
||||||
|
|
||||||
|
|
||||||
|
def sheets(body: bytes) -> list[tuple[str, list[tuple]]]:
|
||||||
|
import openpyxl
|
||||||
|
|
||||||
|
wb = openpyxl.load_workbook(io.BytesIO(body), read_only=True, data_only=True)
|
||||||
|
return [(ws.title, list(ws.iter_rows(values_only=True))) for ws in wb.worksheets]
|
||||||
|
|
||||||
|
|
||||||
|
def label(*cells: Any) -> str:
|
||||||
|
return " ".join(str(c) for c in cells if c not in (None, "")).replace("\n", "").strip().lower()
|
||||||
|
|
||||||
|
|
||||||
|
def parse_results(rows: list[tuple]) -> list[dict[str, Any]]:
|
||||||
|
"""Votes per party for Austria and the nine states. The header has party names in the first row, either
|
||||||
|
with the totals in the same row (2024) or split over two rows ("Stimmen" / "gültige", 2019 and EU 2024)."""
|
||||||
|
head, sub = rows[0], rows[1] if rows[1] and rows[1][0] is None else ()
|
||||||
|
labels = [label(head[i], sub[i] if i < len(sub) else None) for i in range(len(head))]
|
||||||
|
valid_col = next(i for i, text in enumerate(labels) if text.endswith("gültige") and "ungültige" not in text)
|
||||||
|
parties = [(i, str(name).strip()) for i, name in enumerate(head)
|
||||||
|
if i > valid_col and isinstance(name, str) and name.strip() not in ("", "%")]
|
||||||
|
out = []
|
||||||
|
for row in rows:
|
||||||
|
code = row[0]
|
||||||
|
if not (isinstance(code, str) and REGION_CODE.match(code)):
|
||||||
|
continue
|
||||||
|
valid = int(row[valid_col] or 0)
|
||||||
|
for col, party in parties:
|
||||||
|
votes = int(row[col] or 0)
|
||||||
|
if not votes:
|
||||||
|
continue
|
||||||
|
# the share as published (next column), so the figures match the official result exactly
|
||||||
|
published = row[col + 1] if col + 1 < len(row) and head[col + 1] == "%" else None
|
||||||
|
percent = (round(float(published), 2) if isinstance(published, (int, float))
|
||||||
|
else round(votes * 100 / valid, 2) if valid else None)
|
||||||
|
out.append({"code": code, "region": str(row[1]).strip(), "electorate": int(row[2] or 0),
|
||||||
|
"valid": valid, "party": party, "votes": votes, "percent": percent})
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def split_name(text: str) -> tuple[str, str]:
|
||||||
|
"""'Brunner, Dr. Magnus' -> ('Brunner', 'Dr. Magnus'); 'Babler, MSc, Andreas' -> ('Babler', 'Andreas')."""
|
||||||
|
family, _, rest = str(text).partition(",")
|
||||||
|
parts = [p.strip() for p in rest.split(",")]
|
||||||
|
return family.strip(), next((p for p in parts if strip_titles(p)), "")
|
||||||
|
|
||||||
|
|
||||||
|
def parse_preferences(layout: str, workbook: list[tuple[str, list[tuple]]]) -> list[dict[str, Any]]:
|
||||||
|
"""Candidates with their preference votes. Returns rank, name, birth year (if published), party, list."""
|
||||||
|
out: list[dict[str, Any]] = []
|
||||||
|
for sheet, rows in workbook:
|
||||||
|
party, party_name, list_label = None, None, "Bundesliste"
|
||||||
|
total_col = None
|
||||||
|
if layout == "eu":
|
||||||
|
party, party_name, list_label = sheet.strip(), sheet.strip(), "Bundesliste"
|
||||||
|
for row in rows:
|
||||||
|
cells = [c for c in row if c is not None and c != ""]
|
||||||
|
if not cells:
|
||||||
|
continue
|
||||||
|
first = row[0]
|
||||||
|
if layout == "eu" and any(isinstance(c, str) and re.match(r"Bewerber|Kandidat", c) for c in row):
|
||||||
|
# header: "LP | Bewerber(in) | BGLD ... | Gesamt" (2024) or "_ | Kandidat(in) | ... | Gesamt" (2019).
|
||||||
|
# 2024 repeats a re-sorted copy of the table further right: its header must not win.
|
||||||
|
if total_col is None:
|
||||||
|
total_col = next((i for i, c in enumerate(row) if isinstance(c, str) and c.strip() == "Gesamt"),
|
||||||
|
None)
|
||||||
|
continue
|
||||||
|
if isinstance(first, str) and len(cells) == 1:
|
||||||
|
if (m := LIST_HEAD.match(first)):
|
||||||
|
region = re.sub(r"^\w+\s*-\s*", "", m.group(2)) # "1A - Burgenland Nord" -> "Burgenland Nord"
|
||||||
|
list_label = f"{m.group(1)}parteiliste {region}"
|
||||||
|
elif (m := PARTY_HEAD.search(first)) and layout != "eu":
|
||||||
|
party, party_name, list_label = m.group(1).strip(), first.strip(), "Bundesliste"
|
||||||
|
continue
|
||||||
|
rank = str(first).rstrip(".") if first is not None else ""
|
||||||
|
if not rank.isdigit() or party is None:
|
||||||
|
continue
|
||||||
|
if layout == "land":
|
||||||
|
family, given, year, votes = row[1], row[2], row[4], row[6]
|
||||||
|
elif layout == "eu":
|
||||||
|
family, given = split_name(row[1])
|
||||||
|
year, votes = None, row[total_col] if total_col is not None else None
|
||||||
|
else:
|
||||||
|
family, given = split_name(row[1])
|
||||||
|
year, votes = row[2], row[4]
|
||||||
|
if not family or not isinstance(votes, (int, float)):
|
||||||
|
continue
|
||||||
|
out.append({"rank": int(rank), "name": f"{given} {family}".strip(), "birth_year": int(year)
|
||||||
|
if isinstance(year, (int, float)) else None, "votes": int(votes), "party": party,
|
||||||
|
"party_name": party_name, "list": list_label})
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
@register
|
||||||
|
class ElectionResults(Adapter):
|
||||||
|
spec = SPEC
|
||||||
|
name = "bmi.elections"
|
||||||
|
description = "Final results of federal and EU elections and candidates' preference votes (BMI)"
|
||||||
|
schedule = "0 6 1 * *" # the files are final; monthly re-checks cost a conditional request each
|
||||||
|
queue = "bulk"
|
||||||
|
|
||||||
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
|
wanted = set(ctx.params.get("elections") or BY_KEY)
|
||||||
|
for election in ELECTIONS:
|
||||||
|
if election.key not in wanted:
|
||||||
|
continue
|
||||||
|
base = f"{BMI}/{election.path}"
|
||||||
|
if election.result:
|
||||||
|
yield Request(url=f"{base}/{election.result}", kind="result", meta={"election": election.key})
|
||||||
|
for layout, file in election.preferences:
|
||||||
|
yield Request(url=f"{base}/{file}", kind="preferences", meta={"election": election.key, "layout": layout})
|
||||||
|
|
||||||
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Claim]:
|
||||||
|
election = BY_KEY[response.meta["election"]]
|
||||||
|
workbook = sheets(response.body)
|
||||||
|
if response.request.kind == "result":
|
||||||
|
yield from self.result_claims(ctx, election, response.request.url, workbook[0][1])
|
||||||
|
else:
|
||||||
|
yield from self.preference_claims(ctx, election, response.request.url,
|
||||||
|
parse_preferences(response.meta["layout"], workbook))
|
||||||
|
|
||||||
|
def result_claims(self, ctx: RunContext, election: Election, url: str, rows: list[tuple]) -> Iterator[Claim]:
|
||||||
|
for r in parse_results(rows):
|
||||||
|
pct = f"{de_pct(r['percent'])} %" if r["percent"] is not None else "?"
|
||||||
|
yield Claim(
|
||||||
|
claim_type="election_result", org=OrgRef(short_name=r["party"], kind="party", create=False),
|
||||||
|
counterpart_org=OrgRef(slug=election.body), occurred_at=election.held_on,
|
||||||
|
key=("election", election.key, r["code"], r["party"]),
|
||||||
|
summary_de=f"{r['party']}: {pct} ({de_int(r['votes'])} Stimmen) bei der {election.name_de} – {r['region']}",
|
||||||
|
summary_en=f"{r['party']}: {pct.replace(',', '.')} ({r['votes']:,} votes) in the {election.name_en} "
|
||||||
|
f"– {r['region']}",
|
||||||
|
data={"election": election.key, "party": r["party"], "region": r["region"], "region_code": r["code"],
|
||||||
|
"votes": r["votes"], "percent": r["percent"], "valid_votes": r["valid"],
|
||||||
|
"electorate": r["electorate"]},
|
||||||
|
evidence=[Evidence(url=url, doc_type="dataset_row", title=f"BMI: {election.name_de}, endgültiges Ergebnis",
|
||||||
|
published_at=election.held_on, locator=f"{r['code']}:{r['party']}",
|
||||||
|
quote=f"{r['region']} | {r['party']} | {r['votes']} | {r['valid']} gültige")],
|
||||||
|
)
|
||||||
|
|
||||||
|
def preference_claims(self, ctx: RunContext, election: Election, url: str,
|
||||||
|
candidates: list[dict[str, Any]]) -> Iterator[Claim]:
|
||||||
|
for c in candidates:
|
||||||
|
hints = {"birth_year": c["birth_year"], "no_name_match": True} if c["birth_year"] else {}
|
||||||
|
yield Claim(
|
||||||
|
claim_type="election_result", person=PersonRef(name=c["name"], hints=hints),
|
||||||
|
counterpart_org=OrgRef(short_name=c["party"], kind="party", create=False), occurred_at=election.held_on,
|
||||||
|
key=("preference-votes", election.key, c["list"], c["party"], c["rank"], c["name"]),
|
||||||
|
summary_de=f"{de_int(c['votes'])} Vorzugsstimmen bei der {election.name_de} "
|
||||||
|
f"({c['list']} {c['party']}, Platz {c['rank']})",
|
||||||
|
summary_en=f"{c['votes']:,} preference votes in the {election.name_en} "
|
||||||
|
f"({c['party']}, {c['list']}, position {c['rank']})",
|
||||||
|
data={"election": election.key, "preference_votes": c["votes"], "rank": c["rank"], "list": c["list"],
|
||||||
|
"party": c["party"]},
|
||||||
|
evidence=[Evidence(url=url, doc_type="dataset_row", title=f"BMI: {election.name_de}, Vorzugsstimmen",
|
||||||
|
published_at=election.held_on, locator=f"{c['list']}:{c['party']}:{c['rank']}",
|
||||||
|
quote=f"{c['list']} {c['party']}, Platz {c['rank']}: {c['votes']} Vorzugsstimmen")],
|
||||||
|
)
|
||||||
@@ -42,7 +42,9 @@ EP_SPEC = SourceSpec(
|
|||||||
tos_notes="EP Open Data API v2 (limit 500 requests / 5 min / endpoint).",
|
tos_notes="EP Open Data API v2 (limit 500 requests / 5 min / endpoint).",
|
||||||
)
|
)
|
||||||
EC_EXPORT = "https://ec.europa.eu/transparency-initiative/meetings/data/meetings/dataxlsx"
|
EC_EXPORT = "https://ec.europa.eu/transparency-initiative/meetings/data/meetings/dataxlsx"
|
||||||
EC_TERMS = ("meetingscommissionrepresentatives2429", "meetingscommissionrepresentatives1924")
|
EC_TERMS = ("meetingscommissionrepresentatives2429", "meetingscommissionrepresentatives1924",
|
||||||
|
"meetingscommissionrepresentatives1419")
|
||||||
|
EP_PAST_TERMS = (9,) # Austrian MEPs of earlier terms: their votes and declarations, roles with end dates
|
||||||
EP_API = "https://data.europarl.europa.eu/api/v2"
|
EP_API = "https://data.europarl.europa.eu/api/v2"
|
||||||
# Austrian Commissioners in the terms covered by EC_TERMS (fallback if the DB has no Commission roles yet).
|
# Austrian Commissioners in the terms covered by EC_TERMS (fallback if the DB has no Commission roles yet).
|
||||||
AUSTRIAN_COMMISSIONERS = ("Johannes Hahn", "Magnus Brunner")
|
AUSTRIAN_COMMISSIONERS = ("Johannes Hahn", "Magnus Brunner")
|
||||||
@@ -123,12 +125,20 @@ class EuropeanParliament(Adapter):
|
|||||||
description = "Current Austrian MEPs (mandates) and their declarations"
|
description = "Current Austrian MEPs (mandates) and their declarations"
|
||||||
schedule = "30 4 * * 2"
|
schedule = "30 4 * * 2"
|
||||||
creates_persons = True
|
creates_persons = True
|
||||||
|
parser_version = 2 # roles of former MEPs end with their last membership
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
yield Request(url=f"{EP_API}/meps/show-current", kind="meps",
|
yield Request(url=f"{EP_API}/meps/show-current", kind="meps",
|
||||||
params={"country-of-representation": "AT", "format": "application/ld+json", "limit": 100})
|
params={"country-of-representation": "AT", "format": "application/ld+json", "limit": 100})
|
||||||
|
for term in EP_PAST_TERMS:
|
||||||
|
yield Request(url=f"{EP_API}/meps", kind="meps",
|
||||||
|
params={"parliamentary-term": term, "country-of-representation": "AT",
|
||||||
|
"format": "application/ld+json", "limit": 100})
|
||||||
|
|
||||||
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
|
if not response.body.strip(): # the API answers some MEPs' declaration requests with an empty body
|
||||||
|
ctx.stats["empty_responses"] += 1
|
||||||
|
return
|
||||||
data = response.json().get("data") or []
|
data = response.json().get("data") or []
|
||||||
if response.request.kind == "meps":
|
if response.request.kind == "meps":
|
||||||
for mep in data:
|
for mep in data:
|
||||||
@@ -154,19 +164,22 @@ class EuropeanParliament(Adapter):
|
|||||||
if mep.get("img"):
|
if mep.get("img"):
|
||||||
yield PersonRecord(ref=ref, full_name=meta["name"], photo_url=mep["img"],
|
yield PersonRecord(ref=ref, full_name=meta["name"], photo_url=mep["img"],
|
||||||
birth_date=date.fromisoformat(mep["bday"][:10]) if mep.get("bday") else None)
|
birth_date=date.fromisoformat(mep["bday"][:10]) if mep.get("bday") else None)
|
||||||
starts = [m.get("memberDuring", {}).get("startDate") for m in mep.get("hasMembership") or []
|
periods = sorted(((m.get("memberDuring") or {}).get("startDate"), (m.get("memberDuring") or {}).get("endDate"))
|
||||||
if "EU_PARLIAMENT" in str(m.get("membershipClassification", ""))]
|
for m in mep.get("hasMembership") or []
|
||||||
starts = sorted(s for s in starts if s)
|
if "EU_PARLIAMENT" in str(m.get("membershipClassification", ""))
|
||||||
|
and (m.get("memberDuring") or {}).get("startDate"))
|
||||||
body = OrgRef(slug="europaeisches-parlament")
|
body = OrgRef(slug="europaeisches-parlament")
|
||||||
start = date.fromisoformat(starts[-1]) if starts else None
|
start = date.fromisoformat(periods[-1][0][:10]) if periods else None
|
||||||
|
# former MEPs: the latest membership has ended; current ones have an open end
|
||||||
|
end = date.fromisoformat(periods[-1][1][:10]) if periods and periods[-1][1] else None
|
||||||
url = f"https://www.europarl.europa.eu/meps/de/{meta['mep_id']}"
|
url = f"https://www.europarl.europa.eu/meps/de/{meta['mep_id']}"
|
||||||
yield Claim(
|
yield Claim(
|
||||||
claim_type="role", person=ref, org=body, valid_from=start,
|
claim_type="role", person=ref, org=body, valid_from=start, valid_to=end,
|
||||||
summary_de=f"Mitglied des Europäischen Parlaments (Fraktion {meta.get('group') or '?'})",
|
summary_de=f"Mitglied des Europäischen Parlaments (Fraktion {meta.get('group') or '?'})",
|
||||||
summary_en=f"Member of the European Parliament ({meta.get('group') or '?'})",
|
summary_en=f"Member of the European Parliament ({meta.get('group') or '?'})",
|
||||||
data={"ep_group": meta.get("group")},
|
data={"ep_group": meta.get("group")},
|
||||||
evidence=[Evidence(url=url, doc_type="api_record", title=f"Europäisches Parlament: {meta['name']}")],
|
evidence=[Evidence(url=url, doc_type="api_record", title=f"Europäisches Parlament: {meta['name']}")],
|
||||||
facet=Role(role="mp", level="eu", body=body, start=start),
|
facet=Role(role="mp", level="eu", body=body, start=start, end=end),
|
||||||
)
|
)
|
||||||
|
|
||||||
def parse_declarations(self, response: Response, docs: list[dict]) -> Iterator[Claim]:
|
def parse_declarations(self, response: Response, docs: list[dict]) -> Iterator[Claim]:
|
||||||
@@ -197,6 +210,7 @@ class EuropeanParliament(Adapter):
|
|||||||
|
|
||||||
LD_JSON = "application/ld+json"
|
LD_JSON = "application/ld+json"
|
||||||
EP_DECISIONS_PAGE = 500
|
EP_DECISIONS_PAGE = 500
|
||||||
|
EP_REFERENCE = re.compile(r"^(?:RC-)?[A-C]\d+-\d+/\d{4}$") # A10-0272/2026, RC-B9-0253/2024, C9-0010/2024
|
||||||
EP_OUTCOME = {"ADOPTED": ("accepted", "angenommen", "adopted"), "REJECTED": ("rejected", "abgelehnt", "rejected")}
|
EP_OUTCOME = {"ADOPTED": ("accepted", "angenommen", "adopted"), "REJECTED": ("rejected", "abgelehnt", "rejected")}
|
||||||
EP_VOTERS = (("had_voter_favor", "for", "Stimmte für", "Voted for"),
|
EP_VOTERS = (("had_voter_favor", "for", "Stimmte für", "Voted for"),
|
||||||
("had_voter_against", "against", "Stimmte gegen", "Voted against"),
|
("had_voter_against", "against", "Stimmte gegen", "Voted against"),
|
||||||
@@ -217,18 +231,19 @@ def ep_person_ids(values: list[str] | None) -> set[str]:
|
|||||||
|
|
||||||
@register
|
@register
|
||||||
class ParliamentVotes(Adapter):
|
class ParliamentVotes(Adapter):
|
||||||
"""Final roll-call votes (whole texts, no amendments) of the Austrian MEPs known to the database.
|
"""Roll-call votes of the Austrian MEPs known to the database: on whole texts and on amendments or parts.
|
||||||
|
|
||||||
Amendment votes are left out on purpose: a sitting has over a hundred of them, which would bury
|
Part votes are flagged (`VoteEvent.part_vote`, `data.part_vote`), because a sitting has over a hundred of
|
||||||
the final votes on a member's page. The official result counts; corrections MEPs file afterwards are
|
them and they would otherwise bury the final votes. The official result counts; corrections MEPs file
|
||||||
kept in `data.intended`, because they don't change the result.
|
afterwards are kept in `data.intended`, because they don't change the result.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
spec = EP_SPEC
|
spec = EP_SPEC
|
||||||
name = "europarl.votes"
|
name = "europarl.votes"
|
||||||
description = "Final roll-call votes of Austrian MEPs in the European Parliament plenary"
|
description = "Roll-call votes of Austrian MEPs in the European Parliament plenary, including amendments"
|
||||||
schedule = "45 5 * * *"
|
schedule = "45 5 * * *"
|
||||||
queue = "scrape"
|
queue = "scrape"
|
||||||
|
parser_version = 3 # 2: amendment and part votes; 3: references of joint motions and Council documents
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
ep_ids = []
|
ep_ids = []
|
||||||
@@ -243,6 +258,9 @@ class ParliamentVotes(Adapter):
|
|||||||
meta={"ep_ids": ep_ids})
|
meta={"ep_ids": ep_ids})
|
||||||
|
|
||||||
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
|
if not response.body.strip(): # sittings without recorded votes come back with an empty body
|
||||||
|
ctx.stats["empty_responses"] += 1
|
||||||
|
return
|
||||||
kind = response.request.kind
|
kind = response.request.kind
|
||||||
data = response.json().get("data") or []
|
data = response.json().get("data") or []
|
||||||
meta = response.meta
|
meta = response.meta
|
||||||
@@ -271,9 +289,10 @@ class ParliamentVotes(Adapter):
|
|||||||
austrian = set(meta["ep_ids"])
|
austrian = set(meta["ep_ids"])
|
||||||
chamber = OrgRef(slug="europaeisches-parlament")
|
chamber = OrgRef(slug="europaeisches-parlament")
|
||||||
for decision in data:
|
for decision in data:
|
||||||
if "ROLLCALL" not in str(decision.get("decision_method")) or "decisionAboutId" in decision:
|
if "ROLLCALL" not in str(decision.get("decision_method")):
|
||||||
ctx.stats["not_final_rollcall"] += 1
|
ctx.stats["not_rollcall"] += 1
|
||||||
continue
|
continue
|
||||||
|
part_vote = "decisionAboutId" in decision
|
||||||
voters = {position: ep_person_ids(decision.get(field)) & austrian for field, position, _, _ in EP_VOTERS}
|
voters = {position: ep_person_ids(decision.get(field)) & austrian for field, position, _, _ in EP_VOTERS}
|
||||||
if not any(voters.values()):
|
if not any(voters.values()):
|
||||||
ctx.stats["no_austrian_voters"] += 1
|
ctx.stats["no_austrian_voters"] += 1
|
||||||
@@ -283,6 +302,9 @@ class ParliamentVotes(Adapter):
|
|||||||
items = decision.get("inverse_consists_of") or [None]
|
items = decision.get("inverse_consists_of") or [None]
|
||||||
title = meta["titles"].get(items[0]) or label
|
title = meta["titles"].get(items[0]) or label
|
||||||
stage = ep_label(decision.get("referenceText"))
|
stage = ep_label(decision.get("referenceText"))
|
||||||
|
label_parts = label.split(" – ", 2) # "A10-0272/2026 – rapporteur – § 13, nach Buchstabe a – Änd. 9"
|
||||||
|
if part_vote and len(label_parts) == 3:
|
||||||
|
stage = label_parts[2]
|
||||||
status = str(decision.get("decision_outcome", "")).rsplit("/", 1)[-1]
|
status = str(decision.get("decision_outcome", "")).rsplit("/", 1)[-1]
|
||||||
result, outcome_de, outcome_en = EP_OUTCOME.get(status, ("unknown", "Ergebnis unbekannt", "outcome unknown"))
|
result, outcome_de, outcome_en = EP_OUTCOME.get(status, ("unknown", "Ergebnis unbekannt", "outcome unknown"))
|
||||||
counts = {"yes": decision.get("number_of_votes_favor"), "no": decision.get("number_of_votes_against"),
|
counts = {"yes": decision.get("number_of_votes_favor"), "no": decision.get("number_of_votes_against"),
|
||||||
@@ -295,17 +317,19 @@ class ParliamentVotes(Adapter):
|
|||||||
if pv else None)
|
if pv else None)
|
||||||
event_key = fingerprint("ep-vote", decision["id"])
|
event_key = fingerprint("ep-vote", decision["id"])
|
||||||
yield VoteEvent(key=event_key, chamber=chamber, title=title, voted_on=voted_on, result=result, stage=stage,
|
yield VoteEvent(key=event_key, chamber=chamber, title=title, voted_on=voted_on, result=result, stage=stage,
|
||||||
item_ref=label.split(" – ", 1)[0], roll_call=True, url=url, protocol_url=protocol,
|
item_ref=label_parts[0] if EP_REFERENCE.match(label_parts[0]) else None, roll_call=True,
|
||||||
raw_text=f"{stage}: {tally}")
|
url=url, protocol_url=protocol, raw_text=f"{stage}: {tally}", part_vote=part_vote)
|
||||||
|
subject = f"{title}, {stage}" if part_vote and title != label else title # a label already names the part
|
||||||
intended = {mep: position for field, position in EP_INTENDED for mep in ep_person_ids(decision.get(field))}
|
intended = {mep: position for field, position in EP_INTENDED for mep in ep_person_ids(decision.get(field))}
|
||||||
for _, position, verb_de, verb_en in EP_VOTERS:
|
for _, position, verb_de, verb_en in EP_VOTERS:
|
||||||
for mep in sorted(voters[position]):
|
for mep in sorted(voters[position]):
|
||||||
yield Claim(
|
yield Claim(
|
||||||
claim_type="vote", person=PersonRef(ids={"ep": mep}), counterpart_org=chamber, occurred_at=voted_on,
|
claim_type="vote", person=PersonRef(ids={"ep": mep}), counterpart_org=chamber, occurred_at=voted_on,
|
||||||
summary_de=f"{verb_de}: {title} (Europäisches Parlament) – {outcome_de}",
|
summary_de=f"{verb_de}: {subject} (Europäisches Parlament) – {outcome_de}",
|
||||||
summary_en=f"{verb_en}: {title} (European Parliament) – {outcome_en}",
|
summary_en=f"{verb_en}: {subject} (European Parliament) – {outcome_en}",
|
||||||
data={"position": position, "result": result, "roll_call": True, "chamber": "EP", **counts,
|
data={"position": position, "result": result, "roll_call": True, "chamber": "EP", **counts,
|
||||||
**({"intended": intended[mep]} if mep in intended else {})},
|
**({"intended": intended[mep]} if mep in intended else {}),
|
||||||
|
**({"part_vote": True} if part_vote else {})},
|
||||||
evidence=[Evidence(url=url, doc_type="api_record", title=title, published_at=voted_on,
|
evidence=[Evidence(url=url, doc_type="api_record", title=title, published_at=voted_on,
|
||||||
quote=f"{stage}: {tally}", locator=f"vote:{decision['id']}")],
|
quote=f"{stage}: {tally}", locator=f"vote:{decision['id']}")],
|
||||||
topics=("Europäische Union",),
|
topics=("Europäische Union",),
|
||||||
|
|||||||
@@ -0,0 +1,354 @@
|
|||||||
|
"""Current members of the state parliaments (Landtage), from each Landtag's official member list.
|
||||||
|
|
||||||
|
Wikidata knows most state MPs but often without an end date, so former members looked current. These adapters
|
||||||
|
read the official lists; `enrich.landtage` closes the official role of anyone who has left a list and records
|
||||||
|
which states are covered, and the person_status view then trusts the official lists for those states (migration
|
||||||
|
0007). One adapter per state, because every Landtag publishes its list differently:
|
||||||
|
|
||||||
|
noe noe-landtag.gv.at/personen (3 pages) + one profile per member (birth date, start of mandate)
|
||||||
|
ooe land-oberoesterreich.gv.at/12748.htm (party, district, "Mitglied des Landtags seit ...")
|
||||||
|
stmk landtag.steiermark.at member table
|
||||||
|
tirol portrait gallery ("Name (Party)")
|
||||||
|
vbg vorarlberg.at/web/landtag/abgeordnete-alle
|
||||||
|
sbg salzburg.gv.at, one page per Landtag club
|
||||||
|
bgld bgld-landtag.at/organe/abgeordnete (club sections; the postal addresses printed there are not kept)
|
||||||
|
|
||||||
|
Kärnten and Wien are missing on purpose, so their members stay Wikidata-only: ktn.gv.at disallows all crawlers in
|
||||||
|
robots.txt, and wien.gv.at disallows /advuew/ (the politician search) for every crawler except its own search
|
||||||
|
appliance. Every request sets skip_unchanged=False: enrich.landtage judges coverage by which role claims a run
|
||||||
|
touched, so an unchanged page must still be parsed and loaded.
|
||||||
|
Only names, party, district/region and mandate dates are kept (public role); no contact details or addresses.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import re
|
||||||
|
from collections.abc import Iterator
|
||||||
|
from datetime import date
|
||||||
|
from typing import Any
|
||||||
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
from politrack.core import Adapter, Enricher, Request, Response, RunContext, SourceSpec, register, register_spec
|
||||||
|
from politrack.core.records import Claim, Evidence, OrgRef, PersonRecord, PersonRef, Role
|
||||||
|
from politrack.core.spec import DERIVED
|
||||||
|
from politrack.sources.bundesregierung import german_date
|
||||||
|
from politrack.text import make_slug, strip_titles
|
||||||
|
|
||||||
|
LANDTAGE = {
|
||||||
|
# key: (region, name of the parliament, seats, member list URL)
|
||||||
|
"noe": ("Niederösterreich", "Landtag Niederösterreich", 56, "https://noe-landtag.gv.at/personen"),
|
||||||
|
"ooe": ("Oberösterreich", "Oberösterreichischer Landtag", 56, "https://www.land-oberoesterreich.gv.at/12748.htm"),
|
||||||
|
"stmk": ("Steiermark", "Landtag Steiermark", 48, "https://www.landtag.steiermark.at/cms/ziel/31866695/DE/"),
|
||||||
|
"tirol": ("Tirol", "Tiroler Landtag", 36,
|
||||||
|
"https://www.tirol.gv.at/landtag/unser-parlament/die-abgeordneten/bildergalerie/"),
|
||||||
|
"vbg": ("Vorarlberg", "Vorarlberger Landtag", 36, "https://vorarlberg.at/web/landtag/abgeordnete-alle"),
|
||||||
|
"sbg": ("Salzburg", "Salzburger Landtag", 36, "https://www.salzburg.gv.at/pol/landtag/lt-klubs"),
|
||||||
|
"bgld": ("Burgenland", "Burgenländischer Landtag", 36, "https://www.bgld-landtag.at/organe/abgeordnete/"),
|
||||||
|
}
|
||||||
|
SBG_CLUBS = {"lt-oevp": "ÖVP", "lt-fpoe": "FPÖ", "lt-spoe": "SPÖ", "lt-kpoeplus": "KPÖ", "lt-diegruenen": "GRÜNE"}
|
||||||
|
PARTY_ALIASES = {"KEIN KLUB": None, "VP TIROL": "ÖVP", "VP": "ÖVP", "VOLKSPARTEI": "ÖVP", "GRÜNE": "GRÜNE", "DIE GRÜNEN": "GRÜNE",
|
||||||
|
"KPÖ PLUS": "KPÖ", "KPÖ": "KPÖ", "FRITZ": "FRITZ", "LISTE FRITZ": "FRITZ"}
|
||||||
|
# Functions written in front of names: Klubobmann, Landtagspräsidentin, KO-Stellvertreter, ...
|
||||||
|
ROLE_PREFIX = re.compile(
|
||||||
|
r"^(?:(?:Landtagspräsident(?:in)?|Präsident(?:in)?|(?:Zweite|Dritte)[rn]? Präsident(?:in)?|Klubobmann|Klubobfrau|"
|
||||||
|
r"Klubobleute|KO-Stellvertreter(?:in)?|KO|VP(?:in)?|LTPräs(?:in)?|LTP(?:in)?|LAbg\.|Abg\.|Bgm\.?(?:in)?|KommR|HR|Prof\.)\s+)+")
|
||||||
|
TITLE_TOKENS = {"Mag", "Maga", "MMag", "Dr", "DI", "DIin", "Dipl", "Ing", "Prof", "HR", "BA", "MA", "BSc", "MSc", "MBA",
|
||||||
|
"BEd", "B.Ed", "B.A", "M.A", "LL.M", "LLM", "MPA", "PhD", "KommR", "Bgm", "Päd", "Univ", "Mag.a",
|
||||||
|
"Dr.in", "Mag.(FH)", "(FH)", "MAS", "MSc.", "M.A.I.S", "Dipl.-Ing", "Dipl.Soz.-Wiss.in", "Ing.in"}
|
||||||
|
SUFFIX_TOKENS = {"a", "in"} # "Mag. a", "Dr. in"
|
||||||
|
# Image alt texts ("Portraitfoto von Karin Berger") and invisible characters some lists contain (zero-width space)
|
||||||
|
CAPTION_PREFIX = re.compile(r"^(?:Portrait|Porträt|Foto|Bild)(?:foto)?(?: von| of)?\s+", re.IGNORECASE)
|
||||||
|
INVISIBLE = re.compile("[\u00ad\u200b-\u200f\u2060\ufeff]")
|
||||||
|
|
||||||
|
|
||||||
|
def _is_title(token: str) -> bool:
|
||||||
|
t = token.strip(",.")
|
||||||
|
if t in TITLE_TOKENS or re.fullmatch(r"(?:Dipl|Univ|Mag|Dr)\.[\w.\-]*", token.strip(",")):
|
||||||
|
return True
|
||||||
|
# any other abbreviation of two or more letters ("MMst.", "Bakk."); a name never ends with a dot, an
|
||||||
|
# initial ("J.") is kept
|
||||||
|
return re.fullmatch(r"[^\W\d_]{2,}\.", token.strip(",")) is not None
|
||||||
|
|
||||||
|
|
||||||
|
def clean_name(name: str) -> str:
|
||||||
|
"""'KO Mag. Markus Abwerzger' -> 'Markus Abwerzger'; drops functions, academic titles and stray punctuation.
|
||||||
|
Titles are matched as whole tokens, so a first name like "Ingrid" is never taken for "Ing."."""
|
||||||
|
name = re.sub(r"\([^()]*\)", " ", INVISIBLE.sub("", name)) # "(WU)" after "MSc", "(FH)"
|
||||||
|
name = ROLE_PREFIX.sub("", CAPTION_PREFIX.sub("", re.sub(r"\s+", " ", name).strip()))
|
||||||
|
name = strip_titles(name)
|
||||||
|
kept = []
|
||||||
|
for token in name.replace(",", " , ").split():
|
||||||
|
# "a"/"in" are the feminine endings of split titles ("Mag. a", "Dr. in"); never part of a name
|
||||||
|
if token == "," or _is_title(token) or token in SUFFIX_TOKENS:
|
||||||
|
continue
|
||||||
|
kept.append(token)
|
||||||
|
return re.sub(r"\s+", " ", " ".join(kept)).strip(" ,.")
|
||||||
|
|
||||||
|
|
||||||
|
def surname_first(text: str) -> str:
|
||||||
|
"""'Höglinger Tobias, Mag.' / 'AMON Werner, MBA' -> 'Tobias Höglinger' / 'Werner Amon'."""
|
||||||
|
head = text.split(",", 1)[0].strip()
|
||||||
|
parts = head.split()
|
||||||
|
if not parts:
|
||||||
|
return ""
|
||||||
|
upper = [p for p in parts if p.isupper() and len(p) > 1]
|
||||||
|
if upper and len(upper) < len(parts): # Steiermark: surname in capitals, possibly several words
|
||||||
|
surname = " ".join(p.title() if p.isupper() else p for p in upper)
|
||||||
|
given = " ".join(p for p in parts if p not in upper)
|
||||||
|
else:
|
||||||
|
surname, given = parts[0], " ".join(parts[1:])
|
||||||
|
return clean_name(f"{given} {surname}")
|
||||||
|
|
||||||
|
|
||||||
|
def party_short(text: str | None) -> str | None:
|
||||||
|
if not text:
|
||||||
|
return None
|
||||||
|
t = re.sub(r"[()\s]+", " ", text).strip()
|
||||||
|
if t.upper() in PARTY_ALIASES:
|
||||||
|
return PARTY_ALIASES[t.upper()]
|
||||||
|
return t.upper() if len(t) <= 6 else t
|
||||||
|
|
||||||
|
|
||||||
|
def member(name: str, member_id: str | None = None, party: str | None = None, region: str | None = None,
|
||||||
|
since: date | None = None, birth_date: date | None = None, url: str | None = None) -> dict[str, Any]:
|
||||||
|
return {"name": name, "id": member_id or make_slug(name), "party": party_short(party), "district": region,
|
||||||
|
"since": since, "birth_date": birth_date, "url": url}
|
||||||
|
|
||||||
|
|
||||||
|
# -- parsers (pure) -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def parse_noe_list(html: str, base: str) -> tuple[list[str], list[str]]:
|
||||||
|
"""Profile URLs and further list pages of the NÖ member list."""
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
profiles = sorted({urljoin(base, a["href"]) for a in soup.find_all("a", href=re.compile(r"^/personen/[a-z0-9_\-]+$"))})
|
||||||
|
pages = sorted({urljoin(base, a["href"]) for a in soup.find_all("a", href=re.compile(r"/personen\?seite=\d+$"))})
|
||||||
|
return profiles, pages
|
||||||
|
|
||||||
|
|
||||||
|
def parse_noe_profile(html: str, url: str) -> dict[str, Any] | None:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
h1 = soup.find("h1")
|
||||||
|
text = re.sub(r"\s+", " ", soup.get_text(" "))
|
||||||
|
mandate = re.search(r"Abgeordnete[r]? zum NÖ Landtag \(\s*([^)]+?)\s*\) seit (\d{2}\.\d{2}\.\d{4})", text)
|
||||||
|
if not h1 or not mandate:
|
||||||
|
return None
|
||||||
|
born = re.search(r"Geb\.:\s*(\d{2})\.(\d{2})\.(\d{4})", text)
|
||||||
|
district = re.search(r"Wahlkreis:\s*([^:]+?)\s+(?:Klub/Fraktion|Wahlpartei|Sitz)", text)
|
||||||
|
d, m, y = (int(x) for x in mandate.group(2).split("."))
|
||||||
|
return member(clean_name(h1.get_text(" ", strip=True)), url.rstrip("/").rsplit("/", 1)[-1], mandate.group(1),
|
||||||
|
district.group(1).strip() if district else None, date(y, m, d),
|
||||||
|
date(int(born.group(3)), int(born.group(2)), int(born.group(1))) if born else None, url)
|
||||||
|
|
||||||
|
|
||||||
|
def parse_ooe(html: str, base: str) -> list[dict[str, Any]]:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
out = []
|
||||||
|
for li in soup.find_all("li", attrs={"data-title": True, "data-partei": True}):
|
||||||
|
text = re.sub(r"\s+", " ", li.get_text(" "))
|
||||||
|
since = re.search(r"Mitglied des Landtags seit (\d{1,2}\. \w+ \d{4})", text)
|
||||||
|
district = re.search(r"Wahlkreis \d+ - ([^M]+?)\s+Mitglied", text)
|
||||||
|
link = li.find("a", href=True)
|
||||||
|
out.append(member(surname_first(li["data-title"]), None, li["data-partei"],
|
||||||
|
district.group(1).strip() if district else None,
|
||||||
|
german_date(since.group(1)) if since else None, None,
|
||||||
|
urljoin(base, link["href"]) if link else None))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def parse_stmk(html: str, base: str) -> list[dict[str, Any]]:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
out = []
|
||||||
|
for row in soup.find_all("tr"):
|
||||||
|
cells = row.find_all("td")
|
||||||
|
link = row.find("a", href=re.compile(r"\.pdf$", re.IGNORECASE))
|
||||||
|
if len(cells) < 2 or not link:
|
||||||
|
continue
|
||||||
|
label = link.get_text(" ", strip=True)
|
||||||
|
out.append(member(surname_first(label), make_slug(label.split(",")[0]), cells[-1].get_text(" ", strip=True),
|
||||||
|
url=base))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def parse_tirol(html: str, base: str) -> list[dict[str, Any]]:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
seen, out = set(), []
|
||||||
|
for img in soup.find_all("img", alt=re.compile(r"\(.+\)\s*$")):
|
||||||
|
m = re.match(r"(.+?)\s*\(\s*([^()]+?)\s*\)\s*$", img["alt"])
|
||||||
|
name = clean_name(m.group(1)) if m else ""
|
||||||
|
if name and name not in seen and "Mandat" not in name:
|
||||||
|
seen.add(name)
|
||||||
|
out.append(member(name, party=m.group(2), url=base))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def parse_vbg(html: str, base: str) -> list[dict[str, Any]]:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
out = []
|
||||||
|
for box in soup.find_all("div", class_="avlr-standard-ap-mit-bild"):
|
||||||
|
link = box.find("a", href=re.compile(r"/web/landtag/-/"))
|
||||||
|
h3 = box.find("h3")
|
||||||
|
# the party is the last parenthesis ("Mag. (FH)" or "(WU)" in degrees come earlier)
|
||||||
|
parties = re.findall(r"\(([^()]{2,15})\)", box.get_text(" "))
|
||||||
|
if link and h3 and parties:
|
||||||
|
out.append(member(clean_name(h3.get_text(" ", strip=True)), link["href"].rstrip("/").rsplit("/", 1)[-1],
|
||||||
|
parties[-1], url=urljoin(base, link["href"])))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def parse_sbg_club(html: str, base: str, party: str) -> list[dict[str, Any]]:
|
||||||
|
soup = BeautifulSoup(html, "html.parser")
|
||||||
|
out = []
|
||||||
|
for a in soup.find_all("a", href=re.compile(r"/politiker-detail-view/")):
|
||||||
|
img = a.find("img", alt=True)
|
||||||
|
if img:
|
||||||
|
out.append(member(clean_name(img["alt"]), a["href"].rstrip("/").rsplit("/", 1)[-1], party,
|
||||||
|
url=urljoin(base, a["href"])))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
BGLD_MEMBER = re.compile(
|
||||||
|
r"(?:@[\w.\-]+\.at|Bgld\. Landtag)\s+(.{3,90}?)\s+(?:\d\.\s)?(?:Landtagsabgeordnete[r]?|Landtagspräsident(?:in)?|"
|
||||||
|
r"Klubobmann|Klubobfrau|Klubvorsitzende[r]?)\s+(SPÖ|ÖVP|FPÖ|GRÜNE|Grüne|NEOS)\s+\d{4}\s")
|
||||||
|
|
||||||
|
|
||||||
|
def parse_bgld(html: str, base: str) -> list[dict[str, Any]]:
|
||||||
|
"""Club sections list "<name> <function> <party> <postcode> <place> <e-mail>"; only name and party are kept."""
|
||||||
|
text = re.sub(r"[\s]+", " ", BeautifulSoup(html, "html.parser").get_text(" "))
|
||||||
|
out, seen = [], set()
|
||||||
|
for m in BGLD_MEMBER.finditer(text):
|
||||||
|
name = clean_name(m.group(1))
|
||||||
|
if name and name not in seen:
|
||||||
|
seen.add(name)
|
||||||
|
out.append(member(name, party=m.group(2), url=base))
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
# -- adapters -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def landtag_spec(key: str) -> SourceSpec:
|
||||||
|
region, name, _, url = LANDTAGE[key]
|
||||||
|
return register_spec(SourceSpec(
|
||||||
|
slug=f"landtag-{key}", name=name, kind="official", homepage=url, license="Amtliche Information",
|
||||||
|
access="scrape", trust=90, min_interval=2.0, store_fulltext=False,
|
||||||
|
tos_notes=f"Official member list of the {name} (public role data: name, party, district, mandate dates). "
|
||||||
|
"robots.txt allows the pages used; no contact details or addresses are stored."))
|
||||||
|
|
||||||
|
|
||||||
|
class LandtagMembers(Adapter):
|
||||||
|
key: str = ""
|
||||||
|
schedule = "35 5 * * *"
|
||||||
|
queue = "scrape"
|
||||||
|
creates_persons = True
|
||||||
|
|
||||||
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
|
yield Request(url=LANDTAGE[self.key][3], kind="list", skip_unchanged=False)
|
||||||
|
|
||||||
|
def members(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
|
for item in self.members(ctx, response):
|
||||||
|
if isinstance(item, Request):
|
||||||
|
yield item
|
||||||
|
elif item and item.get("name"):
|
||||||
|
yield from self.records(item)
|
||||||
|
else:
|
||||||
|
ctx.stats["entries_skipped"] += 1
|
||||||
|
|
||||||
|
def records(self, m: dict[str, Any]) -> Iterator[Any]:
|
||||||
|
region, body_name, _, list_url = LANDTAGE[self.key]
|
||||||
|
scheme = f"landtag-{self.key}"
|
||||||
|
ref = PersonRef(ids={scheme: m["id"]}, name=m["name"])
|
||||||
|
yield PersonRecord(ref=ref, full_name=m["name"], birth_date=m["birth_date"], match_by_name=True,
|
||||||
|
match_landtag=self.key)
|
||||||
|
body = OrgRef(slug=f"landtag-{self.key}", name=body_name, kind="parliament")
|
||||||
|
party = OrgRef(short_name=m["party"], kind="party", create=False) if m["party"] else None
|
||||||
|
label = f" ({m['party']})" if m["party"] else ""
|
||||||
|
yield Claim(
|
||||||
|
claim_type="role", person=PersonRef(ids={scheme: m["id"]}), org=body, valid_from=m["since"],
|
||||||
|
summary_de=f"{m['name']}: Abgeordnete/r zum {body_name}{label}",
|
||||||
|
summary_en=f"{m['name']}: member of the {body_name}{label}",
|
||||||
|
data={"landtag": self.key, "party": m["party"], "district": m["district"]},
|
||||||
|
evidence=[Evidence(url=m["url"] or list_url, doc_type="register_entry", title=f"{body_name}: Abgeordnete",
|
||||||
|
locator=f"member:{m['id']}")],
|
||||||
|
facet=Role(role="mp", level="state", body=body, party=party, region=region, start=m["since"]),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _register(key: str, members_fn) -> None:
|
||||||
|
cls = type(f"Landtag_{key}", (LandtagMembers,), {
|
||||||
|
"key": key, "spec": landtag_spec(key), "name": f"landtag.{key}",
|
||||||
|
"description": f"Current members of the {LANDTAGE[key][1]} (official list)", "members": members_fn,
|
||||||
|
})
|
||||||
|
register(cls)
|
||||||
|
|
||||||
|
|
||||||
|
def _noe(self, ctx, response):
|
||||||
|
if response.request.kind == "list":
|
||||||
|
profiles, pages = parse_noe_list(response.text, response.url)
|
||||||
|
if not response.meta.get("page"):
|
||||||
|
for page in pages:
|
||||||
|
yield Request(url=page, kind="list", meta={"page": True}, skip_unchanged=False)
|
||||||
|
for url in profiles:
|
||||||
|
yield Request(url=url, kind="profile", skip_unchanged=False)
|
||||||
|
else:
|
||||||
|
yield parse_noe_profile(response.text, response.request.url)
|
||||||
|
|
||||||
|
|
||||||
|
def _sbg(self, ctx, response):
|
||||||
|
if response.request.kind == "list":
|
||||||
|
for club in SBG_CLUBS:
|
||||||
|
yield Request(url=f"https://www.salzburg.gv.at/pol/landtag/lt-klubs/{club}", kind="club",
|
||||||
|
meta={"party": SBG_CLUBS[club]}, skip_unchanged=False)
|
||||||
|
else:
|
||||||
|
yield from parse_sbg_club(response.text, response.url, response.meta["party"])
|
||||||
|
|
||||||
|
|
||||||
|
_register("noe", _noe)
|
||||||
|
_register("ooe", lambda self, ctx, r: iter(parse_ooe(r.text, r.url)))
|
||||||
|
_register("stmk", lambda self, ctx, r: iter(parse_stmk(r.text, r.url)))
|
||||||
|
_register("tirol", lambda self, ctx, r: iter(parse_tirol(r.text, r.url)))
|
||||||
|
_register("vbg", lambda self, ctx, r: iter(parse_vbg(r.text, r.url)))
|
||||||
|
_register("sbg", _sbg)
|
||||||
|
_register("bgld", lambda self, ctx, r: iter(parse_bgld(r.text, r.url)))
|
||||||
|
|
||||||
|
|
||||||
|
@register
|
||||||
|
class LandtagStatus(Enricher):
|
||||||
|
"""Closes official Landtag roles of members who are no longer on their list and records which states have a
|
||||||
|
current official list (state key `covered`), which the person_status view uses instead of Wikidata."""
|
||||||
|
|
||||||
|
spec = DERIVED
|
||||||
|
name = "enrich.landtage"
|
||||||
|
description = "Close roles of members who left a Landtag list; mark states covered by an official list"
|
||||||
|
schedule = "15 6 * * *"
|
||||||
|
MIN_SHARE = 0.6 # a run that confirmed fewer members than this share of the seats is treated as broken
|
||||||
|
|
||||||
|
def run(self, ctx: RunContext) -> None:
|
||||||
|
conn = ctx.conn
|
||||||
|
covered = []
|
||||||
|
for key, (_, _, seats, _) in LANDTAGE.items():
|
||||||
|
last = conn.execute(
|
||||||
|
"SELECT started_at FROM run WHERE adapter = %s AND status IN ('ok', 'partial') "
|
||||||
|
"ORDER BY id DESC LIMIT 1", (f"landtag.{key}",)).fetchone()
|
||||||
|
if not last:
|
||||||
|
continue
|
||||||
|
confirmed = conn.execute(
|
||||||
|
"SELECT count(*) AS n FROM claim WHERE created_by = %s AND claim_type = 'role' AND updated_at >= %s",
|
||||||
|
(f"landtag.{key}", last["started_at"])).fetchone()["n"]
|
||||||
|
if confirmed < seats * self.MIN_SHARE:
|
||||||
|
ctx.stats[f"{key}_incomplete"] = confirmed
|
||||||
|
continue
|
||||||
|
covered.append(key)
|
||||||
|
closed = conn.execute(
|
||||||
|
"""WITH gone AS (
|
||||||
|
SELECT r.claim_id FROM role r JOIN claim c ON c.id = r.claim_id
|
||||||
|
WHERE c.created_by = %(adapter)s AND r.end_date IS NULL AND c.updated_at < %(since)s)
|
||||||
|
UPDATE role SET end_date = %(today)s WHERE claim_id IN (SELECT claim_id FROM gone)""",
|
||||||
|
{"adapter": f"landtag.{key}", "since": last["started_at"], "today": date.today()}).rowcount
|
||||||
|
ctx.stats[f"{key}_closed"] = closed
|
||||||
|
ctx.state.set("covered", covered)
|
||||||
|
ctx.stats["covered"] = len(covered)
|
||||||
|
return None
|
||||||
@@ -48,7 +48,11 @@ class ParlamentPress(Adapter):
|
|||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
last = ctx.state.get("last_date")
|
last = ctx.state.get("last_date")
|
||||||
backfill = int(ctx.params.get("backfill_days", 365))
|
backfill = int(ctx.params.get("backfill_days", 365))
|
||||||
since = (date.fromisoformat(last) - timedelta(days=2)) if last else date.today() - timedelta(days=backfill)
|
# an explicit backfill_days (history backfill) wins over the cursor of the regular runs
|
||||||
|
if last and "backfill_days" not in ctx.params:
|
||||||
|
since = date.fromisoformat(last) - timedelta(days=2)
|
||||||
|
else:
|
||||||
|
since = date.today() - timedelta(days=backfill)
|
||||||
yield list_request(110, {"DATERANGE": [since.isoformat(), date.today().isoformat()]}, kind="list",
|
yield list_request(110, {"DATERANGE": [since.isoformat(), date.today().isoformat()]}, kind="list",
|
||||||
meta={"since": since.isoformat()})
|
meta={"since": since.isoformat()})
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ LEGAL_FORM_END = re.compile(r"(?i:gesmbh|gmbh|ges\.\s?m\.\s?b\.\s?h\.?|m\.\s?b\.
|
|||||||
r"e\.\s?u\.|\bse|privatstiftung|genossenschaft|sparkasse)(?=[A-ZÄÖÜ\s,]|$)")
|
r"e\.\s?u\.|\bse|privatstiftung|genossenschaft|sparkasse)(?=[A-ZÄÖÜ\s,]|$)")
|
||||||
|
|
||||||
|
|
||||||
|
COMMITTEE_END = re.compile(r"\(\d{2}\.\d{2}\.\d{4}\s*-\s*(\d{2}\.\d{2}\.\d{4})\s*\)\s*$")
|
||||||
STREET_WORD = r"\S*(?:straße|strasse|str\.|gasse|platz|weg|kai|ring|allee|zeile|lände|markt|steig)"
|
STREET_WORD = r"\S*(?:straße|strasse|str\.|gasse|platz|weg|kai|ring|allee|zeile|lände|markt|steig)"
|
||||||
|
|
||||||
|
|
||||||
@@ -79,7 +80,7 @@ class ParlamentPersons(Adapter):
|
|||||||
description = "Members of Nationalrat and Bundesrat since 1918, mandates, functions, side jobs, speeches"
|
description = "Members of Nationalrat and Bundesrat since 1918, mandates, functions, side jobs, speeches"
|
||||||
schedule = "15 3 * * *"
|
schedule = "15 3 * * *"
|
||||||
creates_persons = True
|
creates_persons = True
|
||||||
parser_version = 3
|
parser_version = 4
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
yield list_request(409, {"NRBR": ["NR", "BR"]}, kind="persons")
|
yield list_request(409, {"NRBR": ["NR", "BR"]}, kind="persons")
|
||||||
@@ -92,6 +93,8 @@ class ParlamentPersons(Adapter):
|
|||||||
yield from self.parse_person(ctx, response)
|
yield from self.parse_person(ctx, response)
|
||||||
elif kind == "speeches":
|
elif kind == "speeches":
|
||||||
yield from self.parse_speeches(ctx, response)
|
yield from self.parse_speeches(ctx, response)
|
||||||
|
elif kind == "committees":
|
||||||
|
yield from self.parse_committees(ctx, response)
|
||||||
|
|
||||||
# -- persons & mandates -------------------------------------------------------------
|
# -- persons & mandates -------------------------------------------------------------
|
||||||
|
|
||||||
@@ -180,6 +183,35 @@ class ParlamentPersons(Adapter):
|
|||||||
|
|
||||||
yield from self.side_jobs(ref, pad, name, content.get("unvtrans") or {})
|
yield from self.side_jobs(ref, pad, name, content.get("unvtrans") or {})
|
||||||
yield list_request(251, {"PAD_INTERN": [int(pad)]}, kind="speeches", meta={"pad": pad, "name": name})
|
yield list_request(251, {"PAD_INTERN": [int(pad)]}, kind="speeches", meta={"pad": pad, "name": name})
|
||||||
|
yield list_request(250, {"PAD_INTERN": [int(pad)]}, kind="committees", meta={"pad": pad, "name": name})
|
||||||
|
|
||||||
|
def parse_committees(self, ctx: RunContext, response: Response) -> Iterator[Claim]:
|
||||||
|
"""Committee memberships (list 250). Affiliations, not roles: a member has dozens of them per period,
|
||||||
|
and they say nothing about whether the person currently holds a mandate."""
|
||||||
|
periods = set(ctx.params.get("periods") or get_settings().parlament_periods)
|
||||||
|
pad, name = response.meta["pad"], response.meta["name"]
|
||||||
|
for row in list_rows(response.json()):
|
||||||
|
if row.get("GP") not in periods:
|
||||||
|
continue
|
||||||
|
labelled = row.get("Ausschuss") or ""
|
||||||
|
committee = re.sub(r"\s*\([^()]*\)\s*$", "", labelled).strip()
|
||||||
|
if not committee:
|
||||||
|
ctx.stats["committee_without_name"] += 1
|
||||||
|
continue
|
||||||
|
function = row.get("Funktion") or "Mitglied"
|
||||||
|
start = parse_date(row.get("Beginn"))
|
||||||
|
end = COMMITTEE_END.search(labelled)
|
||||||
|
chamber = "Bundesrat" if row.get("nrbr") == "BR" else "Nationalrat"
|
||||||
|
yield Claim(
|
||||||
|
claim_type="affiliation", person=PersonRef(ids={"parlament": pad}),
|
||||||
|
key=("parl-committee", pad, row.get("GP"), committee, function, start),
|
||||||
|
valid_from=start, valid_to=parse_date(end.group(1)) if end else None,
|
||||||
|
summary_de=f"{name}: {function}, {committee} ({chamber}, {row.get('GP')}. GP)",
|
||||||
|
summary_en=f"{name}: {function}, {committee} ({chamber}, {row.get('GP')} legislative period)",
|
||||||
|
data={"committee": committee, "function": function, "gp": row.get("GP"), "chamber": row.get("nrbr")},
|
||||||
|
evidence=[Evidence(url=f"{BASE}/person/{pad}", doc_type="api_record", title=f"Parlament: {name}",
|
||||||
|
locator=f"ausschuss:{row.get('GP')}:{committee}:{function}:{start}")],
|
||||||
|
)
|
||||||
|
|
||||||
def side_jobs(self, ref: PersonRef, pad: str, name: str, unv: dict) -> Iterator[Claim]:
|
def side_jobs(self, ref: PersonRef, pad: str, name: str, unv: dict) -> Iterator[Claim]:
|
||||||
"""Disclosures under §6 Unv-Transparenz-G: leading positions, paid side jobs, honorary positions."""
|
"""Disclosures under §6 Unv-Transparenz-G: leading positions, paid side jobs, honorary positions."""
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
"""Full texts of plenary speeches from the stenographic protocols (CC BY 4.0).
|
||||||
|
|
||||||
|
parlament.persons stores each speech as a `statement` whose evidence links to the protocol, usually with an
|
||||||
|
anchor: newer periods publish one small HTML file per speech (`A_-_13_06_18_01035235.html#48`), older ones one
|
||||||
|
large file per session in which each speech starts at a named anchor in front of the speaker's name
|
||||||
|
(`fnameorig_024808.html#T_067A1930_39_20034545`). This adapter fetches those files and stores the text of each
|
||||||
|
speech as the full text of its evidence document (so it becomes searchable), with the interjections and
|
||||||
|
reactions ("Beifall bei ...", "Ruf: ...", "Zwischenruf ...") listed separately in the document's meta.
|
||||||
|
Speeches linked without an anchor can't be told apart from the rest of the session and are skipped.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import re
|
||||||
|
from collections import defaultdict
|
||||||
|
from collections.abc import Iterator
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
from politrack.core import Adapter, Request, Response, RunContext, register
|
||||||
|
from politrack.core.records import Document, Evidence
|
||||||
|
from politrack.sources.parlament.common import SPEC
|
||||||
|
from politrack.text import excerpt
|
||||||
|
|
||||||
|
PARAGRAPH = re.compile(r"<p\b[^>]*>.*?</p>", re.IGNORECASE | re.DOTALL)
|
||||||
|
HEADING_ANCHOR = re.compile(r'<a\s+name="T_[^"]+"', re.IGNORECASE)
|
||||||
|
INTERJECTION = re.compile(r"\(([^()]{3,800}?)\)")
|
||||||
|
INTERJECTION_WORDS = re.compile(r"\b(Beifall|Ruf|Rufe|Zwischenruf|Heiterkeit|Abg\.|Abgeordnete[rn]?|Präsident|"
|
||||||
|
r"Unruhe|Widerspruch|Lachen|Bravo|Pfui|Zustimmung)\b")
|
||||||
|
TIMESTAMP = re.compile(r"^\d{1,2}\.\d{2}$")
|
||||||
|
EDITORIAL_NOTE = "Die angezeigte Rede ist noch nicht" # "... nach § 52 Abs. 2 GOG-NR autorisiert"
|
||||||
|
|
||||||
|
|
||||||
|
def html_text(fragment: str) -> str:
|
||||||
|
"""Readable text of an HTML fragment: paragraphs as lines, time stamps and margin numbers dropped."""
|
||||||
|
soup = BeautifulSoup(fragment, "html.parser")
|
||||||
|
for el in soup.select("p.randnummer, p._RB, p.RB, style, script, title"):
|
||||||
|
el.decompose()
|
||||||
|
lines = []
|
||||||
|
for p in soup.find_all("p") or [soup]:
|
||||||
|
text = re.sub(r"\s+", " ", p.get_text(" ")).replace("", "").strip()
|
||||||
|
if text and not TIMESTAMP.match(text) and not text.startswith(EDITORIAL_NOTE):
|
||||||
|
lines.append(text)
|
||||||
|
text = "\n".join(lines)
|
||||||
|
return re.sub(r" ([,.;:!?)])", r"\1", re.sub(r"\( ", "(", text))
|
||||||
|
|
||||||
|
|
||||||
|
def interjections(text: str) -> list[str]:
|
||||||
|
"""Reactions recorded in parentheses: applause, calls, interjections."""
|
||||||
|
return [m.group(1).strip(" –-") for m in INTERJECTION.finditer(text) if INTERJECTION_WORDS.search(m.group(1))]
|
||||||
|
|
||||||
|
|
||||||
|
def speech_segments(html: str, anchors: list[str]) -> dict[str, str]:
|
||||||
|
"""Text per anchor. A file that is one speech (newer periods) belongs to its anchor as a whole; in a session
|
||||||
|
protocol a speech runs from its anchor to the next speaker's start (or the next wanted anchor)."""
|
||||||
|
if len(html) < 60_000 and len(anchors) == 1:
|
||||||
|
body = html.split("<body", 1)[-1]
|
||||||
|
return {anchors[0]: html_text(body)}
|
||||||
|
# Session protocols: every speech begins with a heading paragraph - the speaker's name in bold, with "T_"
|
||||||
|
# anchors before or after it ("<a name=T_...></a><b>Abgeordneter ...</b>" or "<b>Präsident<a ...>:</b>").
|
||||||
|
paragraphs = [(m.start(), m.end(), m.group(0)) for m in PARAGRAPH.finditer(html)]
|
||||||
|
headings = [start for start, _, p in paragraphs if HEADING_ANCHOR.search(p) and "<b" in p[:600].lower()]
|
||||||
|
out = {}
|
||||||
|
for anchor in anchors:
|
||||||
|
m = re.search(r'(?:name|id)="' + re.escape(anchor) + '"', html)
|
||||||
|
if not m:
|
||||||
|
continue
|
||||||
|
start = max((s for s in headings if s <= m.start()), default=html.rfind("<p", 0, m.start()))
|
||||||
|
end = min((s for s in headings if s > m.start()), default=len(html))
|
||||||
|
out[anchor] = html_text(html[start:end])
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
@register
|
||||||
|
class SpeechTexts(Adapter):
|
||||||
|
spec = SPEC
|
||||||
|
name = "parlament.speeches"
|
||||||
|
description = "Full texts and interjections of plenary speeches (stenographic protocols)"
|
||||||
|
schedule = "20 4 * * *"
|
||||||
|
queue = "bulk"
|
||||||
|
|
||||||
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
|
if ctx.conn is None:
|
||||||
|
return
|
||||||
|
limit = int(ctx.params.get("max_protocols", 3000))
|
||||||
|
rows = ctx.conn.execute(
|
||||||
|
"""SELECT st.url FROM statement st JOIN document d ON d.url = st.url
|
||||||
|
WHERE st.context = 'parliament_speech' AND st.url LIKE '%%#%%' AND d.full_text IS NULL
|
||||||
|
ORDER BY st.said_at DESC NULLS LAST"""
|
||||||
|
).fetchall()
|
||||||
|
by_file: dict[str, list[str]] = defaultdict(list)
|
||||||
|
for row in rows:
|
||||||
|
file, anchor = row["url"].split("#", 1)
|
||||||
|
by_file[file].append(anchor)
|
||||||
|
ctx.stats["protocols_pending"] = len(by_file)
|
||||||
|
for file, anchors in list(by_file.items())[:limit]:
|
||||||
|
yield Request(url=file, kind="protocol", meta={"anchors": sorted(set(anchors))})
|
||||||
|
|
||||||
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
|
anchors = response.meta["anchors"]
|
||||||
|
segments = speech_segments(response.text, anchors)
|
||||||
|
ctx.stats["anchors_not_found"] += len(anchors) - len(segments)
|
||||||
|
for anchor, text in segments.items():
|
||||||
|
if len(text) < 40:
|
||||||
|
ctx.stats["speech_too_short"] += 1
|
||||||
|
continue
|
||||||
|
yield Document(Evidence(
|
||||||
|
url=f"{response.request.url}#{anchor}", doc_type="protocol", source="parlament",
|
||||||
|
full_text=text, excerpt=excerpt(text, 400), meta={"interjections": interjections(text)[:200]},
|
||||||
|
))
|
||||||
@@ -14,6 +14,7 @@ fetch items whose lastmod changed. Runs on the `bulk` queue.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import re
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from datetime import date
|
from datetime import date
|
||||||
@@ -139,8 +140,28 @@ def parse_award_notice(xml: bytes) -> dict[str, Any] | None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PLACEHOLDER_NAME = re.compile(r"^[\W_]*$|^(?:n/?a|k\.?\s?a\.?|unbekannt|keine angabe|tbd|xxx+)$", re.IGNORECASE)
|
||||||
|
FRAMEWORK_BUYER = re.compile(r"^Auftraggeber (?:sind|ist)\b", re.IGNORECASE)
|
||||||
|
|
||||||
|
|
||||||
|
def plausible_date(value: str | None, latest: date) -> date | None:
|
||||||
|
"""An award date, or None if it can't be one: spreadsheet placeholders (1899-12-30, 1900-01-01) and dates after
|
||||||
|
the notice was fetched (some publishers put the contract's end date in the conclusion field)."""
|
||||||
|
d = as_date(value)
|
||||||
|
return d if d and date(1995, 1, 1) <= d <= latest else None
|
||||||
|
|
||||||
|
|
||||||
|
def buyer_name(name: str) -> tuple[str, str | None]:
|
||||||
|
"""Framework agreements name every eligible buyer in one sentence ("Auftraggeber sind die Republik Österreich
|
||||||
|
(Bund), die Bundesbeschaffung GmbH sowie alle weiteren ..."). They are concluded by the federal procurement
|
||||||
|
agency, so it is the buyer; the sentence is kept as the original wording."""
|
||||||
|
if FRAMEWORK_BUYER.match(name) and "Bundesbeschaffung" in name:
|
||||||
|
return "Bundesbeschaffung GmbH", name
|
||||||
|
return name, None
|
||||||
|
|
||||||
|
|
||||||
def org_ref(org: dict[str, Any], kind: str) -> OrgRef | None:
|
def org_ref(org: dict[str, Any], kind: str) -> OrgRef | None:
|
||||||
if not org.get("name"):
|
if not org.get("name") or PLACEHOLDER_NAME.match(org["name"].strip()):
|
||||||
return None
|
return None
|
||||||
company_id = (org.get("company_id") or "").replace(" ", "")
|
company_id = (org.get("company_id") or "").replace(" ", "")
|
||||||
ids = {}
|
ids = {}
|
||||||
@@ -167,7 +188,7 @@ class PublicContracts(Adapter):
|
|||||||
description = "Contract awards of Austrian public bodies (eForms and BVergG core data via data.gv.at)"
|
description = "Contract awards of Austrian public bodies (eForms and BVergG core data via data.gv.at)"
|
||||||
schedule = "0 2 * * *"
|
schedule = "0 2 * * *"
|
||||||
queue = "bulk"
|
queue = "bulk"
|
||||||
parser_version = 2
|
parser_version = 3 # 3: implausible award dates, placeholder contractors, framework-agreement buyers
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
for query in CATALOG_QUERIES:
|
for query in CATALOG_QUERIES:
|
||||||
@@ -230,22 +251,32 @@ class PublicContracts(Adapter):
|
|||||||
if notice is None:
|
if notice is None:
|
||||||
ctx.stats["not_an_award"] += 1
|
ctx.stats["not_an_award"] += 1
|
||||||
return
|
return
|
||||||
buyer = next((org_ref(b, "public_body") for b in notice["buyers"] if b.get("name")), None)
|
named = next((b for b in notice["buyers"] if b.get("name")), None)
|
||||||
|
buyer_text = None
|
||||||
|
if named is not None:
|
||||||
|
name, buyer_text = buyer_name(named["name"])
|
||||||
|
named = {**named, "name": name}
|
||||||
|
buyer = org_ref(named, "public_body") if named else None
|
||||||
if buyer is None:
|
if buyer is None:
|
||||||
return
|
return
|
||||||
|
latest = response.fetched_at.date()
|
||||||
for contract in notice["contracts"]:
|
for contract in notice["contracts"]:
|
||||||
for winner in contract["winners"]:
|
for winner in contract["winners"]:
|
||||||
supplier = org_ref(winner, "company")
|
supplier = org_ref(winner, "company")
|
||||||
if supplier is None:
|
if supplier is None:
|
||||||
|
ctx.stats["contractor_unnamed"] += 1
|
||||||
continue
|
continue
|
||||||
amount = contract["amount"] or (notice["total"] if len(notice["contracts"]) == 1 else None)
|
amount = contract["amount"] or (notice["total"] if len(notice["contracts"]) == 1 else None)
|
||||||
awarded = as_date(contract["awarded"]) or as_date(notice["issued"])
|
awarded = plausible_date(contract["awarded"], latest) or plausible_date(notice["issued"], latest)
|
||||||
|
if contract["awarded"] and awarded is None:
|
||||||
|
ctx.stats["implausible_award_date"] += 1
|
||||||
title = contract["title"] or notice["title"] or "Auftrag"
|
title = contract["title"] or notice["title"] or "Auftrag"
|
||||||
yield Claim(
|
yield Claim(
|
||||||
claim_type="money_flow", org=buyer, counterpart_org=supplier, occurred_at=awarded,
|
claim_type="money_flow", org=buyer, counterpart_org=supplier, occurred_at=awarded,
|
||||||
summary_de=f"Auftrag „{title}“ an {supplier.name}" + (f" – {format_eur_de(amount)} €" if amount else ""),
|
summary_de=f"Auftrag „{title}“ an {supplier.name}" + (f" – {format_eur_de(amount)} €" if amount else ""),
|
||||||
summary_en=f"Contract \"{title}\" awarded to {supplier.name}" + (f" – EUR {amount}" if amount else ""),
|
summary_en=f"Contract \"{title}\" awarded to {supplier.name}" + (f" – EUR {amount}" if amount else ""),
|
||||||
data={"notice_id": notice["notice_id"], "cpv": notice["cpv"], "publisher": response.meta.get("publisher")},
|
data={"notice_id": notice["notice_id"], "cpv": notice["cpv"], "publisher": response.meta.get("publisher"),
|
||||||
|
**({"buyer_text": buyer_text} if buyer_text else {})},
|
||||||
evidence=[Evidence(url=response.request.url, doc_type="register_entry", title=f"Vergabe: {title}",
|
evidence=[Evidence(url=response.request.url, doc_type="register_entry", title=f"Vergabe: {title}",
|
||||||
published_at=awarded, quote=f"{buyer.name} → {supplier.name}: {title}")],
|
published_at=awarded, quote=f"{buyer.name} → {supplier.name}: {title}")],
|
||||||
facet=Money(kind="contract", amount=amount, payer=buyer, payer_name=buyer.name, payee=supplier,
|
facet=Money(kind="contract", amount=amount, payer=buyer, payer_name=buyer.name, payee=supplier,
|
||||||
|
|||||||
@@ -99,16 +99,22 @@ class BlueskyPosts(Adapter):
|
|||||||
queue = "social"
|
queue = "social"
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
|
pages = int(ctx.params.get("backfill_pages", 0)) # older pages per account (history backfill)
|
||||||
for acc in accounts(ctx, "bluesky", r"bsky\.app/profile/"):
|
for acc in accounts(ctx, "bluesky", r"bsky\.app/profile/"):
|
||||||
m = re.search(r"bsky\.app/profile/([^/?#]+)", acc["url"])
|
m = re.search(r"bsky\.app/profile/([^/?#]+)", acc["url"])
|
||||||
if m:
|
if m:
|
||||||
yield Request(url="https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed",
|
yield Request(url="https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed",
|
||||||
params={"actor": m.group(1), "limit": 50, "filter": "posts_no_replies"}, kind="feed",
|
params={"actor": m.group(1), "limit": 50, "filter": "posts_no_replies"}, kind="feed",
|
||||||
meta={**acc["owner"], "handle": m.group(1)})
|
meta={**acc["owner"], "handle": m.group(1), **({"pages_left": pages} if pages else {})})
|
||||||
|
|
||||||
def parse(self, ctx: RunContext, response: Response) -> Iterator[Claim]:
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
handle = response.meta["handle"]
|
handle = response.meta["handle"]
|
||||||
for item in response.json().get("feed", []):
|
data = response.json()
|
||||||
|
if response.meta.get("pages_left") and data.get("cursor") and data.get("feed"):
|
||||||
|
yield Request(url=response.request.url, kind="feed",
|
||||||
|
params={**(response.request.params or {}), "cursor": data["cursor"]},
|
||||||
|
meta={**response.meta, "pages_left": response.meta["pages_left"] - 1})
|
||||||
|
for item in data.get("feed", []):
|
||||||
post = item.get("post") or {}
|
post = item.get("post") or {}
|
||||||
if item.get("reason"): # repost of someone else's post
|
if item.get("reason"): # repost of someone else's post
|
||||||
continue
|
continue
|
||||||
@@ -131,12 +137,13 @@ class MastodonPosts(Adapter):
|
|||||||
queue = "social"
|
queue = "social"
|
||||||
|
|
||||||
def start(self, ctx: RunContext) -> Iterator[Request]:
|
def start(self, ctx: RunContext) -> Iterator[Request]:
|
||||||
|
pages = int(ctx.params.get("backfill_pages", 0)) # older pages per account (history backfill)
|
||||||
for acc in accounts(ctx, "mastodon"): # instances have arbitrary hosts: platform only
|
for acc in accounts(ctx, "mastodon"): # instances have arbitrary hosts: platform only
|
||||||
m = re.match(r"^https?://([^/]+)/@([^/@]+)", acc["url"])
|
m = re.match(r"^https?://([^/]+)/@([^/@]+)", acc["url"])
|
||||||
if m:
|
if m:
|
||||||
host, user = m.groups()
|
host, user = m.groups()
|
||||||
yield Request(url=f"https://{host}/api/v1/accounts/lookup", params={"acct": user}, kind="lookup",
|
yield Request(url=f"https://{host}/api/v1/accounts/lookup", params={"acct": user}, kind="lookup",
|
||||||
meta={**acc["owner"], "host": host})
|
meta={**acc["owner"], "host": host, **({"pages_left": pages} if pages else {})})
|
||||||
|
|
||||||
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
def parse(self, ctx: RunContext, response: Response) -> Iterator[Any]:
|
||||||
meta = response.meta
|
meta = response.meta
|
||||||
@@ -147,7 +154,12 @@ class MastodonPosts(Adapter):
|
|||||||
params={"limit": 40, "exclude_replies": "true", "exclude_reblogs": "true"},
|
params={"limit": 40, "exclude_replies": "true", "exclude_reblogs": "true"},
|
||||||
kind="statuses", meta=meta)
|
kind="statuses", meta=meta)
|
||||||
return
|
return
|
||||||
for status in response.json():
|
statuses = response.json()
|
||||||
|
if meta.get("pages_left") and statuses:
|
||||||
|
yield Request(url=response.request.url, kind="statuses",
|
||||||
|
params={**(response.request.params or {}), "max_id": statuses[-1]["id"]},
|
||||||
|
meta={**meta, "pages_left": meta["pages_left"] - 1})
|
||||||
|
for status in statuses:
|
||||||
if status.get("visibility") not in (None, "public"):
|
if status.get("visibility") not in (None, "public"):
|
||||||
continue
|
continue
|
||||||
yield post_claim(owner=meta, platform="mastodon", url=status.get("url") or status.get("uri"),
|
yield post_claim(owner=meta, platform="mastodon", url=status.get("url") or status.get("uri"),
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ ACADEMIC_TITLES = re.compile(
|
|||||||
|
|
||||||
|
|
||||||
def normalize(text: str) -> str:
|
def normalize(text: str) -> str:
|
||||||
"""Lowercase, strip accents and collapse whitespace (matches SQL lower(unaccent()))."""
|
"""Lowercase, strip accents, ß -> ss and collapse whitespace (matches SQL lower(unaccent()))."""
|
||||||
text = unicodedata.normalize("NFKD", text)
|
text = unicodedata.normalize("NFKD", text)
|
||||||
text = "".join(c for c in text if not unicodedata.combining(c))
|
text = "".join(c for c in text if not unicodedata.combining(c))
|
||||||
return re.sub(r"\s+", " ", text).strip().lower()
|
return re.sub(r"\s+", " ", text).strip().lower().replace("ß", "ss")
|
||||||
|
|
||||||
|
|
||||||
def strip_titles(name: str) -> str:
|
def strip_titles(name: str) -> str:
|
||||||
|
|||||||
@@ -9,21 +9,62 @@ One periodic task is generated per registered adapter/enricher from its `schedul
|
|||||||
|
|
||||||
Periodic tasks are deferred by every running worker and de-duplicated by Procrastinate; queueing locks
|
Periodic tasks are deferred by every running worker and de-duplicated by Procrastinate; queueing locks
|
||||||
prevent two runs of the same adapter at once. Workers can run on other machines that reach the DB.
|
prevent two runs of the same adapter at once. Workers can run on other machines that reach the DB.
|
||||||
|
|
||||||
|
Procrastinate only remembers in memory when it last deferred a task, and skips a slot that is more than
|
||||||
|
ten minutes overdue. In November 2026 every daily and weekly source silently missed two days that way,
|
||||||
|
and jobs of killed workers stayed "doing" forever. The watchdog below makes both self-healing.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import socket
|
||||||
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from logging.handlers import RotatingFileHandler
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from croniter import croniter
|
||||||
from procrastinate import App, PsycopgConnector
|
from procrastinate import App, PsycopgConnector
|
||||||
|
from procrastinate.exceptions import AlreadyEnqueued
|
||||||
|
from procrastinate.jobs import Status
|
||||||
|
|
||||||
from politrack.config import get_settings
|
from politrack.config import get_settings
|
||||||
from politrack.core import registry
|
from politrack.core import registry
|
||||||
from politrack.core.runner import run
|
from politrack.core.runner import run
|
||||||
|
from politrack.db import connection
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
|
LOG_FORMAT = "%(asctime)s %(levelname)s %(name)s: %(message)s"
|
||||||
|
logging.basicConfig(level=logging.INFO, format=LOG_FORMAT)
|
||||||
|
log = logging.getLogger("politrack.watchdog")
|
||||||
|
|
||||||
|
|
||||||
|
def _log_to_file() -> None:
|
||||||
|
"""Container logs vanish when a container is recreated (every deploy); keep a rotating copy in
|
||||||
|
$POLITRACK_LOG_DIR/<hostname>.log so failures can still be traced afterwards."""
|
||||||
|
log_dir = os.environ.get("POLITRACK_LOG_DIR")
|
||||||
|
if not log_dir:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
handler = RotatingFileHandler(Path(log_dir) / f"{socket.gethostname()}.log", maxBytes=20_000_000,
|
||||||
|
backupCount=5, encoding="utf-8")
|
||||||
|
except OSError as exc: # e.g. the host folder belongs to root: logs stay on stdout only
|
||||||
|
log.warning("cannot write logs to %s: %s", log_dir, exc)
|
||||||
|
return
|
||||||
|
handler.setFormatter(logging.Formatter(LOG_FORMAT))
|
||||||
|
logging.getLogger().addHandler(handler)
|
||||||
|
|
||||||
|
|
||||||
|
_log_to_file()
|
||||||
|
|
||||||
app = App(connector=PsycopgConnector(conninfo=get_settings().database_url))
|
app = App(connector=PsycopgConnector(conninfo=get_settings().database_url))
|
||||||
|
TASKS: dict = {}
|
||||||
|
SCHEDULES: dict[str, str] = {}
|
||||||
|
|
||||||
|
STALLED_AFTER = 300 # seconds without a worker heartbeat
|
||||||
|
OVERDUE_GRACE = timedelta(minutes=15) # normal deferral happens within a minute of the slot
|
||||||
|
ABANDONED_RUN = timedelta(hours=6) # CLI runs have no job; don't close them while they may still run
|
||||||
|
|
||||||
|
|
||||||
def _make_task(name: str, queue: str, schedule: str | None) -> None:
|
def _make_task(name: str, queue: str, schedule: str | None) -> None:
|
||||||
@@ -32,10 +73,65 @@ def _make_task(name: str, queue: str, schedule: str | None) -> None:
|
|||||||
|
|
||||||
job.__name__ = f"run_{name.replace('.', '_')}"
|
job.__name__ = f"run_{name.replace('.', '_')}"
|
||||||
task = app.task(name=f"politrack.run.{name}", queue=queue, queueing_lock=name, pass_context=False)(job)
|
task = app.task(name=f"politrack.run.{name}", queue=queue, queueing_lock=name, pass_context=False)(job)
|
||||||
|
TASKS[name] = task
|
||||||
if schedule:
|
if schedule:
|
||||||
|
SCHEDULES[name] = schedule
|
||||||
app.periodic(cron=schedule, periodic_id=name)(task)
|
app.periodic(cron=schedule, periodic_id=name)(task)
|
||||||
|
|
||||||
|
|
||||||
registry.load_builtin()
|
registry.load_builtin()
|
||||||
for _name, _cls in {**registry.ADAPTERS, **registry.ENRICHERS}.items():
|
for _name, _cls in {**registry.ADAPTERS, **registry.ENRICHERS}.items():
|
||||||
_make_task(_name, _cls.queue, _cls.schedule)
|
_make_task(_name, _cls.queue, _cls.schedule)
|
||||||
|
|
||||||
|
|
||||||
|
def overdue_tasks(now: datetime) -> list[str]:
|
||||||
|
"""Scheduled tasks whose latest slot passed without a run, a waiting job or a running job."""
|
||||||
|
due: list[str] = []
|
||||||
|
with connection() as conn:
|
||||||
|
for name, schedule in SCHEDULES.items():
|
||||||
|
slot = croniter(schedule, now).get_prev(datetime)
|
||||||
|
if now - slot < OVERDUE_GRACE:
|
||||||
|
continue
|
||||||
|
seen = conn.execute(
|
||||||
|
"""SELECT EXISTS (SELECT 1 FROM run WHERE adapter = %(name)s AND started_at >= %(slot)s)
|
||||||
|
OR EXISTS (SELECT 1 FROM procrastinate_jobs WHERE task_name = %(task)s
|
||||||
|
AND status IN ('todo', 'doing')) AS seen""",
|
||||||
|
{"name": name, "slot": slot, "task": f"politrack.run.{name}"},
|
||||||
|
).fetchone()["seen"]
|
||||||
|
if not seen:
|
||||||
|
due.append(name)
|
||||||
|
return due
|
||||||
|
|
||||||
|
|
||||||
|
def close_abandoned_runs() -> int:
|
||||||
|
"""Runs still marked running although no job for them is in progress (the worker was stopped)."""
|
||||||
|
with connection() as conn:
|
||||||
|
closed = conn.execute(
|
||||||
|
"""UPDATE run r SET status = 'error', finished_at = now(),
|
||||||
|
error = 'abandoned: the worker stopped before the run finished (closed by the watchdog)'
|
||||||
|
WHERE r.status = 'running' AND r.started_at < now() - %s
|
||||||
|
AND NOT EXISTS (SELECT 1 FROM procrastinate_jobs j
|
||||||
|
WHERE j.status = 'doing' AND j.task_name = 'politrack.run.' || r.adapter)""",
|
||||||
|
(ABANDONED_RUN,),
|
||||||
|
).rowcount
|
||||||
|
conn.commit()
|
||||||
|
return closed
|
||||||
|
|
||||||
|
|
||||||
|
@app.periodic(cron="*/10 * * * *", periodic_id="watchdog")
|
||||||
|
@app.task(name="politrack.watchdog", queue="social", queueing_lock="watchdog", pass_context=False)
|
||||||
|
async def watchdog(timestamp: int | None = None) -> dict:
|
||||||
|
stats = {"stalled_failed": 0, "overdue_deferred": 0}
|
||||||
|
for job in await app.job_manager.get_stalled_jobs(seconds_since_heartbeat=STALLED_AFTER):
|
||||||
|
await app.job_manager.finish_job(job, status=Status.FAILED, delete_job=False)
|
||||||
|
stats["stalled_failed"] += 1
|
||||||
|
log.warning("failed stalled job %s (%s): its worker is gone", job.id, job.task_name)
|
||||||
|
stats["abandoned_runs_closed"] = await asyncio.to_thread(close_abandoned_runs)
|
||||||
|
for name in await asyncio.to_thread(overdue_tasks, datetime.now(timezone.utc)):
|
||||||
|
try:
|
||||||
|
await TASKS[name].defer_async()
|
||||||
|
stats["overdue_deferred"] += 1
|
||||||
|
log.warning("deferred %s: its last scheduled slot passed without a run", name)
|
||||||
|
except AlreadyEnqueued:
|
||||||
|
pass
|
||||||
|
return stats
|
||||||
@@ -17,6 +17,7 @@ dependencies = [
|
|||||||
"python-slugify>=8.0",
|
"python-slugify>=8.0",
|
||||||
"rapidfuzz>=3.9",
|
"rapidfuzz>=3.9",
|
||||||
"procrastinate>=2.14,<4",
|
"procrastinate>=2.14,<4",
|
||||||
|
"croniter>=2.0",
|
||||||
"typer>=0.12",
|
"typer>=0.12",
|
||||||
"pyyaml>=6.0",
|
"pyyaml>=6.0",
|
||||||
"mcp>=1.9,<2",
|
"mcp>=1.9,<2",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends eatmyda
|
|||||||
&& eatmydata apt-get install -y -qq --no-install-recommends \
|
&& eatmydata apt-get install -y -qq --no-install-recommends \
|
||||||
python3 python3-psycopg python3-psycopg-pool python3-pydantic-settings python3-fastapi python3-httpx \
|
python3 python3-psycopg python3-psycopg-pool python3-pydantic-settings python3-fastapi python3-httpx \
|
||||||
python3-protego python3-feedparser python3-bs4 python3-slugify python3-rapidfuzz python3-typer \
|
python3-protego python3-feedparser python3-bs4 python3-slugify python3-rapidfuzz python3-typer \
|
||||||
python3-yaml python3-uvicorn python3-pytest python3-openpyxl ca-certificates >/dev/null \
|
python3-yaml python3-uvicorn python3-pytest python3-openpyxl python3-croniter ca-certificates >/dev/null \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Keeps the agent image's user, entrypoint and /workspace as they are.
|
# Keeps the agent image's user, entrypoint and /workspace as they are.
|
||||||
|
|||||||
@@ -0,0 +1,262 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 60402,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:ÖVP:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Bundesliste ÖVP, Platz 1: 60402 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"ÖVP",
|
||||||
|
1,
|
||||||
|
"Karl Nehammer"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1972,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Karl Nehammer"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "60.402 Vorzugsstimmen bei der Nationalratswahl 2024 (Bundesliste ÖVP, Platz 1)",
|
||||||
|
"summary_en": "60,402 preference votes in the 2024 National Council election (ÖVP, Bundesliste, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 7820,
|
||||||
|
"rank": 2
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:ÖVP:2",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Bundesliste ÖVP, Platz 2: 7820 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"ÖVP",
|
||||||
|
2,
|
||||||
|
"Claudia Plakolm"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1994,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Claudia Plakolm"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "7.820 Vorzugsstimmen bei der Nationalratswahl 2024 (Bundesliste ÖVP, Platz 2)",
|
||||||
|
"summary_en": "7,820 preference votes in the 2024 National Council election (ÖVP, Bundesliste, position 2)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 2069,
|
||||||
|
"rank": 3
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:ÖVP:3",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Bundesliste ÖVP, Platz 3: 2069 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"ÖVP",
|
||||||
|
3,
|
||||||
|
"Dr. Magnus Brunner"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1972,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Dr. Magnus Brunner"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "2.069 Vorzugsstimmen bei der Nationalratswahl 2024 (Bundesliste ÖVP, Platz 3)",
|
||||||
|
"summary_en": "2,069 preference votes in the 2024 National Council election (ÖVP, Bundesliste, position 3)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "SPÖ",
|
||||||
|
"preference_votes": 46440,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:SPÖ:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Bundesliste SPÖ, Platz 1: 46440 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"SPÖ",
|
||||||
|
1,
|
||||||
|
"Andreas Babler"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1973,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Andreas Babler"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "46.440 Vorzugsstimmen bei der Nationalratswahl 2024 (Bundesliste SPÖ, Platz 1)",
|
||||||
|
"summary_en": "46,440 preference votes in the 2024 National Council election (SPÖ, Bundesliste, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_bundesbewerber_16102024.xlsx",
|
||||||
|
"kind": "preferences",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"layout": "bund"
|
||||||
|
},
|
||||||
|
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"body_file": "preferences_bund.xlsx"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,250 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 58013,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:ÖVP:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Bundesliste ÖVP, Platz 1: 58013 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"euw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"ÖVP",
|
||||||
|
1,
|
||||||
|
"Dr. Reinhold Lopatka"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Dr. Reinhold Lopatka"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "58.013 Vorzugsstimmen bei der Europawahl 2024 (Bundesliste ÖVP, Platz 1)",
|
||||||
|
"summary_en": "58,013 preference votes in the 2024 European Parliament election (ÖVP, Bundesliste, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 38426,
|
||||||
|
"rank": 2
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:ÖVP:2",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Bundesliste ÖVP, Platz 2: 38426 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"euw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"ÖVP",
|
||||||
|
2,
|
||||||
|
"Mag. Dr. Angelika Winzig"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Mag. Dr. Angelika Winzig"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "38.426 Vorzugsstimmen bei der Europawahl 2024 (Bundesliste ÖVP, Platz 2)",
|
||||||
|
"summary_en": "38,426 preference votes in the 2024 European Parliament election (ÖVP, Bundesliste, position 2)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "SPÖ",
|
||||||
|
"preference_votes": 61982,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:SPÖ:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Bundesliste SPÖ, Platz 1: 61982 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"euw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"SPÖ",
|
||||||
|
1,
|
||||||
|
"Mag. Andreas Schieder"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Mag. Andreas Schieder"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "61.982 Vorzugsstimmen bei der Europawahl 2024 (Bundesliste SPÖ, Platz 1)",
|
||||||
|
"summary_en": "61,982 preference votes in the 2024 European Parliament election (SPÖ, Bundesliste, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"list": "Bundesliste",
|
||||||
|
"party": "SPÖ",
|
||||||
|
"preference_votes": 17448,
|
||||||
|
"rank": 2
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Bundesliste:SPÖ:2",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Bundesliste SPÖ, Platz 2: 17448 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"euw2024",
|
||||||
|
"Bundesliste",
|
||||||
|
"SPÖ",
|
||||||
|
2,
|
||||||
|
"Mag. Evelyn Regner"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Mag. Evelyn Regner"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "17.448 Vorzugsstimmen bei der Europawahl 2024 (Bundesliste SPÖ, Platz 2)",
|
||||||
|
"summary_en": "17,448 preference votes in the 2024 European Parliament election (SPÖ, Bundesliste, position 2)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/gesamtaufstellung_erzielte_vorzugsstimmen_eu_wahl_2024_parteien.xlsx",
|
||||||
|
"kind": "preferences",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"layout": "eu"
|
||||||
|
},
|
||||||
|
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"body_file": "preferences_eu.xlsx"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,197 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Landesparteiliste Burgenland",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 3937,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Landesparteiliste Burgenland:ÖVP:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Landesparteiliste Burgenland ÖVP, Platz 1: 3937 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_landes_undregionalbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Landesparteiliste Burgenland",
|
||||||
|
"ÖVP",
|
||||||
|
1,
|
||||||
|
"Christoph Zarits"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1980,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Christoph Zarits"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "3.937 Vorzugsstimmen bei der Nationalratswahl 2024 (Landesparteiliste Burgenland ÖVP, Platz 1)",
|
||||||
|
"summary_en": "3,937 preference votes in the 2024 National Council election (ÖVP, Landesparteiliste Burgenland, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Landesparteiliste Burgenland",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 2734,
|
||||||
|
"rank": 2
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Landesparteiliste Burgenland:ÖVP:2",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Landesparteiliste Burgenland ÖVP, Platz 2: 2734 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_landes_undregionalbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Landesparteiliste Burgenland",
|
||||||
|
"ÖVP",
|
||||||
|
2,
|
||||||
|
"Nikolaus Berlakovich"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1961,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Nikolaus Berlakovich"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "2.734 Vorzugsstimmen bei der Nationalratswahl 2024 (Landesparteiliste Burgenland ÖVP, Platz 2)",
|
||||||
|
"summary_en": "2,734 preference votes in the 2024 National Council election (ÖVP, Landesparteiliste Burgenland, position 2)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"list": "Regionalparteiliste Burgenland Nord",
|
||||||
|
"party": "ÖVP",
|
||||||
|
"preference_votes": 7361,
|
||||||
|
"rank": 1
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "Regionalparteiliste Burgenland Nord:ÖVP:1",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Regionalparteiliste Burgenland Nord ÖVP, Platz 1: 7361 Vorzugsstimmen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, Vorzugsstimmen",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_landes_undregionalbewerber_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"preference-votes",
|
||||||
|
"nrw2024",
|
||||||
|
"Regionalparteiliste Burgenland Nord",
|
||||||
|
"ÖVP",
|
||||||
|
1,
|
||||||
|
"Christoph Zarits"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {
|
||||||
|
"birth_year": 1980,
|
||||||
|
"no_name_match": true
|
||||||
|
},
|
||||||
|
"ids": {},
|
||||||
|
"name": "Christoph Zarits"
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "7.361 Vorzugsstimmen bei der Nationalratswahl 2024 (Regionalparteiliste Burgenland Nord ÖVP, Platz 1)",
|
||||||
|
"summary_en": "7,361 preference votes in the 2024 National Council election (ÖVP, Regionalparteiliste Burgenland Nord, position 1)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/nrw2024_aufstellung_der_vorzugsstimmen_der_landes_undregionalbewerber_16102024.xlsx",
|
||||||
|
"kind": "preferences",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"layout": "land"
|
||||||
|
},
|
||||||
|
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"body_file": "preferences_land.xlsx"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,266 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"electorate": 6372205,
|
||||||
|
"party": "ÖVP",
|
||||||
|
"percent": 24.52,
|
||||||
|
"region": "Österreich",
|
||||||
|
"region_code": "G00000",
|
||||||
|
"valid_votes": 3523935,
|
||||||
|
"votes": 864072
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G00000:ÖVP",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Österreich | ÖVP | 864072 | 3523935 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/endgueltiges_ergebnis_europawahl_26062024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"euw2024",
|
||||||
|
"G00000",
|
||||||
|
"ÖVP"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "ÖVP: 24,52 % (864.072 Stimmen) bei der Europawahl 2024 – Österreich",
|
||||||
|
"summary_en": "ÖVP: 24.52 % (864,072 votes) in the 2024 European Parliament election – Österreich",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"electorate": 6372205,
|
||||||
|
"party": "SPÖ",
|
||||||
|
"percent": 23.22,
|
||||||
|
"region": "Österreich",
|
||||||
|
"region_code": "G00000",
|
||||||
|
"valid_votes": 3523935,
|
||||||
|
"votes": 818287
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G00000:SPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Österreich | SPÖ | 818287 | 3523935 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/endgueltiges_ergebnis_europawahl_26062024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"euw2024",
|
||||||
|
"G00000",
|
||||||
|
"SPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "SPÖ: 23,22 % (818.287 Stimmen) bei der Europawahl 2024 – Österreich",
|
||||||
|
"summary_en": "SPÖ: 23.22 % (818,287 votes) in the 2024 European Parliament election – Österreich",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"electorate": 235492,
|
||||||
|
"party": "ÖVP",
|
||||||
|
"percent": 27.91,
|
||||||
|
"region": "Burgenland",
|
||||||
|
"region_code": "G10000",
|
||||||
|
"valid_votes": 134907,
|
||||||
|
"votes": 37654
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G10000:ÖVP",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Burgenland | ÖVP | 37654 | 134907 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/endgueltiges_ergebnis_europawahl_26062024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"euw2024",
|
||||||
|
"G10000",
|
||||||
|
"ÖVP"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "ÖVP: 27,91 % (37.654 Stimmen) bei der Europawahl 2024 – Burgenland",
|
||||||
|
"summary_en": "ÖVP: 27.91 % (37,654 votes) in the 2024 European Parliament election – Burgenland",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "euw2024",
|
||||||
|
"electorate": 235492,
|
||||||
|
"party": "SPÖ",
|
||||||
|
"percent": 29.84,
|
||||||
|
"region": "Burgenland",
|
||||||
|
"region_code": "G10000",
|
||||||
|
"valid_votes": 134907,
|
||||||
|
"votes": 40253
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G10000:SPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-06-09",
|
||||||
|
"quote": "Burgenland | SPÖ | 40253 | 134907 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Europawahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/endgueltiges_ergebnis_europawahl_26062024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"euw2024",
|
||||||
|
"G10000",
|
||||||
|
"SPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-06-09",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "SPÖ: 29,84 % (40.253 Stimmen) bei der Europawahl 2024 – Burgenland",
|
||||||
|
"summary_en": "SPÖ: 29.84 % (40,253 votes) in the 2024 European Parliament election – Burgenland",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.bmi.gv.at/412/europawahlen/europawahl_2024/files/endgueltiges_ergebnis_europawahl_26062024.xlsx",
|
||||||
|
"kind": "result",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"election": "euw2024"
|
||||||
|
},
|
||||||
|
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"body_file": "result_euw2024.xlsx"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,398 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 6346059,
|
||||||
|
"party": "ÖVP",
|
||||||
|
"percent": 26.26,
|
||||||
|
"region": "Österreich",
|
||||||
|
"region_code": "G00000",
|
||||||
|
"valid_votes": 4882888,
|
||||||
|
"votes": 1282734
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G00000:ÖVP",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Österreich | ÖVP | 1282734 | 4882888 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G00000",
|
||||||
|
"ÖVP"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "ÖVP: 26,26 % (1.282.734 Stimmen) bei der Nationalratswahl 2024 – Österreich",
|
||||||
|
"summary_en": "ÖVP: 26.26 % (1,282,734 votes) in the 2024 National Council election – Österreich",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 6346059,
|
||||||
|
"party": "SPÖ",
|
||||||
|
"percent": 21.13,
|
||||||
|
"region": "Österreich",
|
||||||
|
"region_code": "G00000",
|
||||||
|
"valid_votes": 4882888,
|
||||||
|
"votes": 1032233
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G00000:SPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Österreich | SPÖ | 1032233 | 4882888 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G00000",
|
||||||
|
"SPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "SPÖ: 21,13 % (1.032.233 Stimmen) bei der Nationalratswahl 2024 – Österreich",
|
||||||
|
"summary_en": "SPÖ: 21.13 % (1,032,233 votes) in the 2024 National Council election – Österreich",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 6346059,
|
||||||
|
"party": "FPÖ",
|
||||||
|
"percent": 28.84,
|
||||||
|
"region": "Österreich",
|
||||||
|
"region_code": "G00000",
|
||||||
|
"valid_votes": 4882888,
|
||||||
|
"votes": 1408512
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G00000:FPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Österreich | FPÖ | 1408512 | 4882888 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G00000",
|
||||||
|
"FPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "FPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "FPÖ: 28,84 % (1.408.512 Stimmen) bei der Nationalratswahl 2024 – Österreich",
|
||||||
|
"summary_en": "FPÖ: 28.84 % (1,408,512 votes) in the 2024 National Council election – Österreich",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 233738,
|
||||||
|
"party": "ÖVP",
|
||||||
|
"percent": 28.55,
|
||||||
|
"region": "Burgenland",
|
||||||
|
"region_code": "G10000",
|
||||||
|
"valid_votes": 190099,
|
||||||
|
"votes": 54287
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G10000:ÖVP",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Burgenland | ÖVP | 54287 | 190099 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G10000",
|
||||||
|
"ÖVP"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "ÖVP",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "ÖVP: 28,55 % (54.287 Stimmen) bei der Nationalratswahl 2024 – Burgenland",
|
||||||
|
"summary_en": "ÖVP: 28.55 % (54,287 votes) in the 2024 National Council election – Burgenland",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 233738,
|
||||||
|
"party": "SPÖ",
|
||||||
|
"percent": 27.02,
|
||||||
|
"region": "Burgenland",
|
||||||
|
"region_code": "G10000",
|
||||||
|
"valid_votes": 190099,
|
||||||
|
"votes": 51374
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G10000:SPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Burgenland | SPÖ | 51374 | 190099 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G10000",
|
||||||
|
"SPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "SPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "SPÖ: 27,02 % (51.374 Stimmen) bei der Nationalratswahl 2024 – Burgenland",
|
||||||
|
"summary_en": "SPÖ: 27.02 % (51,374 votes) in the 2024 National Council election – Burgenland",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "election_result",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "nationalrat"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"election": "nrw2024",
|
||||||
|
"electorate": 233738,
|
||||||
|
"party": "FPÖ",
|
||||||
|
"percent": 28.78,
|
||||||
|
"region": "Burgenland",
|
||||||
|
"region_code": "G10000",
|
||||||
|
"valid_votes": 190099,
|
||||||
|
"votes": 54718
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "dataset_row",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "G10000:FPÖ",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2024-09-29",
|
||||||
|
"quote": "Burgenland | FPÖ | 54718 | 190099 gültige",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "BMI: Nationalratswahl 2024, endgültiges Ergebnis",
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"election",
|
||||||
|
"nrw2024",
|
||||||
|
"G10000",
|
||||||
|
"FPÖ"
|
||||||
|
],
|
||||||
|
"occurred_at": "2024-09-29",
|
||||||
|
"org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": false,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "party",
|
||||||
|
"name": null,
|
||||||
|
"short_name": "FPÖ",
|
||||||
|
"slug": null
|
||||||
|
},
|
||||||
|
"person": null,
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "FPÖ: 28,78 % (54.718 Stimmen) bei der Nationalratswahl 2024 – Burgenland",
|
||||||
|
"summary_en": "FPÖ: 28.78 % (54,718 votes) in the 2024 National Council election – Burgenland",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.bmi.gv.at/412/nationalratswahlen/nationalratswahl_2024/files/endgueltiges_ergebnis_beschluss_bundeswahlbehoerde_16102024.xlsx",
|
||||||
|
"kind": "result",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"election": "nrw2024"
|
||||||
|
},
|
||||||
|
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"body_file": "result_nrw2024.xlsx"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -11,6 +11,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": false,
|
"match_by_name": false,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": "https://www.europarl.europa.eu/mepphoto/220897.jpg",
|
"photo_url": "https://www.europarl.europa.eu/mepphoto/220897.jpg",
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -74,6 +75,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -135,6 +137,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -196,6 +199,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -257,6 +261,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -318,6 +323,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -379,6 +385,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -440,6 +447,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": true,
|
"match_by_name": true,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": null,
|
"photo_url": null,
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
"item_ref": "A10-0259/2026",
|
"item_ref": "A10-0259/2026",
|
||||||
"key": "3ab02bb907351dfa059987800a98ee3b1e2a77a9",
|
"key": "3ab02bb907351dfa059987800a98ee3b1e2a77a9",
|
||||||
|
"part_vote": false,
|
||||||
"protocol_url": "https://www.europarl.europa.eu/doceo/document/PV-10-2026-10-21-RCV_DE.html",
|
"protocol_url": "https://www.europarl.europa.eu/doceo/document/PV-10-2026-10-21-RCV_DE.html",
|
||||||
"raw_text": "Entschließungsantrag (gesamter Text): 504 Ja, 63 Nein, 99 Enthaltungen",
|
"raw_text": "Entschließungsantrag (gesamter Text): 504 Ja, 63 Nein, 99 Enthaltungen",
|
||||||
"result": "accepted",
|
"result": "accepted",
|
||||||
@@ -219,5 +220,95 @@
|
|||||||
],
|
],
|
||||||
"valid_from": null,
|
"valid_from": null,
|
||||||
"valid_to": null
|
"valid_to": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "VoteEvent",
|
||||||
|
"chamber": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"item_ref": "A10-0272/2026",
|
||||||
|
"key": "6f5c1cd4005ecf97b7b450c671850a66d9fd5943",
|
||||||
|
"part_vote": true,
|
||||||
|
"protocol_url": "https://www.europarl.europa.eu/doceo/document/PV-10-2026-10-21-RCV_DE.html",
|
||||||
|
"raw_text": "nach § 3 – Änd. 70: 177 Ja, 455 Nein, 41 Enthaltungen",
|
||||||
|
"result": "rejected",
|
||||||
|
"roll_call": true,
|
||||||
|
"stage": "nach § 3 – Änd. 70",
|
||||||
|
"title": "A10-0272/2026 – Nils Ušakovs, Michalis Hadjipantela – nach § 3 – Änd. 70",
|
||||||
|
"url": "https://data.europarl.europa.eu/eli/dl/event/MTG-PL-2026-10-21-DEC-198977",
|
||||||
|
"voted_on": "2026-10-21"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "vote",
|
||||||
|
"counterpart_org": {
|
||||||
|
"__type__": "OrgRef",
|
||||||
|
"create": true,
|
||||||
|
"ids": {},
|
||||||
|
"kind": "other",
|
||||||
|
"name": null,
|
||||||
|
"short_name": null,
|
||||||
|
"slug": "europaeisches-parlament"
|
||||||
|
},
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"abstained": 41,
|
||||||
|
"chamber": "EP",
|
||||||
|
"no": 455,
|
||||||
|
"part_vote": true,
|
||||||
|
"position": "for",
|
||||||
|
"result": "rejected",
|
||||||
|
"roll_call": true,
|
||||||
|
"yes": 177
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "api_record",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "vote:eli/dl/event/MTG-PL-2026-10-21-DEC-198977",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": "2026-10-21",
|
||||||
|
"quote": "nach § 3 – Änd. 70: 177 Ja, 455 Nein, 41 Enthaltungen",
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "A10-0272/2026 – Nils Ušakovs, Michalis Hadjipantela – nach § 3 – Änd. 70",
|
||||||
|
"url": "https://data.europarl.europa.eu/eli/dl/event/MTG-PL-2026-10-21-DEC-198977"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": {
|
||||||
|
"__type__": "VotePosition",
|
||||||
|
"event_key": "6f5c1cd4005ecf97b7b450c671850a66d9fd5943",
|
||||||
|
"party": null,
|
||||||
|
"position": "for"
|
||||||
|
},
|
||||||
|
"key": null,
|
||||||
|
"occurred_at": "2026-10-21",
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {
|
||||||
|
"ep": "257104"
|
||||||
|
},
|
||||||
|
"name": null
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "Stimmte für: A10-0272/2026 – Nils Ušakovs, Michalis Hadjipantela – nach § 3 – Änd. 70 (Europäisches Parlament) – abgelehnt",
|
||||||
|
"summary_en": "Voted for: A10-0272/2026 – Nils Ušakovs, Michalis Hadjipantela – nach § 3 – Änd. 70 (European Parliament) – rejected",
|
||||||
|
"topics": [
|
||||||
|
"Europäische Union"
|
||||||
|
],
|
||||||
|
"valid_from": null,
|
||||||
|
"valid_to": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
"item_ref": "416/A",
|
"item_ref": "416/A",
|
||||||
"key": "931917bd2feea2b95c21f3e15a86267702bce32f",
|
"key": "931917bd2feea2b95c21f3e15a86267702bce32f",
|
||||||
|
"part_vote": false,
|
||||||
"protocol_url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/44/fnameorig_1764795.html#160",
|
"protocol_url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/44/fnameorig_1764795.html#160",
|
||||||
"raw_text": "44. Sitzung des Nationalrates: Gesetzesvorschlag in zweiter Lesung angenommen Dafür: ÖVP, SPÖ, NEOS, GRÜNE, dagegen: FPÖ",
|
"raw_text": "44. Sitzung des Nationalrates: Gesetzesvorschlag in zweiter Lesung angenommen Dafür: ÖVP, SPÖ, NEOS, GRÜNE, dagegen: FPÖ",
|
||||||
"result": "accepted",
|
"result": "accepted",
|
||||||
@@ -459,6 +460,7 @@
|
|||||||
},
|
},
|
||||||
"item_ref": "416/A",
|
"item_ref": "416/A",
|
||||||
"key": "106b0163e733dbe54ccf3a7c148a2041ee607b6b",
|
"key": "106b0163e733dbe54ccf3a7c148a2041ee607b6b",
|
||||||
|
"part_vote": false,
|
||||||
"protocol_url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/44/fnameorig_1764795.html#160",
|
"protocol_url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/44/fnameorig_1764795.html#160",
|
||||||
"raw_text": "44. Sitzung des Nationalrates: Gesetzesvorschlag in dritter Lesung angenommen Dafür: ÖVP, SPÖ, NEOS, GRÜNE, dagegen: FPÖ",
|
"raw_text": "44. Sitzung des Nationalrates: Gesetzesvorschlag in dritter Lesung angenommen Dafür: ÖVP, SPÖ, NEOS, GRÜNE, dagegen: FPÖ",
|
||||||
"result": "accepted",
|
"result": "accepted",
|
||||||
@@ -906,6 +908,7 @@
|
|||||||
},
|
},
|
||||||
"item_ref": "416/A",
|
"item_ref": "416/A",
|
||||||
"key": "bc19d7af2b29acce57bfa6ad139b44c43aacc98a",
|
"key": "bc19d7af2b29acce57bfa6ad139b44c43aacc98a",
|
||||||
|
"part_vote": false,
|
||||||
"protocol_url": "https://www.parlament.gv.at/dokument/BR/BRSITZ/982/fnameorig_1768518.html#45",
|
"protocol_url": "https://www.parlament.gv.at/dokument/BR/BRSITZ/982/fnameorig_1768518.html#45",
|
||||||
"raw_text": "982. Sitzung: Antrag, keinen Einspruch zu erheben, angenommen Dafür: ÖVP, SPÖ, GRÜNE, NEOS, dagegen: FPÖ",
|
"raw_text": "982. Sitzung: Antrag, keinen Einspruch zu erheben, angenommen Dafür: ÖVP, SPÖ, GRÜNE, NEOS, dagegen: FPÖ",
|
||||||
"result": "accepted",
|
"result": "accepted",
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "affiliation",
|
||||||
|
"counterpart_org": null,
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"chamber": "NR",
|
||||||
|
"committee": "Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"function": "Ersatzmitglied",
|
||||||
|
"gp": "XXVIII"
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "api_record",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "ausschuss:XXVIII:Ständiger Unterausschuss des Budgetausschusses:Ersatzmitglied:2024-10-24",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "Parlament: Hannes Amesbauer",
|
||||||
|
"url": "https://www.parlament.gv.at/person/51879"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"parl-committee",
|
||||||
|
"51879",
|
||||||
|
"XXVIII",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"Ersatzmitglied",
|
||||||
|
"2024-10-24"
|
||||||
|
],
|
||||||
|
"occurred_at": null,
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {
|
||||||
|
"parlament": "51879"
|
||||||
|
},
|
||||||
|
"name": null
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "Hannes Amesbauer: Ersatzmitglied, Ständiger Unterausschuss des Budgetausschusses (Nationalrat, XXVIII. GP)",
|
||||||
|
"summary_en": "Hannes Amesbauer: Ersatzmitglied, Ständiger Unterausschuss des Budgetausschusses (Nationalrat, XXVIII legislative period)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": "2024-10-24",
|
||||||
|
"valid_to": "2024-12-18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "affiliation",
|
||||||
|
"counterpart_org": null,
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"chamber": "NR",
|
||||||
|
"committee": "Ständiger Unterausschuss des Hauptausschusses",
|
||||||
|
"function": "Ersatzmitglied",
|
||||||
|
"gp": "XXVIII"
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "api_record",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "ausschuss:XXVIII:Ständiger Unterausschuss des Hauptausschusses:Ersatzmitglied:2024-10-24",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "Parlament: Hannes Amesbauer",
|
||||||
|
"url": "https://www.parlament.gv.at/person/51879"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"parl-committee",
|
||||||
|
"51879",
|
||||||
|
"XXVIII",
|
||||||
|
"Ständiger Unterausschuss des Hauptausschusses",
|
||||||
|
"Ersatzmitglied",
|
||||||
|
"2024-10-24"
|
||||||
|
],
|
||||||
|
"occurred_at": null,
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {
|
||||||
|
"parlament": "51879"
|
||||||
|
},
|
||||||
|
"name": null
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "Hannes Amesbauer: Ersatzmitglied, Ständiger Unterausschuss des Hauptausschusses (Nationalrat, XXVIII. GP)",
|
||||||
|
"summary_en": "Hannes Amesbauer: Ersatzmitglied, Ständiger Unterausschuss des Hauptausschusses (Nationalrat, XXVIII legislative period)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": "2024-10-24",
|
||||||
|
"valid_to": "2024-12-18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Claim",
|
||||||
|
"claim_type": "affiliation",
|
||||||
|
"counterpart_org": null,
|
||||||
|
"counterpart_person": null,
|
||||||
|
"data": {
|
||||||
|
"chamber": "NR",
|
||||||
|
"committee": "Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"function": "Obfrau",
|
||||||
|
"gp": "XXVIII"
|
||||||
|
},
|
||||||
|
"evidence": [
|
||||||
|
{
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "api_record",
|
||||||
|
"excerpt": null,
|
||||||
|
"full_text": null,
|
||||||
|
"locator": "ausschuss:XXVIII:Ständiger Unterausschuss des Budgetausschusses:Obfrau:2024-10-24",
|
||||||
|
"meta": {},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": null,
|
||||||
|
"stance": "supports",
|
||||||
|
"title": "Parlament: Hannes Amesbauer",
|
||||||
|
"url": "https://www.parlament.gv.at/person/51879"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"facet": null,
|
||||||
|
"key": [
|
||||||
|
"parl-committee",
|
||||||
|
"51879",
|
||||||
|
"XXVIII",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"Obfrau",
|
||||||
|
"2024-10-24"
|
||||||
|
],
|
||||||
|
"occurred_at": null,
|
||||||
|
"org": null,
|
||||||
|
"person": {
|
||||||
|
"__type__": "PersonRef",
|
||||||
|
"hints": {},
|
||||||
|
"ids": {
|
||||||
|
"parlament": "51879"
|
||||||
|
},
|
||||||
|
"name": null
|
||||||
|
},
|
||||||
|
"review": false,
|
||||||
|
"sensitive": false,
|
||||||
|
"summary_de": "Hannes Amesbauer: Obfrau, Ständiger Unterausschuss des Budgetausschusses (Nationalrat, XXVIII. GP)",
|
||||||
|
"summary_en": "Hannes Amesbauer: Obfrau, Ständiger Unterausschuss des Budgetausschusses (Nationalrat, XXVIII legislative period)",
|
||||||
|
"topics": [],
|
||||||
|
"valid_from": "2024-10-24",
|
||||||
|
"valid_to": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
{
|
||||||
|
"pages": 1,
|
||||||
|
"count": 4,
|
||||||
|
"header": [
|
||||||
|
{
|
||||||
|
"css_class": "datum-col",
|
||||||
|
"feldId": 92,
|
||||||
|
"hidden": false,
|
||||||
|
"rnr": 1,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "GP",
|
||||||
|
"sortable": "1",
|
||||||
|
"feld_name": "GP",
|
||||||
|
"class": "datum-col"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 93,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 2,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Sort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"css_class": "col-20",
|
||||||
|
"feldId": 94,
|
||||||
|
"hidden": false,
|
||||||
|
"rnr": 3,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Funktion",
|
||||||
|
"feld_name": "FUNKTION",
|
||||||
|
"class": "col-20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"css_class": "fraction-col",
|
||||||
|
"link_rnr": "6",
|
||||||
|
"feldId": 95,
|
||||||
|
"hidden": false,
|
||||||
|
"rnr": 4,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Ausschuss",
|
||||||
|
"class": "fraction-col"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 96,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 5,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "nrbr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 97,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 6,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 98,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 7,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "PAD_INTERN",
|
||||||
|
"feld_name": "PAD_INTERN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 969,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 8,
|
||||||
|
"mediaType": "fromDate",
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "fromDate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 564,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 9,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Ausschuss",
|
||||||
|
"feld_name": "AUSSCHUSS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 565,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 10,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Gremium",
|
||||||
|
"feld_name": "GREMIUM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 584,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 11,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "gp_text_full",
|
||||||
|
"feld_name": "GP_TEXT_FULL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 1645,
|
||||||
|
"hidden": true,
|
||||||
|
"ist_range": "1",
|
||||||
|
"rnr": 12,
|
||||||
|
"mediaType": "datetime",
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Beginn",
|
||||||
|
"feld_name": "BEGINNDATUM_ISO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 1665,
|
||||||
|
"hidden": false,
|
||||||
|
"sort_rnr": 14,
|
||||||
|
"label": "Funktionsbeginn",
|
||||||
|
"sortable": "1",
|
||||||
|
"css_class": "datum-col",
|
||||||
|
"rnr": 13,
|
||||||
|
"listeId": 250,
|
||||||
|
"feld_name": "FUNKTIONSBEGINN",
|
||||||
|
"class": "datum-col"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 1666,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 14,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Beginn4Sort",
|
||||||
|
"feld_name": "BEGINN4SORT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feldId": 1685,
|
||||||
|
"hidden": true,
|
||||||
|
"rnr": 15,
|
||||||
|
"listeId": 250,
|
||||||
|
"label": "Personenregister",
|
||||||
|
"feld_name": "PERSONENREGISTER"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rows": [
|
||||||
|
[
|
||||||
|
"XXVIII",
|
||||||
|
"2Z797589750013220241024STÄNDIGER UNTERAUSSCHUSS DES BUDGETAUSSCHUSSES79758975",
|
||||||
|
"Ersatzmitglied",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses (24.10.2024 - 18.12.2024)",
|
||||||
|
"NR",
|
||||||
|
"/PAKT/VHG/XXVIII/SA-BU/SA-BU_00001_00908/index.shtml",
|
||||||
|
"51879",
|
||||||
|
"Thu Oct 24 02:00:00 CEST 2024",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"Nationalrat",
|
||||||
|
"ab 24.10.2024: XXVIII. Gesetzgebungsperiode des NR",
|
||||||
|
"2024-10-24T00:00:00",
|
||||||
|
"24.10.2024",
|
||||||
|
"20241024",
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"XXVIII",
|
||||||
|
"2Z797589750013220241024STÄNDIGER UNTERAUSSCHUSS DES HAUPTAUSSCHUSSES79758975",
|
||||||
|
"Ersatzmitglied",
|
||||||
|
"Ständiger Unterausschuss des Hauptausschusses (24.10.2024 - 18.12.2024)",
|
||||||
|
"NR",
|
||||||
|
"/PAKT/VHG/XXVIII/SA-HA/SA-HA_00001_00912/index.shtml",
|
||||||
|
"51879",
|
||||||
|
"Thu Oct 24 02:00:00 CEST 2024",
|
||||||
|
"Ständiger Unterausschuss des Hauptausschusses",
|
||||||
|
"Nationalrat",
|
||||||
|
"ab 24.10.2024: XXVIII. Gesetzgebungsperiode des NR",
|
||||||
|
"2024-10-24T00:00:00",
|
||||||
|
"24.10.2024",
|
||||||
|
"20241024",
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"XXVI",
|
||||||
|
"2Z798288900013120171221AUSSCHUSS FÜR KONSUMENTENSCHUTZ79828778",
|
||||||
|
"Mitglied",
|
||||||
|
"Ausschuss für Konsumentenschutz (21.12.2017 - 25.09.2018)",
|
||||||
|
"NR",
|
||||||
|
"/PAKT/VHG/XXVI/A-KO/A-KO_00001_00842/index.shtml",
|
||||||
|
"51879",
|
||||||
|
"Thu Dec 21 01:00:00 CET 2017",
|
||||||
|
"Ausschuss für Konsumentenschutz",
|
||||||
|
"Nationalrat",
|
||||||
|
"09.11.2017 - 22.10.2019: XXVI. Gesetzgebungsperiode des NR",
|
||||||
|
"2017-12-21T00:00:00",
|
||||||
|
"21.12.2017",
|
||||||
|
"20171221",
|
||||||
|
null
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"XXVIII",
|
||||||
|
"2Z797589750013220241024STÄNDIGER UNTERAUSSCHUSS DES BUDGETAUSSCHUSSES79758975",
|
||||||
|
"Obfrau",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses (24.10.2024 - )",
|
||||||
|
"NR",
|
||||||
|
"/PAKT/VHG/XXVIII/SA-BU/SA-BU_00001_00908/index.shtml",
|
||||||
|
"51879",
|
||||||
|
"Thu Oct 24 02:00:00 CEST 2024",
|
||||||
|
"Ständiger Unterausschuss des Budgetausschusses",
|
||||||
|
"Nationalrat",
|
||||||
|
"ab 24.10.2024: XXVIII. Gesetzgebungsperiode des NR",
|
||||||
|
"2024-10-24T00:00:00",
|
||||||
|
"24.10.2024",
|
||||||
|
"20241024",
|
||||||
|
null
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.parlament.gv.at/Filter/api/filter/data/250?js=eval&showAll=true",
|
||||||
|
"kind": "committees",
|
||||||
|
"method": "POST",
|
||||||
|
"params": null,
|
||||||
|
"json": {
|
||||||
|
"PAD_INTERN": [
|
||||||
|
51879
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"pad": "51879",
|
||||||
|
"name": "Hannes Amesbauer"
|
||||||
|
},
|
||||||
|
"content_type": "application/json",
|
||||||
|
"body_file": "committees.json",
|
||||||
|
"run_params": {
|
||||||
|
"periods": [
|
||||||
|
"XXVII",
|
||||||
|
"XXVIII"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
"honorific_prefix": null,
|
"honorific_prefix": null,
|
||||||
"honorific_suffix": null,
|
"honorific_suffix": null,
|
||||||
"match_by_name": false,
|
"match_by_name": false,
|
||||||
|
"match_landtag": null,
|
||||||
"photo_url": "https://www.parlament.gv.at/dokument/bild/201426/20142639_500.jpg",
|
"photo_url": "https://www.parlament.gv.at/dokument/bild/201426/20142639_500.jpg",
|
||||||
"ref": {
|
"ref": {
|
||||||
"__type__": "PersonRef",
|
"__type__": "PersonRef",
|
||||||
@@ -677,5 +678,24 @@
|
|||||||
"params": null,
|
"params": null,
|
||||||
"skip_unchanged": true,
|
"skip_unchanged": true,
|
||||||
"url": "https://www.parlament.gv.at/Filter/api/filter/data/251?js=eval&showAll=true"
|
"url": "https://www.parlament.gv.at/Filter/api/filter/data/251?js=eval&showAll=true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Request",
|
||||||
|
"conditional": true,
|
||||||
|
"headers": null,
|
||||||
|
"json": {
|
||||||
|
"PAD_INTERN": [
|
||||||
|
1977
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"kind": "committees",
|
||||||
|
"meta": {
|
||||||
|
"name": "Tanja Graf",
|
||||||
|
"pad": "1977"
|
||||||
|
},
|
||||||
|
"method": "POST",
|
||||||
|
"params": null,
|
||||||
|
"skip_unchanged": true,
|
||||||
|
"url": "https://www.parlament.gv.at/Filter/api/filter/data/250?js=eval&showAll=true"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Document",
|
||||||
|
"evidence": {
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "protocol",
|
||||||
|
"excerpt": "Abgeordneter Michael Seemayer (SPÖ): Danke, Frau Präsidentin! Frau Staatssekretärin! Als Konsumentenschutzsprecher will ich noch einmal betonen, wie wichtig unsere heimische Landwirtschaft für die Sicherstellung unserer Lebensmittelversorgung ist. (Beifall bei Abgeordneten von SPÖ, ÖVP und Grünen. – Ruf: Oh!) Nur ein hoher Grad an Selbstversorgung bietet Unabhängigkeit und Sicherheit, vor allem…",
|
||||||
|
"full_text": "Abgeordneter Michael Seemayer (SPÖ): Danke, Frau Präsidentin! Frau Staatssekretärin! Als Konsumentenschutzsprecher will ich noch einmal betonen, wie wichtig unsere heimische Landwirtschaft für die Sicherstellung unserer Lebensmittelversorgung ist. (Beifall bei Abgeordneten von SPÖ, ÖVP und Grünen. – Ruf: Oh!) Nur ein hoher Grad an Selbstversorgung bietet Unabhängigkeit und Sicherheit, vor allem in Krisensituationen. Das gilt für die Lebensmittel- wie auch für die Energieversorgung.\nLaut Geosphere Austria war der Sommer 2026 der heißeste und einer der trockensten der Messgeschichte. Der Trend der letzten Jahre zeigt, dass das heurige Jahr kein Ausreißer war, sondern dass damit zu rechnen ist, dass weitere Dürrejahre folgen können. Wir wissen, dass das heurige Dürrejahr in Österreich in der Landwirtschaft Schäden von rund 1 Milliarde Euro angerichtet hat, das bedeutet nicht nur finanzielle Verluste, wir haben auch mit Blick auf die Selbstversorgung mit Lebensmitteln Einbußen gehabt. Daher braucht es eine Reihe von strategischen Maßnahmen. Es braucht Wirtschaftsstrategien, die die Landwirtschaft dabei unterstützen, auf wassersparende Produktionsweisen umzustellen, und es braucht einen Ausbau der überregionalen Wasserinfrastruktur.\nZiel unseres Antrages ist deshalb unter anderem die Erhöhung der Resilienz der Wasserversorgung und die Entwicklung langfristiger Lösungen zur Sicherung der Wasserressourcen der österreichischen Bevölkerung, der Landwirtschaft und der Wirtschaft, damit wir auch in Zukunft einen hohen Grad an Selbstversorgung mit in Österreich produzierten Lebensmitteln sicherstellen können.\nAber genauso wichtig wie die heimische Produktion von Lebensmitteln ist die Frage, wie wir diese Lebensmittel in Österreich verarbeiten können – und genau da haben wir aktuell ein größeres Problem: Das Ardo-Werk in Groß-Enzersdorf mit rund 250 Beschäftigten, in dem Gemüse von über 500 landwirtschaftlichen Betrieben verarbeitet, tiefgefroren und somit haltbar gemacht wird, steht vor dem Aus. Da will ein Konzern – mutmaßlich aus Profitgier – einen funktionierenden, für uns strategisch wichtigen Lebensmittelverarbeitungsbetrieb zusperren.\nDass der Konzern auch eine Übernahme des Werks blockiert und lediglich die Produktion und somit die Wertschöpfung ins Ausland verlagern will, zeigt einmal mehr, dass der Markt nicht alles regelt, wie so manche immer wieder behaupten. Der Markt regelt da gar nichts, da werden Arbeitsplätze vernichtet, Wertschöpfung wird ins Ausland verlagert und unsere Versorgung mit heimischen Lebensmitteln gefährdet. Das können wir nicht brauchen. (Beifall bei der SPÖ.)\nEs geht jetzt um die Kolleginnen und Kollegen, die ihre Arbeit und somit ihr Einkommen verlieren. Es geht um die landwirtschaftlichen Betriebe, die ihre Absatzmöglichkeit verlieren und um die Versorgung mit in Österreich produzierten und verarbeiteten Lebensmitteln. Aussagen wie: Da kann man nichts machen, wenn ein Konzern eine solche Entscheidung trifft!, sind schlicht keine Hilfe. Das ist ein Aufgeben, bevor man gekämpft hat, und das haben sich die Betroffenen nicht verdient. – Danke. (Beifall bei der SPÖ.)\nPräsidentin Doris Bures: Nächster Redner: Herr Abgeordneter Albert Royer. (Abg. Michael Hammer [ÖVP]: Na servas!)",
|
||||||
|
"locator": "",
|
||||||
|
"meta": {
|
||||||
|
"interjections": [
|
||||||
|
"Beifall bei Abgeordneten von SPÖ, ÖVP und Grünen. – Ruf: Oh!",
|
||||||
|
"Beifall bei der SPÖ.",
|
||||||
|
"Beifall bei der SPÖ."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": "parlament",
|
||||||
|
"stance": "supports",
|
||||||
|
"title": null,
|
||||||
|
"url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/103/A_-_13_06_18_01035235.html#48"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Michael Seemayer (SPÖ), 103. Sitzung, XXVIII. GP des NR, 13:06</title>
|
||||||
|
<link rel="stylesheet" href="/static/css/webfonts/lato.css" />
|
||||||
|
<link rel="stylesheet" href="/static/css/stenprot.css" />
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body><p id="48" class="randnummer" title="Michael Seemayer (SPÖ)">RN/48</p><p class="_RB">13.06</p><p><strong>Abgeordneter <a href="https://www.parlament.gv.at/person/5645" target="_blank" class="generated">Michael Seemayer</a></strong> (SPÖ): Danke, Frau Präsidentin! Frau Staatssekretärin! Als Konsumentenschutzsprecher will ich noch einmal betonen, wie wichtig unsere heimische Landwirtschaft für die Sicherstellung unserer Lebensmittelversorgung ist. <i>(</i><i>Beifall bei Abgeordneten von SPÖ, ÖVP und Grünen. – </i><i>Ruf: Oh!</i><i>) </i>Nur ein hoher Grad an Selbstversorgung bietet Unabhängigkeit und Sicherheit, vor allem in Krisensituationen. Das gilt für die Lebensmittel- wie auch für die Energieversorgung. </p><p>Laut Geosphere Austria war der Sommer 2026 der heißeste und einer der trockensten der Messgeschichte. Der Trend der letzten Jahre zeigt, dass das heurige Jahr kein Ausreißer war, sondern dass damit zu rechnen ist, dass weitere Dürrejahre folgen können. Wir wissen, dass das heurige Dürrejahr in Österreich in der Landwirtschaft Schäden von rund 1 Milliarde Euro angerichtet hat, das bedeutet nicht nur finanzielle Verluste, wir haben auch mit Blick auf die Selbstversorgung mit Lebensmitteln Einbußen gehabt. Daher braucht es eine Reihe von strategischen Maßnahmen. Es braucht Wirtschaftsstrategien, die die Landwirtschaft dabei unterstützen, auf wassersparende Produktionsweisen umzustellen, und es braucht einen Ausbau der überregionalen Wasserinfrastruktur. </p><p>Ziel unseres Antrages ist deshalb unter anderem die Erhöhung der Resilienz der Wasserversorgung und die Entwicklung langfristiger Lösungen zur Sicherung der Wasserressourcen der österreichischen Bevölkerung, der Landwirtschaft und der Wirtschaft, damit wir auch in Zukunft einen hohen Grad an Selbstversorgung mit in Österreich produzierten Lebensmitteln sicherstellen können. </p><p>Aber genauso wichtig wie die heimische Produktion von Lebensmitteln ist die Frage, wie wir diese Lebensmittel in Österreich verarbeiten können – und genau da haben wir aktuell ein größeres Problem: Das Ardo-Werk in Groß-Enzersdorf mit rund 250 Beschäftigten, in dem Gemüse von über 500 landwirtschaftlichen Betrieben verarbeitet, tiefgefroren und somit haltbar gemacht wird, steht vor dem Aus. Da will ein Konzern – mutmaßlich aus Profitgier – einen funktionierenden, für uns strategisch wichtigen Lebensmittelverarbeitungsbetrieb zusperren. </p><p>Dass der Konzern auch eine Übernahme des Werks blockiert und lediglich die Produktion und somit die Wertschöpfung ins Ausland verlagern will, zeigt einmal mehr, dass der Markt nicht alles regelt, wie so manche immer wieder behaupten. Der Markt regelt da gar nichts, da werden Arbeitsplätze vernichtet, Wertschöpfung wird ins Ausland verlagert und unsere Versorgung mit heimischen Lebensmitteln gefährdet. Das können wir nicht brauchen. <i>(</i><i>Beifall bei der SPÖ.</i><i>)</i> </p><p>Es geht jetzt um die Kolleginnen und Kollegen, die ihre Arbeit und somit ihr Einkommen verlieren. Es geht um die landwirtschaftlichen Betriebe, die ihre Absatzmöglichkeit verlieren und um die Versorgung mit in Österreich produzierten und verarbeiteten Lebensmitteln. Aussagen wie: Da kann man nichts machen, wenn ein Konzern eine solche Entscheidung trifft!, sind schlicht keine Hilfe. Das ist ein Aufgeben, bevor man gekämpft hat, und das haben sich die Betroffenen nicht verdient. – Danke. <i>(</i><i>Beifall bei der SPÖ.</i><i>)</i></p><p class="_RE">13.10</p><p><strong>Präsidentin <a href="https://www.parlament.gv.at/person/145" target="_blank" class="generated">Doris Bures</a>:</strong> Nächster Redner: Herr Abgeordneter <a href="https://www.parlament.gv.at/person/31991" target="_blank" class="generated">Albert Royer</a>. <i>(Abg. Michael <strong>Hammer</strong> [ÖVP]: Na servas!)</i></p><p class="autorisierungsstatus">Die angezeigte Rede ist noch nicht nach § 52 Abs. 2 GOG-NR autorisiert.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.parlament.gv.at/dokument/XXVIII/NRSITZ/103/A_-_13_06_18_01035235.html",
|
||||||
|
"kind": "protocol",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"anchors": [
|
||||||
|
"48"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"content_type": "text/html; charset=utf-8",
|
||||||
|
"body_file": "fragment.html"
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "Document",
|
||||||
|
"evidence": {
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "protocol",
|
||||||
|
"excerpt": "Abgeordneter Dipl.-Ing. Klaus Hubert Auer (ÖVP): Frau Präsidentin! Frau Ministerin! Herr Vizekanzler! Hohes Haus! Last but not least noch einmal ein kurzer Überblick über die Debatte und über das Gesetz, das zu beschließen ist. Bisher war die Forschungslandschaft in Österreich eine eher zersplitterte mit überholten Strukturen. Ich glaube, das ist Anlass genug, hier wirklich einmal eine Struktur…",
|
||||||
|
"full_text": "Abgeordneter Dipl.-Ing. Klaus Hubert Auer (ÖVP): Frau Präsidentin! Frau Ministerin! Herr Vizekanzler! Hohes Haus! Last but not least noch einmal ein kurzer Überblick über die Debatte und über das Gesetz, das zu beschließen ist.\nBisher war die Forschungslandschaft in Österreich eine eher zersplitterte mit überholten Strukturen. Ich glaube, das ist Anlass genug, hier wirklich einmal eine Struktur zu finden, die durchgängig strukturiert ist. Das Ziel war Effizienz, Modernität und auch Kundenorientiertheit – das ist von meinen Vorrednern schon einige Male erwähnt worden.\nDie drei wichtigsten Maßnahmen waren daher die Errichtung einer eigenen Gesellschaft, also die Zusammenführung von ASA, FFF, BIT und TIG – ich glaube, ich muss diese Begriffe nicht mehr näher ausführen, sie sind oft genug genannt worden – zur Österreichischen Forschungsförderungsgesellschaft, einem einheitlichen Ansprechpartner. Die Ausnutzung von Synergieeffekten et cetera, der Ausbau der FTE-Förderung und die Lukrierung von EU-Mitteln waren wichtig.\nDer zweite Punkt ist der neue, reformierte Wissenschaftsfonds. Dazu gehört auch ein Aufsichtsrat und eine Mehrjahresplanung. Ich glaube, das ist auch ganz wichtig beim Blick in die Zukunft. Dasselbe gilt für den Rat für Forschung und Technologieentwicklung.\nAll das, meine Damen und Herren, basiert auf einer doch gesicherten Finanzierung. Es kommt zu einer massiven Ausweitung der Mittel bis zu 50 Prozent gegenüber dem Jahr 2003 für die Forschungsförderungsgesellschaft, es gibt zusätzlich rund 1,2 Milliarden € für den F & E-Sektor insgesamt. Ich meine auch, dass das Nationalstiftungsgesetz aus dem Jahr 2003 hier als Finanzierungsbasis zu erwähnen ist.\nIch kann Ihnen auch erfolgreiche aktuelle Beispiele nennen für die Forschungslandschaft in Österreich. Infineon Villach wird nächste Woche den Grundstein für ein neues Forschungszentrum legen; es sind immerhin 270 Arbeitskräfte, die dort Arbeit finden. Wild Electronics, eine Firma in Wernberg bei Villach, investiert ebenfalls in die Forschung. Insgesamt haben wir ja bereits 185 000 Beschäftigte im F & E-Bereich, und wir sind drauf und dran, diese Beschäftigtenanzahl mit diesen Maßnahmen zu verstärken.\nMeine Schlussbemerkung: Die Kritikpunkte der SPÖ, dass es für diesen Bereich vier Ministerien gibt, kann ich durchaus entkräften, denn wir sind eben Netzwerker. Unsere zuständigen Minister können durchaus zusammenarbeiten, und das gilt auch für die Beamten, das gilt auch für die Behörden. Daher sehe ich da keinen Nachteil. Ob die SPÖ dem Wunsch eines einzelnen Abgeordneten nach einem eigenen Forschungsministerium nachgekommen wäre, dessen bin ich mir nicht so sicher. Schade, dass hiezu die Zustimmung nicht erfolgt ist.\nIch war am Vormittag verwundert darüber, dass die Zustimmung zur Ausgliederung des BFW, Bundesanstalt und Forschungszentrum für Wald, von Seiten der SPÖ nicht erfolgt ist, denn dabei geht es ja auch um eine Absicherung für die Zukunft, um die Lukrierung von Drittmitteln. Herr Kollege Gradwohl: Ja, das ist nur mit einer Ausgliederung möglich. Ich glaube, die Regierungsparteien ÖVP und Freiheitliche sichern die Forschung für die Zukunft und sichern damit auch den Wirtschaftsstandort Österreich weiterhin ab.\nDaher alles Gute für die neue Forschungsförderungsgesellschaft. – Danke schön. (Beifall bei der ÖVP und den Freiheitlichen.)",
|
||||||
|
"locator": "",
|
||||||
|
"meta": {
|
||||||
|
"interjections": [
|
||||||
|
"Beifall bei der ÖVP und den Freiheitlichen."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": "parlament",
|
||||||
|
"stance": "supports",
|
||||||
|
"title": null,
|
||||||
|
"url": "https://www.parlament.gv.at/dokument/XXII/NRSITZ/67/fnameorig_024808.html#T_067A1930_39_20034545"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "Document",
|
||||||
|
"evidence": {
|
||||||
|
"__type__": "Evidence",
|
||||||
|
"confidence": 1.0,
|
||||||
|
"doc_type": "protocol",
|
||||||
|
"excerpt": "Präsidentin Mag. Barbara Prammer: Zum Wort ist dazu niemand mehr gemeldet. Die Debatte ist geschlossen. Wünscht einer der Berichterstatter/eine der Berichterstatterinnen das Schlusswort? – Das ist nicht der Fall. Damit gelangen wir zur Abstimmung, die ich über jeden Ausschussantrag getrennt vornehme. Zuerst gelangen wir zur Abstimmung über den Entwurf betreffend…",
|
||||||
|
"full_text": "Präsidentin Mag. Barbara Prammer: Zum Wort ist dazu niemand mehr gemeldet. Die Debatte ist geschlossen.\nWünscht einer der Berichterstatter/eine der Berichterstatterinnen das Schlusswort? – Das ist nicht der Fall.\nDamit gelangen wir zur Abstimmung, die ich über jeden Ausschussantrag getrennt vornehme.\nZuerst gelangen wir zur Abstimmung über den Entwurf betreffend Forschungsförderungs-Strukturreformgesetz in 538 der Beilagen.\nHiezu haben die Abgeordneten Dr. Bleckmann, Dr. Brinek, Dr. Grünewald, Kolleginnen und Kollegen einen Zusatz- beziehungsweise Abänderungsantrag eingebracht. Da nur dieser eine Antrag vorliegt, lasse ich sogleich über den Gesetzentwurf unter Berücksichtigung des erwähnten Zusatz- beziehungsweise Abänderungsantrages abstimmen.\nWir kommen zur Abstimmung über den Gesetzentwurf in 538 der Beilagen samt Titel und Eingang unter Berücksichtigung des Zusatz- beziehungsweise Abänderungsantrages der Abgeordneten Dr. Bleckmann, Dr. Brinek, Dr. Grünewald, Kolleginnen und Kollegen.\nIch ersuche jene Damen und Herren, die sich für diesen Gesetzentwurf aussprechen, um ein Zeichen. – Das ist die Mehrheit. Der Antrag ist somit mit Mehrheit angenommen.\nWir kommen sogleich zur dritten Lesung.\nIch bitte jene Damen und Herren, die auch in dritter Lesung für den vorliegenden Gesetzentwurf sind, um ein Zeichen der Zustimmung. – Das ist die Mehrheit. Der Gesetzentwurf ist somit auch in dritter Lesung angenommen.\nWeiters kommen wir zur Abstimmung über den Entwurf betreffend ein Bundesgesetz, mit dem das Forschungsorganisationsgesetz geändert wird, in 539 der Beilagen.\nHiezu haben die Abgeordneten Dr. Brinek, Dr. Bleckmann, Kolleginnen und Kollegen einen Abänderungsantrag eingebracht, der sich auf den Titel, den Einleitungssatz sowie die Ziffer 5 bezieht.\nDa nur dieser eine Antrag vorliegt, lasse ich sogleich über den Gesetzentwurf samt Titel und Eingang in der Fassung des Ausschussberichtes unter Berücksichtigung des Abänderungsantrages der Abgeordneten Dr. Brinek, Dr. Bleckmann, Kolleginnen und Kollegen abstimmen.\nIch ersuche jene Damen und Herren, die hiefür ihre Zustimmung geben, um ein bejahendes Zeichen. – Dies ist einstimmig angenommen.\nWir kommen sogleich zur dritten Lesung.\nIch bitte jene Damen und Herren, die auch in dritter Lesung für den vorliegenden Gesetzentwurf sind, um ein Zeichen der Zustimmung. – Auch hier stelle ich die Einstimmigkeit fest.\nDer Gesetzentwurf ist somit auch in dritter Lesung angenommen.\nFerner gelangen wir zur Abstimmung über den Antrag des Ausschusses für Wissenschaft und Forschung, seinen Bericht 540 der Beilagen zur Kenntnis zu nehmen.\nIch bitte jene Damen und Herren, die hiefür ihre Zustimmung geben, um ein entsprechendes Zeichen. – Dieser Antrag ist mit Mehrheit angenommen.\nNun kommen wir zur Abstimmung über den Antrag des Ausschusses für Wissenschaft und Forschung, seinen Bericht 541 der Beilagen zur Kenntnis zu nehmen.\nIch bitte jene Damen und Herren, die hiefür ihre Zustimmung geben, um ein entsprechendes Zeichen. – Ich stelle die Mehrheit fest. Der Antrag ist somit mit Mehrheit angenommen.\nSchließlich gelangen wir zur Abstimmung über den Antrag des Ausschusses für Wissenschaft und Forschung, seinen Bericht 542 der Beilagen zur Kenntnis zu nehmen.\nIch bitte jene Damen und Herren, die hiezu ihre Zustimmung geben, um ein entsprechendes Zeichen. – Der Antrag ist mit Stimmenmehrheit angenommen.\nDie Tagesordnung ist erschöpft.\nAntrag auf Einsetzung eines Untersuchungsausschusses",
|
||||||
|
"locator": "",
|
||||||
|
"meta": {
|
||||||
|
"interjections": []
|
||||||
|
},
|
||||||
|
"published_at": null,
|
||||||
|
"quote": null,
|
||||||
|
"source": "parlament",
|
||||||
|
"stance": "supports",
|
||||||
|
"title": null,
|
||||||
|
"url": "https://www.parlament.gv.at/dokument/XXII/NRSITZ/67/fnameorig_024808.html#T_067A1930_4476_20185454"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
<html><body>se Verknüpfung zwischen
|
||||||
|
wissenschaftlicher und unternehme­rischer Erfahrung der einzige und richtige
|
||||||
|
Weg ist, um eine positive Zukunft für den Bereich Forschung und
|
||||||
|
Entwicklung sicherzustellen. Ich frage noch einmal die SPÖ, ob Sie es
|
||||||
|
wirklich verantworten können, auf Grund einer einzigen
|
||||||
|
Personalentscheidung diesem Gesetz, diesem wichtigen Gesetz nicht zuzustimmen.
|
||||||
|
Ich dachte, dass wir im Parlament schon weiter sind. <i>(Beifall bei der
|
||||||
|
ÖVP sowie der Abg. Dr. <b>Bleckmann.</b>)</i></p>
|
||||||
|
<p class=RE>19.34</p>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'> </span></b></p>
|
||||||
|
</div>
|
||||||
|
<b><span style='font-size:1.10em;font-family:"Arial","sans-serif";display:none'><br clear=all style='page-break-before:auto'>
|
||||||
|
</span></b>
|
||||||
|
<div class=WordSection467>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'><!--�--></span>Präsidentin
|
||||||
|
<A HREF="/WWER/PAD_04476/index.shtml">Mag. Barbara Prammer</A><span style='display:none'><!--�--></span><a name="T_067A1930_4476_20030303"></a>:</b> Als vorläufig letztem Redner
|
||||||
|
hiezu erteile ich Herrn Abgeordnetem Dipl.-Ing. Auer das Wort. Auch Sie
|
||||||
|
haben sich eine freiwillige Redezeitbeschränkung von 3 Minuten
|
||||||
|
auferlegt. – Bitte.</p>
|
||||||
|
<p class=RB><span style='display:none'> </span></p>
|
||||||
|
</div>
|
||||||
|
<i><span style='font-size:.90em;font-family:"Arial","sans-serif";display:none'><br clear=all style='page-break-before:auto'>
|
||||||
|
</span></i>
|
||||||
|
<div class=WordSection468>
|
||||||
|
<p class=RB>19.34</p>
|
||||||
|
<p class=StandardRB><a name="T_067A1930_39_20034545"></a><b><span style='display:none'><!--�--></span>Abgeordneter <A HREF="/WWER/PAD_14733/index.shtml">Dipl.-Ing. Klaus Hubert
|
||||||
|
Auer</A><span style='display:none'><!--�--></span></b><a name="T_067A1930_14733_20444343"></a>
|
||||||
|
(ÖVP): Frau Präsidentin! Frau Ministerin! Herr Vizekanzler! Hohes
|
||||||
|
Haus! Last but not least noch einmal ein kurzer Überblick über die
|
||||||
|
Debatte und über das Gesetz, das zu beschließen ist. </p>
|
||||||
|
<p class=MsoNormal>Bisher war die Forschungslandschaft in Österreich eine
|
||||||
|
eher zersplitterte mit über­holten Strukturen. Ich glaube, das ist
|
||||||
|
Anlass genug, hier wirklich einmal eine Struktur zu finden, die durchgängig
|
||||||
|
strukturiert ist. Das Ziel war Effizienz, Modernität und auch
|
||||||
|
Kundenorientiertheit – das ist von meinen Vorrednern schon einige
|
||||||
|
Male erwähnt worden.</p>
|
||||||
|
<p class=MsoNormal>Die drei wichtigsten Maßnahmen waren daher die
|
||||||
|
Errichtung einer eigenen Gesell­schaft, also die Zusammenführung
|
||||||
|
von ASA, FFF, BIT und TIG – ich glaube, ich muss diese
|
||||||
|
Begriffe nicht mehr näher ausführen, sie sind oft genug genannt
|
||||||
|
worden – zur Österreichischen
|
||||||
|
Forschungsförderungsgesellschaft, einem einheitlichen Ansprech­part­ner.
|
||||||
|
Die Ausnutzung von Synergieeffekten et cetera, der Ausbau der
|
||||||
|
FTE-Förderung und die Lukrierung von EU-Mitteln waren wichtig.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Der zweite Punkt ist der neue,
|
||||||
|
reformierte Wissenschaftsfonds. Dazu gehört auch ein Aufsichtsrat und eine
|
||||||
|
Mehrjahresplanung. Ich glaube, das ist auch ganz wichtig beim Blick in die
|
||||||
|
Zukunft. Dasselbe gilt für den Rat für Forschung und Technologie­entwicklung.
|
||||||
|
</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>All das, meine Damen und Herren,
|
||||||
|
basiert auf einer doch gesicherten Finanzierung. Es kommt zu einer massiven
|
||||||
|
Ausweitung der Mittel bis zu 50 Prozent gegenüber dem Jahr 2003
|
||||||
|
für die Forschungsförderungsgesellschaft, es gibt zusätzlich
|
||||||
|
rund 1,2 Milliar­den € für den
|
||||||
|
F & E-Sektor insgesamt. Ich meine auch, dass das
|
||||||
|
Nationalstiftungs­gesetz aus dem Jahr 2003 hier als Finanzierungsbasis
|
||||||
|
zu erwähnen ist.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Ich kann Ihnen auch erfolgreiche
|
||||||
|
aktuelle Beispiele nennen für die Forschungsland­schaft in
|
||||||
|
Österreich. Infineon Villach wird nächste Woche den Grundstein
|
||||||
|
für ein neues Forschungszentrum legen; es sind immerhin
|
||||||
|
270 Arbeitskräfte, die dort Arbeit finden. Wild Electronics, eine
|
||||||
|
Firma in Wernberg bei Villach, investiert ebenfalls in die Forschung. Insgesamt
|
||||||
|
haben wir ja bereits 185 000 Beschäftigte im
|
||||||
|
F & E-Bereich, und wir sind drauf und dran, diese
|
||||||
|
Beschäftigtenanzahl mit diesen Maßnahmen zu verstärken.</p>
|
||||||
|
<p class=MsoNormal>Meine Schlussbemerkung: Die Kritikpunkte der SPÖ, dass
|
||||||
|
es für diesen Bereich vier Ministerien gibt, kann ich durchaus
|
||||||
|
entkräften, denn wir sind eben Netzwerker. Unsere zuständigen
|
||||||
|
Minister können durchaus zusammenarbeiten, und das gilt auch für die
|
||||||
|
Beamten, das gilt auch für die Behörden. Daher sehe ich da keinen
|
||||||
|
Nachteil. Ob die SPÖ dem Wunsch eines einzelnen Abgeordneten nach einem
|
||||||
|
eigenen Forschungs­ministerium nachgekommen wäre, dessen bin ich mir
|
||||||
|
nicht so sicher. Schade, dass hiezu die Zustimmung nicht erfolgt ist.</p>
|
||||||
|
<p class=MsoNormal></p>
|
||||||
|
<A NAME="Seite_0205.html"></A><hr><span class="threecol textleft">Nationalrat, XXII.GP</span><span class="threecol textcenter" >Stenographisches Protokoll</span><span class="threecol textright" style="float: right">67. Sitzung / Seite 205</span><hr>
|
||||||
|
<p class=MsoNormal>Ich war am Vormittag verwundert darüber, dass die
|
||||||
|
Zustimmung zur Ausgliederung des BFW, Bundesanstalt und Forschungszentrum
|
||||||
|
für Wald, von Seiten der SPÖ nicht erfolgt ist, denn dabei geht es ja
|
||||||
|
auch um eine Absicherung für die Zukunft, um die Lukrierung von
|
||||||
|
Drittmitteln. Herr Kollege Gradwohl: Ja, das ist nur mit einer Ausgliederung
|
||||||
|
möglich. Ich glaube, die Regierungsparteien ÖVP und Freiheitliche
|
||||||
|
sichern die Forschung für die Zukunft und sichern damit auch den
|
||||||
|
Wirtschaftsstandort Österreich weiterhin ab.</p>
|
||||||
|
<p class=StandardRE>Daher alles Gute für die neue
|
||||||
|
Forschungsförderungsgesellschaft. – Danke schön. <i>(Beifall
|
||||||
|
bei der ÖVP und den Freiheitlichen.)</i></p>
|
||||||
|
<p class=RE>19.38</p>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'> </span></b></p>
|
||||||
|
</div>
|
||||||
|
<b><span style='font-size:1.10em;font-family:"Arial","sans-serif";display:none'><br clear=all style='page-break-before:auto'>
|
||||||
|
</span></b>
|
||||||
|
<div class=WordSection469>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'><!--�--></span>Präsidentin
|
||||||
|
<A HREF="/WWER/PAD_04476/index.shtml">Mag. Barbara Prammer</A><span style='display:none'><!--�--></span><a name="T_067A1930_4476_20185454"></a>:</b> Zum Wort ist dazu niemand mehr
|
||||||
|
gemeldet. Die Debatte ist geschlossen.</p>
|
||||||
|
<p class=MsoNormal>Wünscht einer der Berichterstatter/eine der
|
||||||
|
Berichterstatterinnen das Schlusswort? – Das ist nicht der Fall.</p>
|
||||||
|
<p class=MsoNormal>Damit gelangen wir zur <b><i>Abstimmung,</i></b> die ich
|
||||||
|
über jeden Ausschussantrag getrennt vornehme.</p>
|
||||||
|
<p class=MsoNormal>Zuerst gelangen wir zur Abstimmung über den Entwurf betreffend
|
||||||
|
Forschungs­förderungs-Strukturreformgesetz in <A HREF="/PAKT/VHG/XXII/I/I_00538/index.shtml">538 der Beilagen</A>.</p>
|
||||||
|
<p class=MsoNormal>Hiezu haben die Abgeordneten Dr. Bleckmann,
|
||||||
|
Dr. Brinek, Dr. Grünewald, Kolleginnen und Kollegen einen
|
||||||
|
Zusatz- beziehungsweise Abänderungsantrag eingebracht. Da nur dieser eine
|
||||||
|
Antrag vorliegt, lasse ich sogleich über den Gesetzentwurf unter
|
||||||
|
Berück­sichtigung des erwähnten Zusatz- beziehungsweise
|
||||||
|
Abänderungsantrages abstimmen.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Wir kommen zur Abstimmung über
|
||||||
|
den Gesetzentwurf in <A HREF="/PAKT/VHG/XXII/I/I_00538/index.shtml">538 der Beilagen</A> samt Titel und Eingang unter
|
||||||
|
Berücksichtigung des Zusatz- beziehungsweise Abänderungs­antrages
|
||||||
|
der Abgeordneten Dr. Bleckmann, Dr. Brinek, Dr. Grünewald,
|
||||||
|
Kolleginnen und Kollegen.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Ich ersuche jene Damen und Herren,
|
||||||
|
die sich für diesen Gesetzentwurf aussprechen, um ein
|
||||||
|
Zeichen. – Das ist die Mehrheit. Der Antrag ist somit mit Mehrheit
|
||||||
|
ange­nommen.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Wir kommen sogleich zur dritten
|
||||||
|
Lesung.</p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Ich bitte jene Damen und Herren,
|
||||||
|
die auch in dritter Lesung für den vorliegenden Gesetzentwurf sind, um ein
|
||||||
|
Zeichen der Zustimmung. – Das ist die <b><i>Mehrheit.</i></b> Der
|
||||||
|
Gesetzentwurf ist somit auch in dritter Lesung <b><i>angenommen.</i></b></p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Weiters kommen wir zur Abstimmung
|
||||||
|
über den Entwurf betreffend ein Bundesgesetz, mit dem das
|
||||||
|
Forschungsorganisationsgesetz geändert wird, in <A HREF="/PAKT/VHG/XXII/I/I_00539/index.shtml">539 der Beilagen</A>. </p>
|
||||||
|
<p class=MsoNormal style='margin-top:.80em'>Hiezu haben die Abgeordneten
|
||||||
|
Dr. Brinek, Dr. Bleckmann, Kolleginnen und Kollegen einen
|
||||||
|
Abänderungsantrag eingebracht, der sich auf den Titel, den Einleitungssatz
|
||||||
|
sowie die Ziffer 5 bezieht. </p>
|
||||||
|
<p class=MsoNormal>Da nur dieser eine Antrag vorliegt, lasse ich sogleich
|
||||||
|
über den Gesetzentwurf samt Titel und Eingang in der Fassung des
|
||||||
|
Ausschussberichtes unter Berücksichtigung des Abänderungsantrages der
|
||||||
|
Abgeordneten Dr. Brinek, Dr. Bleckmann, Kolleginnen und Kollegen
|
||||||
|
abstimmen. </p>
|
||||||
|
<p class=MsoNormal>Ich ersuche jene Damen und Herren, die hiefür ihre
|
||||||
|
Zustimmung geben, um ein bejahendes Zeichen. – Dies ist einstimmig
|
||||||
|
angenommen. </p>
|
||||||
|
<p class=MsoNormal>Wir kommen sogleich zur dritten Lesung. </p>
|
||||||
|
<p class=MsoNormal></p>
|
||||||
|
<A NAME="Seite_0206.html"></A><hr><span class="threecol textleft">Nationalrat, XXII.GP</span><span class="threecol textcenter" >Stenographisches Protokoll</span><span class="threecol textright" style="float: right">67. Sitzung / Seite 206</span><hr>
|
||||||
|
<p class=MsoNormal>Ich bitte jene Damen und Herren, die auch in dritter Lesung
|
||||||
|
für den vorliegenden Gesetzentwurf sind, um ein Zeichen der
|
||||||
|
Zustimmung. – Auch hier stelle ich die <b><i>Einstimmigkeit</i></b>
|
||||||
|
fest. </p>
|
||||||
|
<p class=MsoNormal>Der Gesetzentwurf ist somit auch in dritter Lesung <b><i>angenommen.</i></b>
|
||||||
|
</p>
|
||||||
|
<p class=MsoNormal>Ferner gelangen wir zur Abstimmung über den Antrag des
|
||||||
|
Ausschusses für Wissen­schaft und Forschung, seinen Bericht
|
||||||
|
<A HREF="/PAKT/VHG/XXII/I/I_00540/index.shtml">540 der Beilagen</A> zur Kenntnis zu nehmen. </p>
|
||||||
|
<p class=MsoNormal>Ich bitte jene Damen und Herren, die hiefür ihre
|
||||||
|
Zustimmung geben, um ein entsprechendes Zeichen. – Dieser Antrag ist
|
||||||
|
<b><i>mit Mehrheit angenommen. </i></b></p>
|
||||||
|
<p class=MsoNormal>Nun kommen wir zur Abstimmung über den Antrag des
|
||||||
|
Ausschusses für Wissenschaft und Forschung, seinen Bericht <A HREF="/PAKT/VHG/XXII/I/I_00541/index.shtml">541 der
|
||||||
|
Beilagen</A> zur Kenntnis zu nehmen. </p>
|
||||||
|
<p class=MsoNormal>Ich bitte jene Damen und Herren, die hiefür ihre
|
||||||
|
Zustimmung geben, um ein ent­sprechendes Zeichen. – Ich stelle
|
||||||
|
die Mehrheit fest. Der Antrag ist somit <b><i>mit</i></b> <b><i>Mehrheit
|
||||||
|
angenommen.</i></b> </p>
|
||||||
|
<p class=MsoNormal>Schließlich gelangen wir zur Abstimmung über den
|
||||||
|
Antrag des Ausschusses für Wissenschaft und Forschung, seinen Bericht
|
||||||
|
<A HREF="/PAKT/VHG/XXII/I/I_00542/index.shtml">542 der Beilagen</A> zur Kenntnis zu nehmen. </p>
|
||||||
|
<p class=MsoNormal>Ich bitte jene Damen und Herren, die hiezu ihre Zustimmung
|
||||||
|
geben, um ein ent­sprechendes Zeichen. – Der Antrag ist <b><i>mit
|
||||||
|
Stimmenmehrheit angenommen.</i></b></p>
|
||||||
|
<p class=MsoNormal>Die Tagesordnung ist erschöpft.</p>
|
||||||
|
<p class=ZM>Antrag auf Einsetzung eines Untersuchungsausschusses </p>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'> </span></b></p>
|
||||||
|
</div>
|
||||||
|
<b><span style='font-size:1.10em;font-family:"Arial","sans-serif";display:none'><br clear=all style='page-break-before:auto'>
|
||||||
|
</span></b>
|
||||||
|
<div class=WordSection470>
|
||||||
|
<p class=MsoNormal><b><span style='display:none'><!--�--></span>Präsidentin
|
||||||
|
<A HREF="/WWER/PAD_04476/index.shtml">Mag. Barbara Prammer</A><span style='display:none'><!--�--></span><a name="T_067A1940_4476_21270606"></a>:</b> Wir gelangen nunmehr zur Verhandlung
|
||||||
|
über den Antrag der Abgeordneten Dr. Kräuter, Kolleginnen und
|
||||||
|
Kollegen auf Einsetzung eines Untersuchungsausschusses betreffend die
|
||||||
|
Beschaffung von Kampfflugzeugen.</p>
|
||||||
|
<p class=MsoNormal>Dieser Antrag wurde inzwischen an alle Abgeordneten
|
||||||
|
verteilt.</p>
|
||||||
|
<p class=MsoNormal><i>Der Antrag hat folgenden Wortlaut:</i></p>
|
||||||
|
<p class=ZM><i>Antrag</i></p>
|
||||||
|
<p class=MsoNormal><i>der Abgeordneten Dr. Kräuter,
|
||||||
|
Mag. Gaßner und KollegInnen gemäss § 33 GOG
|
||||||
|
betreffend die Einsetzung eines Untersuchungsausschusses</i></p>
|
||||||
|
<p class=MsoNormal><i>Die unterzeichneten Abgeordneten stellen den Antrag,
|
||||||
|
einen Untersuchungsausschuss im Verhältnis V: 5, S: 4, F: 1 und G: 1
|
||||||
|
einzusetzen.</i></p>
|
||||||
|
<p class=ZM><i><span style='font-weight:normal'>Gegenstand der Untersuchung:</span></i></p>
|
||||||
|
<p class=MsoNormal><i>Aufklärung über die Existenz der von
|
||||||
|
Bundeskanzler Schüssel propagierten Wirt­schaftsplattform zur
|
||||||
|
Finanzierung von Kampfflugzeugen sowie mögliche Ergebnisse dieser
|
||||||
|
Plattform;</i></p>
|
||||||
|
<p class=MsoNormal><i>Aufklärung der Vorwürfe möglicher
|
||||||
|
Geldflüsse, „nützlicher Aufwendungen“ und Mani­pulationen
|
||||||
|
des Vergabeverf</body></html>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"url": "https://www.parlament.gv.at/dokument/XXII/NRSITZ/67/fnameorig_024808.html",
|
||||||
|
"kind": "protocol",
|
||||||
|
"method": "GET",
|
||||||
|
"params": null,
|
||||||
|
"json": null,
|
||||||
|
"meta": {
|
||||||
|
"anchors": [
|
||||||
|
"T_067A1930_39_20034545",
|
||||||
|
"T_067A1930_4476_20185454"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"content_type": "text/html; charset=utf-8",
|
||||||
|
"body_file": "protocol.html"
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
from politrack.enrich.events import detect
|
from datetime import date
|
||||||
|
|
||||||
|
from politrack.enrich.events import detect, event_date
|
||||||
from politrack.enrich.legal import classify
|
from politrack.enrich.legal import classify
|
||||||
from politrack.enrich.linker import OFFICE_TITLE
|
from politrack.enrich.linker import OFFICE_TITLE
|
||||||
from politrack.sources.parlament.common import parse_immunity_report, parse_roll_call
|
from politrack.sources.parlament.common import parse_immunity_report, parse_roll_call
|
||||||
@@ -96,3 +98,40 @@ def test_office_title_surname():
|
|||||||
assert names == ["Stocker", "Bauer", "Mikl-Leitner"]
|
assert names == ["Stocker", "Bauer", "Mikl-Leitner"]
|
||||||
# A first name after the title must not be taken for a surname.
|
# A first name after the title must not be taken for a surname.
|
||||||
assert [m.group("surname") for m in OFFICE_TITLE.finditer("Nationalratspräsident Walter Rosenkranz")] == []
|
assert [m.group("surname") for m in OFFICE_TITLE.finditer("Nationalratspräsident Walter Rosenkranz")] == []
|
||||||
|
|
||||||
|
|
||||||
|
def test_event_date_from_the_sentence():
|
||||||
|
published = date(2026, 11, 12) # a Thursday
|
||||||
|
assert event_date("Die Ministerin reiste gestern nach Brüssel", published) == date(2026, 11, 11)
|
||||||
|
assert event_date("Der Kanzler empfängt heute den Premier", published) == published
|
||||||
|
assert event_date("Am Montag traf sie den Botschafter", published) == date(2026, 11, 9)
|
||||||
|
assert event_date("am Samstag reist er nach Rom", published) == date(2026, 11, 14)
|
||||||
|
assert event_date("Treffen am 3. November in Paris", published) == date(2026, 11, 3)
|
||||||
|
assert event_date("Gipfel am 28. Dezember 2025", published) is None # too far from publication
|
||||||
|
assert event_date("Besuch in Wien am 10.11.2026", published) == date(2026, 11, 10)
|
||||||
|
assert event_date("Treffen am 2. Jänner", date(2026, 12, 20)) == date(2027, 1, 2) # year closest to publication
|
||||||
|
assert event_date("Arbeitsbesuch in Israel", published) is None
|
||||||
|
assert event_date("die Morgen-Ausgabe", published) is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_event_records_use_the_date_from_the_sentence():
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
from politrack.core.records import Claim, Event
|
||||||
|
from politrack.enrich.events import event_records
|
||||||
|
|
||||||
|
class Conn:
|
||||||
|
def execute(self, *_):
|
||||||
|
class Row:
|
||||||
|
def fetchone(self):
|
||||||
|
return {"full_name": "Beate Meinl-Reisinger", "family_name": "Meinl-Reisinger"}
|
||||||
|
return Row()
|
||||||
|
|
||||||
|
doc = {"published_at": datetime(2026, 11, 12, 9, tzinfo=timezone.utc), "url": "https://example.org/x",
|
||||||
|
"source": "bundesregierung", "title": "Besuch"}
|
||||||
|
ev = {"kind": "foreign_trip", "claim_type": "travel", "place": "Brüssel", "country": "BE"}
|
||||||
|
records = list(event_records(Conn(), doc, 1, ev, "Die Außenministerin reiste gestern nach Brüssel", True))
|
||||||
|
event = next(r for r in records if isinstance(r, Event))
|
||||||
|
claim = next(r for r in records if isinstance(r, Claim))
|
||||||
|
assert event.starts_at == claim.occurred_at == date(2026, 11, 11)
|
||||||
|
assert claim.data["date_precision"] == "day"
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
"""Landtag member-list parsers, on snippets of each Landtag's real markup (pages fetched November 2026)."""
|
||||||
|
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
|
from politrack.sources import landtage as L
|
||||||
|
|
||||||
|
|
||||||
|
def test_clean_name_drops_functions_and_titles_but_not_names():
|
||||||
|
assert L.clean_name("KO Mag. Markus Abwerzger") == "Markus Abwerzger"
|
||||||
|
assert L.clean_name("Dipl. Päd., DI Carina Laschober-Luif") == "Carina Laschober-Luif"
|
||||||
|
assert L.clean_name("Mag. a Astrid Eisenkopf") == "Astrid Eisenkopf"
|
||||||
|
assert L.clean_name("Ingrid Korosec") == "Ingrid Korosec" # "Ing" is a title, "Ingrid" is not
|
||||||
|
assert L.clean_name("Portraitfoto von Simon Heilig-Hofbauer") == "Simon Heilig-Hofbauer"
|
||||||
|
assert L.clean_name("LTP Jakob Wolf") == "Jakob Wolf"
|
||||||
|
assert L.clean_name("MMst. Doris Schmidl") == "Doris Schmidl"
|
||||||
|
assert L.clean_name("Claudia Gamon, MSc (WU)") == "Claudia Gamon"
|
||||||
|
assert L.clean_name("Johannes" + chr(0x200B) + " Schwarz") == "Johannes Schwarz"
|
||||||
|
assert L.clean_name("Michael J. Fox") == "Michael J. Fox" # initials stay
|
||||||
|
assert L.surname_first("Höglinger Tobias, Mag.") == "Tobias Höglinger"
|
||||||
|
assert L.surname_first("EISEL-EISELSBERG Detlev") == "Detlev Eisel-Eiselsberg"
|
||||||
|
|
||||||
|
|
||||||
|
def test_noe_profile():
|
||||||
|
html = """<html><body><h1>Otto Auer</h1><h2>Lebenslauf</h2><p>Geb.: 04.01.1966 , Hainburg/Donau Beruf: Landwirt
|
||||||
|
Wahlkreis: Bruck an der Leitha Klub/Fraktion: Landtagsklub der Volkspartei Niederösterreich</p>
|
||||||
|
<table><tr><td>Abgeordneter zum NÖ Landtag ( ÖVP )</td><td>seit 23.03.2023</td></tr></table></body></html>"""
|
||||||
|
m = L.parse_noe_profile(html, "https://noe-landtag.gv.at/personen/otto_auer")
|
||||||
|
assert (m["name"], m["id"], m["party"], m["district"]) == ("Otto Auer", "otto_auer", "ÖVP", "Bruck an der Leitha")
|
||||||
|
assert (m["since"], m["birth_date"]) == (date(2023, 3, 23), date(1966, 1, 4))
|
||||||
|
|
||||||
|
|
||||||
|
def test_ooe():
|
||||||
|
html = """<ul><li class="list-item" data-groups="GRÜNE" data-title="Huber-Reiter Brigitte" data-partei="GRÜNE">
|
||||||
|
<h4><a href="/abg/huber">Huber-Reiter Brigitte</a></h4><p>Betriebsratsvorsitzende</p>
|
||||||
|
<p class="mb-2">Bezirk Ried<br> Wahlkreis 2 - Innviertel</p>
|
||||||
|
<p class="mb-0">Mitglied des Landtags seit <span class="text-nowrap">13. November 2025</span></p></li></ul>"""
|
||||||
|
[m] = L.parse_ooe(html, "https://www.land-oberoesterreich.gv.at/12748.htm")
|
||||||
|
assert (m["name"], m["party"], m["district"], m["since"]) == ("Brigitte Huber-Reiter", "GRÜNE", "Innviertel",
|
||||||
|
date(2025, 11, 13))
|
||||||
|
|
||||||
|
|
||||||
|
def test_stmk_tirol_vbg():
|
||||||
|
stmk = """<table><tr><td><a href="/cms/dokumente/1/AMON%20Werner.pdf">AMON Werner, MBA</a></td><td> ÖVP</td></tr>
|
||||||
|
</table>"""
|
||||||
|
assert [(m["name"], m["party"]) for m in L.parse_stmk(stmk, "https://x")] == [("Werner Amon", "ÖVP")]
|
||||||
|
tirol = """<img alt="KO Mag. Markus Abwerzger (FPÖ)"><img alt="Christoph Appler (VP Tirol)">
|
||||||
|
<img alt="Dr. Georg Dornauer (kein Klub)">"""
|
||||||
|
assert [(m["name"], m["party"]) for m in L.parse_tirol(tirol, "https://x")] == [
|
||||||
|
("Markus Abwerzger", "FPÖ"), ("Christoph Appler", "ÖVP"), ("Georg Dornauer", None)]
|
||||||
|
vbg = """<div class="avlr-standard-ap-mit-bild"><a href="https://vorarlberg.at/web/landtag/-/auer-manuela">
|
||||||
|
<figcaption>Bildrechte: mathis.studio</figcaption></a><h3>Mag. (FH) Manuela Auer</h3>
|
||||||
|
<div>Landtagsabgeordnete (SPÖ)</div></div>"""
|
||||||
|
assert [(m["name"], m["id"], m["party"]) for m in L.parse_vbg(vbg, "https://x")] == [
|
||||||
|
("Manuela Auer", "auer-manuela", "SPÖ")]
|
||||||
|
|
||||||
|
|
||||||
|
def test_sbg_bgld():
|
||||||
|
sbg = """<ul><li><a href="/pol/landtag/lt-klubs/politiker-detail-view/pallauf-brigitta">
|
||||||
|
<img alt="Brigitta Pallauf"></a></li></ul>"""
|
||||||
|
assert [(m["name"], m["id"], m["party"]) for m in L.parse_sbg_club(sbg, "https://x", "ÖVP")] == [
|
||||||
|
("Brigitta Pallauf", "pallauf-brigitta", "ÖVP")]
|
||||||
|
bgld = """<p>SPÖ-Abgeordnete zum Bgld. Landtag Gerhard Bachmann Landtagsabgeordneter SPÖ 2423 Deutsch Jahrndorf
|
||||||
|
gerhard.bachmann@spoeklub-bgld.at Mag. a Astrid Eisenkopf Landtagspräsidentin SPÖ 7035 Steinbrunn
|
||||||
|
astrid.eisenkopf@bgld-landtag.at Claudia Schlager 3. Landtagspräsidentin SPÖ 7210 Mattersburg x@y.at</p>"""
|
||||||
|
members = L.parse_bgld(bgld, "https://x")
|
||||||
|
assert [(m["name"], m["party"]) for m in members] == [
|
||||||
|
("Gerhard Bachmann", "SPÖ"), ("Astrid Eisenkopf", "SPÖ"), ("Claudia Schlager", "SPÖ")]
|
||||||
|
assert all(m["district"] is None for m in members) # postal addresses are never kept
|
||||||
|
|
||||||
|
|
||||||
|
def test_robots_excluded_states_have_no_adapter():
|
||||||
|
from politrack.core.registry import ADAPTERS
|
||||||
|
assert "landtag.wien" not in ADAPTERS and "landtag.ktn" not in ADAPTERS
|
||||||
|
assert "landtag.bgld" in ADAPTERS
|
||||||
|
|
||||||
|
|
||||||
|
def test_name_variants_and_sharp_s():
|
||||||
|
from politrack.core.resolve import variant_of
|
||||||
|
from politrack.text import normalize
|
||||||
|
assert normalize("Klaudia Stroißnig") == normalize("Klaudia Stroissnig")
|
||||||
|
for listed, known in [("Rudi Hemetsberger", "Rudolf Hemetsberger"), ("Max Hiegelsberger", "Maximilian Hiegelsberger"),
|
||||||
|
("Chiara-Sophia Glawogger", "Chiara Glawogger"), ("Helena Kirchmayr-Felbermaier", "Helena Kirchmayr"),
|
||||||
|
("Michael Stefan Wagner", "Michael Wagner"), ("Gebi Mair", "Gebhard Mair")]:
|
||||||
|
assert variant_of(listed, known), (listed, known)
|
||||||
|
for listed, known in [("Michael Weber", "Michael Huber"), ("Doris Kampus", "Doris Hahn"), ("Jo Mair", "Josef Mair")]:
|
||||||
|
assert not variant_of(listed, known), (listed, known)
|
||||||
@@ -158,3 +158,62 @@ def test_parlament_calendar_titles_are_html_decoded():
|
|||||||
params={"since_year": 2026})
|
params={"since_year": 2026})
|
||||||
assert [e.title for e in events] == ["84. Sitzung des Nationalrates"]
|
assert [e.title for e in events] == ["84. Sitzung des Nationalrates"]
|
||||||
assert events[0].description == "Plenarsitzung NR"
|
assert events[0].description == "Plenarsitzung NR"
|
||||||
|
|
||||||
|
|
||||||
|
def test_procurement_rejects_implausible_award_dates():
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
|
from politrack.sources.procurement import plausible_date
|
||||||
|
|
||||||
|
today = date(2026, 11, 13)
|
||||||
|
assert plausible_date("2025-02-17", today) == date(2025, 2, 17)
|
||||||
|
assert plausible_date("1900-12-30", today) is None # spreadsheet placeholder
|
||||||
|
assert plausible_date("2028-09-30", today) is None # the contract's end, not its award
|
||||||
|
assert plausible_date(None, today) is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_procurement_placeholder_contractor_and_framework_buyer():
|
||||||
|
from politrack.sources.procurement import buyer_name, org_ref
|
||||||
|
|
||||||
|
assert org_ref({"name": "-"}, "company") is None
|
||||||
|
assert org_ref({"name": " n/a "}, "company") is None
|
||||||
|
assert org_ref({"name": "Swietelsky AG"}, "company").name == "Swietelsky AG"
|
||||||
|
sentence = ("Auftraggeber sind die Republik Österreich (Bund), die Bundesbeschaffung GmbH sowie alle weiteren "
|
||||||
|
"Auftraggeber gemäß der den Ausschreibungsunterlagen beiliegenden Liste")
|
||||||
|
assert buyer_name(sentence) == ("Bundesbeschaffung GmbH", sentence)
|
||||||
|
assert buyer_name("ASFINAG Alpenstraßen GmbH") == ("ASFINAG Alpenstraßen GmbH", None)
|
||||||
|
|
||||||
|
|
||||||
|
def test_source_freshness_alerts_after_two_missed_slots():
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
from politrack.queries.admin import source_freshness
|
||||||
|
|
||||||
|
class Conn:
|
||||||
|
def __init__(self, rows):
|
||||||
|
self.rows = rows
|
||||||
|
|
||||||
|
def execute(self, *_):
|
||||||
|
return self.rows
|
||||||
|
|
||||||
|
now = datetime(2026, 11, 13, 12, 0, tzinfo=timezone.utc)
|
||||||
|
daily = "15 3 * * *"
|
||||||
|
rows = [{"adapter": "fresh", "at": datetime(2026, 11, 13, 3, 40, tzinfo=timezone.utc)},
|
||||||
|
{"adapter": "one_missed", "at": datetime(2026, 11, 12, 3, 40, tzinfo=timezone.utc)},
|
||||||
|
{"adapter": "two_missed", "at": datetime(2026, 11, 11, 3, 40, tzinfo=timezone.utc)}]
|
||||||
|
result = {r["adapter"]: r["stale"] for r in source_freshness(
|
||||||
|
Conn(rows), {"fresh": daily, "one_missed": daily, "two_missed": daily, "never": daily}, now)}
|
||||||
|
assert result == {"fresh": False, "one_missed": False, "two_missed": True, "never": True}
|
||||||
|
|
||||||
|
|
||||||
|
def test_election_preferences_eu_layouts():
|
||||||
|
from politrack.sources.elections import parse_preferences, split_name
|
||||||
|
|
||||||
|
assert split_name("Babler, MSc, Andreas") == ("Babler", "Andreas")
|
||||||
|
assert split_name("Brunner, Dr. Magnus") == ("Brunner", "Dr. Magnus")
|
||||||
|
eu2019 = [("ÖVP", [(None, "Kandidat(in)", "BGLD", "Gesamt"), (1, "Karas, Dr. Othmar ", 3012, 103035)])]
|
||||||
|
eu2024 = [("ÖVP", [("LP", "Bewerber(in)", "BGLD", "Gesamt", None, "Darstellung", None, None),
|
||||||
|
(None, None, None, None, None, "(LP)", "Bewerber(in)", "Gesamt"),
|
||||||
|
(1, "Lopatka, Dr. Reinhold", 2268, 58013, None, 3, "Bernhuber, Alexander", 44641)])]
|
||||||
|
assert [(c["name"], c["votes"]) for c in parse_preferences("eu", eu2019)] == [("Dr. Othmar Karas", 103035)]
|
||||||
|
assert [(c["name"], c["votes"]) for c in parse_preferences("eu", eu2024)] == [("Dr. Reinhold Lopatka", 58013)]
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Nightly database backup, run by the `backup` service in docker-compose.yml.
|
||||||
|
# Writes politrack-YYYY-MM-DD.dump (pg_dump custom format) to /backups at 02:30 UTC, deletes dumps older than
|
||||||
|
# $BACKUP_KEEP_DAYS days, and records each attempt as a run of "backup", so /api/v1/status/sources alerts
|
||||||
|
# when backups stop. Restore: pg_restore -h <host> -U politrack -d politrack --clean <file>
|
||||||
|
set -u
|
||||||
|
KEEP="${BACKUP_KEEP_DAYS:-14}"
|
||||||
|
export PGHOST=db PGUSER=politrack PGDATABASE=politrack
|
||||||
|
|
||||||
|
record() { # record <status> <json stats>
|
||||||
|
psql -q -c "INSERT INTO run (adapter, mode, status, finished_at, stats) VALUES ('backup', 'backup', '$1', now(), '$2'::jsonb)" \
|
||||||
|
|| echo "could not record the backup run"
|
||||||
|
}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
now=$(date -u +%s)
|
||||||
|
next=$(date -u -d "today 02:30" +%s)
|
||||||
|
[ "$next" -le "$now" ] && next=$(date -u -d "tomorrow 02:30" +%s)
|
||||||
|
echo "next backup at $(date -u -d "@$next")"
|
||||||
|
sleep $((next - now))
|
||||||
|
|
||||||
|
file="/backups/politrack-$(date -u +%F).dump"
|
||||||
|
if pg_dump -Fc -f "$file.tmp" && mv "$file.tmp" "$file"; then
|
||||||
|
size=$(stat -c %s "$file")
|
||||||
|
echo "backup ok: $file ($size bytes)"
|
||||||
|
record ok "{\"file\": \"$(basename "$file")\", \"bytes\": $size}"
|
||||||
|
else
|
||||||
|
rm -f "$file.tmp"
|
||||||
|
echo "backup FAILED"
|
||||||
|
record error '{}'
|
||||||
|
fi
|
||||||
|
find /backups -name 'politrack-*.dump' -mtime "+$KEEP" -delete
|
||||||
|
done
|
||||||
+27
-1
@@ -9,9 +9,12 @@ x-backend: &backend
|
|||||||
environment:
|
environment:
|
||||||
POLITRACK_DATABASE_URL: postgresql://politrack:${POSTGRES_PASSWORD}@db:5432/politrack
|
POLITRACK_DATABASE_URL: postgresql://politrack:${POSTGRES_PASSWORD}@db:5432/politrack
|
||||||
POLITRACK_RAW_DIR: /data/raw
|
POLITRACK_RAW_DIR: /data/raw
|
||||||
|
POLITRACK_LOG_DIR: /data/logs
|
||||||
volumes:
|
volumes:
|
||||||
# Raw-response archive: lets `politrack reparse` rebuild data after parser fixes without refetching.
|
# Raw-response archive: lets `politrack reparse` rebuild data after parser fixes without refetching.
|
||||||
- ${DATA_DIR:-./data}/raw:/data/raw
|
- ${DATA_DIR:-./data}/raw:/data/raw
|
||||||
|
# Worker logs (<service>.log, rotating), kept across redeploys.
|
||||||
|
- ${DATA_DIR:-./data}/logs:/data/logs
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -62,15 +65,33 @@ services:
|
|||||||
# another machine pointed at this database.
|
# another machine pointed at this database.
|
||||||
worker-scrape:
|
worker-scrape:
|
||||||
<<: *worker
|
<<: *worker
|
||||||
|
hostname: worker-scrape # names the log file
|
||||||
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=scrape,social", "--concurrency=2"]
|
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=scrape,social", "--concurrency=2"]
|
||||||
|
|
||||||
worker-bulk:
|
worker-bulk:
|
||||||
<<: *worker
|
<<: *worker
|
||||||
|
hostname: worker-bulk
|
||||||
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=bulk", "--concurrency=1"]
|
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=bulk", "--concurrency=1"]
|
||||||
|
|
||||||
worker-enrich:
|
worker-enrich:
|
||||||
<<: *worker
|
<<: *worker
|
||||||
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=enrich", "--concurrency=1"]
|
hostname: worker-enrich
|
||||||
|
command: ["procrastinate", "--app=politrack.worker.app", "worker", "--queues=enrich", "--concurrency=2"]
|
||||||
|
|
||||||
|
# Nightly pg_dump at 02:30 UTC into ${BACKUP_DIR}, kept for ${BACKUP_KEEP_DAYS} days (see backup.sh).
|
||||||
|
backup:
|
||||||
|
image: pgvector/pgvector:pg16
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
PGPASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
BACKUP_KEEP_DAYS: ${BACKUP_KEEP_DAYS:-14}
|
||||||
|
volumes:
|
||||||
|
- ./backup.sh:/backup.sh:ro
|
||||||
|
- ${BACKUP_DIR:-./data/backups}:/backups
|
||||||
|
entrypoint: ["sh", "/backup.sh"]
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
mcp:
|
mcp:
|
||||||
<<: *worker
|
<<: *worker
|
||||||
@@ -84,6 +105,11 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
API_INTERNAL_URL: http://api:8000
|
API_INTERNAL_URL: http://api:8000
|
||||||
|
POLITRACK_USER_AGENT: ${POLITRACK_USER_AGENT:-}
|
||||||
|
POLITRACK_LEGAL_NAME: ${POLITRACK_LEGAL_NAME:-}
|
||||||
|
POLITRACK_LEGAL_ADDRESS: ${POLITRACK_LEGAL_ADDRESS:-}
|
||||||
|
POLITRACK_LEGAL_EMAIL: ${POLITRACK_LEGAL_EMAIL:-}
|
||||||
|
POLITRACK_CORRECTIONS_EMAIL: ${POLITRACK_CORRECTIONS_EMAIL:-}
|
||||||
ports:
|
ports:
|
||||||
- "${WEB_PORT:-3000}:3000"
|
- "${WEB_PORT:-3000}:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ a permalink shows the same to everyone.
|
|||||||
from the home page's "Entdecken" cards.
|
from the home page's "Entdecken" cards.
|
||||||
4. Page modules may only export Next.js page fields (`default`, `generateMetadata`, …); keep helpers and
|
4. Page modules may only export Next.js page fields (`default`, `generateMetadata`, …); keep helpers and
|
||||||
constants module-local or in `src/components`.
|
constants module-local or in `src/components`.
|
||||||
5. Check it at 390 px and in both themes (design-system.md §7).
|
5. Check it at 390 px and in both themes (design-system.md §7). `node web/scripts/mobile-audit.mjs` emulates a
|
||||||
|
phone, reports pages that scroll sideways (and which elements cause it) and saves screenshots; the
|
||||||
|
script's header shows how to call it. All pages passed on 2026-11-12.
|
||||||
|
|
||||||
## Showing a new claim type
|
## Showing a new claim type
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -69,8 +69,12 @@ counterpart (`counterpart_person_id`, `counterpart_org_id`), time (`occurred_at`
|
|||||||
| `government_decision` | – | Council of Ministers minutes |
|
| `government_decision` | – | Council of Ministers minutes |
|
||||||
| `wiki_edit` | – | Wikipedia edits from institutional IP ranges (subject = network owner) |
|
| `wiki_edit` | – | Wikipedia edits from institutional IP ranges (subject = network owner) |
|
||||||
| `declaration` | – | EP declarations of interests |
|
| `declaration` | – | EP declarations of interests |
|
||||||
| `ownership`, `affiliation` | – | party reports (holdings, affiliated organisations) |
|
| `ownership`, `affiliation` | – | party reports (holdings, affiliated organisations), committee memberships |
|
||||||
| `party_finance` | – | party annual reports (totals in `data`) |
|
| `party_finance` | – | party annual reports (totals in `data`) |
|
||||||
|
| `election_result` | – | BMI: a party's votes in Austria or a state (counterpart = elected body), a candidate's preference votes (counterpart = party) |
|
||||||
|
|
||||||
|
EP votes on amendments and parts of a text: `vote_event.part_vote` and `claim.data.part_vote` are true; general
|
||||||
|
lists, counts and search chunks leave them out (`NOT_PART_VOTE` in `queries/common.py`).
|
||||||
|
|
||||||
**Status:** `reported` (one source) → `corroborated` (≥ 2 distinct sources support/mention it) or
|
**Status:** `reported` (one source) → `corroborated` (≥ 2 distinct sources support/mention it) or
|
||||||
`disputed` (a source contradicts). Computed by the Loader on every new piece of evidence and by
|
`disputed` (a source contradicts). Computed by the Loader on every new piece of evidence and by
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
docker compose build
|
docker compose build
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
Docker creates `${DATA_DIR}/raw` as root, but the backend runs as a non-root user, and every fetch
|
Docker creates `${DATA_DIR}/raw` and `${DATA_DIR}/logs` as root, but the backend runs as a non-root user, and
|
||||||
then fails with "Permission denied". Hand it over once after the first `up`:
|
every fetch then fails with "Permission denied". Hand them over once after the first `up`:
|
||||||
`chown -R "$(docker run --rm --entrypoint id politrack-backend -u):$(docker run --rm --entrypoint id politrack-backend -g)" "$DATA_DIR/raw"`.
|
`chown -R "$(docker run --rm --entrypoint id politrack-backend -u):$(docker run --rm --entrypoint id politrack-backend -g)" "$DATA_DIR/raw" "$DATA_DIR/logs"`.
|
||||||
|
|
||||||
`migrate` runs once (schema, seed data, source registry, job-queue tables), then `api`, `web`, `mcp`
|
`migrate` runs once (schema, seed data, source registry, job-queue tables), then `api`, `web`, `mcp`
|
||||||
and three workers start:
|
and three workers start:
|
||||||
@@ -76,11 +76,11 @@ bge-m3 runs fine on CPU for this data volume. With an NVIDIA GPU, add a device r
|
|||||||
|
|
||||||
## Backups
|
## Backups
|
||||||
|
|
||||||
* Database: a nightly `pg_dump`, e.g. with the **User Scripts** plugin:
|
* Database: the `backup` service dumps it every night at 02:30 UTC to `BACKUP_DIR` (default `./data/backups`;
|
||||||
```bash
|
better a different share, e.g. `/mnt/user/backups/politrack`) and keeps `BACKUP_KEEP_DAYS` (14) days. Each dump is
|
||||||
docker exec politrack-db-1 pg_dump -U politrack -Fc politrack > /mnt/user/backups/politrack/$(date +%F).dump
|
recorded as a run of `backup`, so the status endpoint below alerts when backups stop. Restore with
|
||||||
find /mnt/user/backups/politrack -mtime +30 -delete
|
`pg_restore -h localhost -p 5433 -U politrack -d politrack --clean <file>`. For off-site copies, sync `BACKUP_DIR`
|
||||||
```
|
elsewhere.
|
||||||
* Raw archive (`${DATA_DIR}/raw`): optional to back up – it saves refetching after parser fixes, and it can
|
* Raw archive (`${DATA_DIR}/raw`): optional to back up – it saves refetching after parser fixes, and it can
|
||||||
be pruned (`find raw -mtime +365 -delete`); missing blobs are simply refetched.
|
be pruned (`find raw -mtime +365 -delete`); missing blobs are simply refetched.
|
||||||
|
|
||||||
@@ -96,7 +96,13 @@ bge-m3 runs fine on CPU for this data volume. With an NVIDIA GPU, add a device r
|
|||||||
* `GET /api/v1/admin/runs` with `Authorization: Bearer $POLITRACK_ADMIN_TOKEN`.
|
* `GET /api/v1/admin/runs` with `Authorization: Bearer $POLITRACK_ADMIN_TOKEN`.
|
||||||
* Fetch log: `SELECT adapter, status, count(*) FROM fetch_log WHERE fetched_at > now() - interval '1 day' GROUP BY 1, 2;`
|
* Fetch log: `SELECT adapter, status, count(*) FROM fetch_log WHERE fetched_at > now() - interval '1 day' GROUP BY 1, 2;`
|
||||||
* Job queue: `SELECT task_name, status, count(*) FROM procrastinate_jobs GROUP BY 1, 2;`
|
* Job queue: `SELECT task_name, status, count(*) FROM procrastinate_jobs GROUP BY 1, 2;`
|
||||||
* Uptime Kuma can poll `http://api:8000/healthz`.
|
* `GET /api/v1/status/sources` returns HTTP 503 as soon as a scheduled source (or the backup) missed its last two
|
||||||
|
slots, and lists every task with its last successful run: point an HTTP monitor (Uptime Kuma) at it.
|
||||||
|
`/healthz` only checks that the API reaches the database.
|
||||||
|
* The `watchdog` task (every 10 minutes) fails jobs of dead workers, closes abandoned runs and starts any scheduled
|
||||||
|
source whose last slot was missed (Procrastinate skips slots that are more than ten minutes overdue).
|
||||||
|
* Worker logs: `${DATA_DIR}/logs/worker-*.log` (rotating), kept across redeploys; `docker compose logs` only covers
|
||||||
|
the current containers.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
+19
-10
@@ -32,7 +32,17 @@ Next.js frontend (de/en), Docker Compose for Unraid.
|
|||||||
- [x] Social: Bluesky, Mastodon, public Telegram channels, YouTube (key), X via official API (token);
|
- [x] Social: Bluesky, Mastodon, public Telegram channels, YouTube (key), X via official API (token);
|
||||||
party/institution channels; curated `social_accounts.yaml`
|
party/institution channels; curated `social_accounts.yaml`
|
||||||
- [x] X deletion sync (`social.x_deletions`): posts gone from X keep a marked record without their text
|
- [x] X deletion sync (`social.x_deletions`): posts gone from X keep a marked record without their text
|
||||||
- [x] EP final roll-call votes of Austrian MEPs (`europarl.votes`)
|
- [x] EP roll-call votes of Austrian MEPs, including amendments and part votes (`europarl.votes`)
|
||||||
|
- [x] Committee memberships of the configured legislative periods (list 250, `parlament.persons`)
|
||||||
|
- [x] Full speech texts and interjections from the protocols (`parlament.speeches`)
|
||||||
|
- [x] Current members of seven Landtage (not Kärnten and Wien, whose robots.txt forbids it) from their official lists (`landtag.*`); status of state MPs from those lists
|
||||||
|
- [x] Event dates from the text (gestern, am Montag, 12. November) instead of publication dates
|
||||||
|
- [x] Election results and preference votes: NR 2024, NR 2019, NR 2017, EU 2024, EU 2019 preference votes (`bmi.elections`)
|
||||||
|
- [x] Former Austrian MEPs of the 2019-2024 term; EC meetings of the 2014-2019 Commission; Bluesky/Mastodon history paging
|
||||||
|
- [x] Operations: watchdog for missed schedules and stalled jobs, nightly backups, `/api/v1/status/sources` for
|
||||||
|
monitoring, worker logs kept across redeploys; procurement data cleaned (award dates, placeholder contractors,
|
||||||
|
framework-agreement buyers)
|
||||||
|
- [x] Draft legal pages (`/impressum`, `/datenschutz`), corrections contact, portrait proxy (`/api/img`)
|
||||||
- [x] Pages: organisations, money explorer, social feed, Wikipedia edits, person network ("follow the money"),
|
- [x] Pages: organisations, money explorer, social feed, Wikipedia edits, person network ("follow the money"),
|
||||||
say-vs-vote on roll calls
|
say-vs-vote on roll calls
|
||||||
|
|
||||||
@@ -45,22 +55,21 @@ Next.js frontend (de/en), Docker Compose for Unraid.
|
|||||||
## Next
|
## Next
|
||||||
|
|
||||||
**Data**
|
**Data**
|
||||||
- [ ] Full speech texts and interjections from the protocols; committee memberships (list 250)
|
|
||||||
- [ ] EU Council participant lists, ministries' press releases, Federal President's schedule
|
- [ ] EU Council participant lists, ministries' press releases, Federal President's schedule
|
||||||
- [ ] Election results and candidate lists; AMA/TAM subsidy recipients (after checking bulk access and terms)
|
- [ ] Election results before 2019, NR 2019 state lists, Landtag and municipal elections
|
||||||
|
- [ ] AMA/TAM subsidy recipients (after checking bulk access and terms)
|
||||||
- [ ] Cabinet staff and appointments to state-owned companies (from answers to parliamentary questions)
|
- [ ] Cabinet staff and appointments to state-owned companies (from answers to parliamentary questions)
|
||||||
- [ ] One adapter per Landtag (OGD where available); municipal councils and mayors
|
- [ ] Landtag votes (only Steiermark has an API) and state election results; municipal councils and mayors
|
||||||
- [ ] Lobbying register – if the BMJ ever offers stable URLs or an export
|
- [ ] Lobbying register – if the BMJ ever offers stable URLs or an export
|
||||||
|
|
||||||
**Quality**
|
**Quality**
|
||||||
- [ ] Golden fixtures for every adapter (the framework and first cases are in place)
|
- [ ] Golden fixtures for every adapter (the framework and first cases are in place)
|
||||||
- [ ] Better event dates (explicit dates in the text instead of publication dates)
|
|
||||||
- [ ] Entity resolution for donors/companies via Firmenbuch numbers from procurement notices
|
- [ ] Entity resolution for donors/companies via Firmenbuch numbers from procurement notices
|
||||||
- [ ] Wayback Machine archiving of evidence URLs (`document.archive_url`)
|
- [ ] Wayback Machine archiving of evidence URLs (`document.archive_url`)
|
||||||
|
|
||||||
**Product**
|
**Product**
|
||||||
- [ ] Before going public: Impressum/Offenlegung (§ 5 ECG, § 25 MedienG), privacy policy, a corrections contact
|
- [ ] Before going public: have `/impressum` and `/datenschutz` legally reviewed, set `POLITRACK_LEGAL_*` in `.env`,
|
||||||
- [ ] Image proxy for portraits and logos (no visitor IPs to Wikimedia/parliament)
|
and document the balancing test (see legal.md)
|
||||||
- [ ] Compare two people or parties; topic pages (`/themen/{slug}`); Open Graph share images; CSV export
|
- [ ] Compare two people or parties; topic pages (`/themen/{slug}`); Open Graph share images; CSV export
|
||||||
- [ ] Review queue for editors in the web UI (today `politrack review`)
|
- [ ] Review queue for editors in the web UI (today `politrack review`)
|
||||||
- [ ] Community link submissions and a corrections/right-of-reply form
|
- [ ] Community link submissions and a corrections/right-of-reply form
|
||||||
@@ -68,6 +77,7 @@ Next.js frontend (de/en), Docker Compose for Unraid.
|
|||||||
- [ ] Optional accounts via reverse-proxy SSO using `app_user`
|
- [ ] Optional accounts via reverse-proxy SSO using `app_user`
|
||||||
- [ ] Partnerships: MeineAbgeordneten, Parteispenden.at, APA (OTS full-text licence)
|
- [ ] Partnerships: MeineAbgeordneten, Parteispenden.at, APA (OTS full-text licence)
|
||||||
- [ ] Map view of trips and appearances
|
- [ ] Map view of trips and appearances
|
||||||
|
- [ ] Semantic search with embeddings (`POLITRACK_OLLAMA_URL`): parked by the owner on 2026-11-09, full-text search only for now
|
||||||
|
|
||||||
## Not yet verified (v2)
|
## Not yet verified (v2)
|
||||||
|
|
||||||
@@ -86,9 +96,8 @@ Not run yet, because PyPI/npm were unreachable on the development network (Octob
|
|||||||
- Votes in the Nationalrat are faction-level except roll calls (an Austrian parliamentary practice).
|
- Votes in the Nationalrat are faction-level except roll calls (an Austrian parliamentary practice).
|
||||||
- Split votes (factions voting differently on parts of a bill) keep the official text but no faction
|
- Split votes (factions voting differently on parts of a bill) keep the official text but no faction
|
||||||
positions, because the summary cannot be attributed reliably.
|
positions, because the summary cannot be attributed reliably.
|
||||||
- Activity status: parliament and EP data are authoritative (`status_verified`). Open-ended roles from
|
- Activity status: parliament, EP and the official Landtag lists are authoritative (`status_verified`). Kärnten, Wien
|
||||||
Wikidata count as current for 15 years after their start, so some state/local politicians may show
|
and local offices still rely on Wikidata, whose open-ended roles count as current for 15 years after their start.
|
||||||
wrong status until per-state adapters exist.
|
|
||||||
- Roll-call surnames that are ambiguous without a link in the protocol are skipped, not guessed.
|
- Roll-call surnames that are ambiguous without a link in the protocol are skipped, not guessed.
|
||||||
- Travel/meeting extraction is rule-based; dates are publication dates of the source.
|
- Travel/meeting extraction is rule-based; dates are publication dates of the source.
|
||||||
- News coverage is headline-level; mentions are linked by exact name or "office title + surname".
|
- News coverage is headline-level; mentions are linked by exact name or "office title + surname".
|
||||||
|
|||||||
+5
-3
@@ -31,7 +31,9 @@ Status: ✅ implemented (adapter name in `code`) · 🟡 planned · ⛔ delibera
|
|||||||
| Source | Data | Access | Licence / terms | Status |
|
| Source | Data | Access | Licence / terms | Status |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| Parlament Österreich | MPs since 1918, mandates, functions, **side jobs & income category** (§6 Unv-Transparenz-G), social-media links, plenary speeches, **faction votes** per item and reading | JSON API (`/Filter/api/filter/data/409,101,251`, `?json=TRUE` detail pages) | [CC BY 4.0](https://www.parlament.gv.at/recherchieren/open-data/daten-und-lizenz/) | ✅ `parlament.persons`, `parlament.items` |
|
| Parlament Österreich | MPs since 1918, mandates, functions, **side jobs & income category** (§6 Unv-Transparenz-G), social-media links, plenary speeches, **faction votes** per item and reading | JSON API (`/Filter/api/filter/data/409,101,251`, `?json=TRUE` detail pages) | [CC BY 4.0](https://www.parlament.gv.at/recherchieren/open-data/daten-und-lizenz/) | ✅ `parlament.persons`, `parlament.items` |
|
||||||
|
| – committee memberships | who sat on which committee, with function and dates | JSON API (`/Filter/api/filter/data/250`) | CC BY 4.0 | ✅ `parlament.persons` |
|
||||||
| – stenographic protocols | **Roll-call votes**: every member's yes/no from the "Mit „Ja“/„Nein“ stimmten …" lists | HTML fragments | CC BY 4.0 | ✅ `parlament.items` |
|
| – stenographic protocols | **Roll-call votes**: every member's yes/no from the "Mit „Ja“/„Nein“ stimmten …" lists | HTML fragments | CC BY 4.0 | ✅ `parlament.items` |
|
||||||
|
| – speech texts | **full text of each plenary speech** with interjections and reactions (Beifall, Zwischenrufe) | protocol HTML (one file per speech since 2019, one per session before) | CC BY 4.0 | ✅ `parlament.speeches` |
|
||||||
| – immunity waivers | prosecutors' requests to lift immunity: authority, offence, outcome | items + committee report | CC BY 4.0 | ✅ `parlament.items` |
|
| – immunity waivers | prosecutors' requests to lift immunity: authority, offence, outcome | items + committee report | CC BY 4.0 | ✅ `parlament.items` |
|
||||||
| – written questions and answers | who asked which minister what | item list (J / AB) | CC BY 4.0 | ✅ `parlament.items` |
|
| – written questions and answers | who asked which minister what | item list (J / AB) | CC BY 4.0 | ✅ `parlament.items` |
|
||||||
| – investigative committees (U-Ausschüsse) | **hearings**: who testified when | item list (KOMM) | CC BY 4.0 | ✅ `parlament.items` |
|
| – investigative committees (U-Ausschüsse) | **hearings**: who testified when | item list (KOMM) | CC BY 4.0 | ✅ `parlament.items` |
|
||||||
@@ -45,18 +47,18 @@ Status: ✅ implemented (adapter name in `code`) · 🟡 planned · ⛔ delibera
|
|||||||
| Public procurement – data.gv.at "Vergabe-Kerndaten" | **contract awards**: buyer, winner, amount, CPV (eForms) | OGD hub catalogue → per-publisher XML | open data (CC BY 4.0) | ✅ `vergabe.awards` |
|
| Public procurement – data.gv.at "Vergabe-Kerndaten" | **contract awards**: buyer, winner, amount, CPV (eForms) | OGD hub catalogue → per-publisher XML | open data (CC BY 4.0) | ✅ `vergabe.awards` |
|
||||||
| RTR / KommAustria Medientransparenz | **government advertising** and **media subsidies** per payer → medium | open-data API | free re-use, attribution | ✅ `rtr.medientransparenz` |
|
| RTR / KommAustria Medientransparenz | **government advertising** and **media subsidies** per payer → medium | open-data API | free re-use, attribution | ✅ `rtr.medientransparenz` |
|
||||||
| European Parliament | Austrian MEPs, roles, **declarations of interests** | open-data/website XML | CC BY 4.0 | ✅ `europarl.meps` |
|
| European Parliament | Austrian MEPs, roles, **declarations of interests** | open-data/website XML | CC BY 4.0 | ✅ `europarl.meps` |
|
||||||
| – plenary roll calls | **final votes** of Austrian MEPs (whole texts, no amendments), with totals and later corrections | Open Data API v2 (`/meetings/{id}/decisions`) | CC BY 4.0 | ✅ `europarl.votes` |
|
| – plenary roll calls | **votes of Austrian MEPs** on whole texts and on amendments or parts (flagged `part_vote`), with totals and later corrections | Open Data API v2 (`/meetings/{id}/decisions`) | CC BY 4.0 | ✅ `europarl.votes` |
|
||||||
| European Commission – meetings | meetings of Commissioners/cabinets with **interest representatives** (Austrians and Austrian organisations) | XLSX export | EU re-use policy | ✅ `eu.commission_meetings` |
|
| European Commission – meetings | meetings of Commissioners/cabinets with **interest representatives** (Austrians and Austrian organisations) | XLSX export | EU re-use policy | ✅ `eu.commission_meetings` |
|
||||||
| Wikipedia (de/en) | anonymous edits from **parliament/government IP ranges** (`config/ip_ranges.yaml`) | MediaWiki API `usercontribs` | CC BY-SA (edit metadata) | ✅ `wikipedia.institution_edits` |
|
| Wikipedia (de/en) | anonymous edits from **parliament/government IP ranges** (`config/ip_ranges.yaml`) | MediaWiki API `usercontribs` | CC BY-SA (edit metadata) | ✅ `wikipedia.institution_edits` |
|
||||||
| Google Political Ads Transparency | Austrian political ads: advertiser, spend bracket, impressions | public bundle (zip, CSV) | Google's transparency report terms | ✅ `ads.google` |
|
| Google Political Ads Transparency | Austrian political ads: advertiser, spend bracket, impressions | public bundle (zip, CSV) | Google's transparency report terms | ✅ `ads.google` |
|
||||||
| Meta Ad Library API | political ads of configured pages (`config/meta_pages.yaml`) | Graph API, token after identity confirmation | Meta platform terms | ✅ `ads.meta` (opt-in) |
|
| Meta Ad Library API | political ads of configured pages (`config/meta_pages.yaml`) | Graph API, token after identity confirmation | Meta platform terms | ✅ `ads.meta` (opt-in) |
|
||||||
| RIS (data.bka.gv.at) | laws, court decisions | OGD API | CC BY 4.0 | 🟡 decisions are anonymised; only linkable via a case number cited elsewhere |
|
| RIS (data.bka.gv.at) | laws, court decisions | OGD API | CC BY 4.0 | 🟡 decisions are anonymised; only linkable via a case number cited elsewhere |
|
||||||
| Lobbying- und Interessenvertretungs-Register (BMJ) | lobbying firms & clients | Lotus Notes web application without stable URLs (deep links return 404) | official work | ⛔ technically not reliably accessible; revisit if an export appears |
|
| Lobbying- und Interessenvertretungs-Register (BMJ) | lobbying firms & clients | Lotus Notes web application without stable URLs (deep links return 404) | official work | ⛔ technically not reliably accessible; revisit if an export appears |
|
||||||
| State parliaments & governments (9 Länder) | Landtag members, votes | varies; several publish OGD | mostly CC BY 4.0 | 🟡 one adapter per state; until then via Wikidata |
|
| State parliaments (Landtage) | **current members** with party, district and mandate start where published; roles of members who leave a list are closed (`enrich.landtage`) | official member pages of seven Landtage (robots.txt checked per site) | official information | ✅ `landtag.noe`, `landtag.ooe`, `landtag.stmk`, `landtag.tirol`, `landtag.vbg`, `landtag.sbg`, `landtag.bgld`; ⛔ Kärnten (ktn.gv.at disallows all crawlers) and Wien (wien.gv.at disallows its politician search `/advuew/` for all but its own search appliance); 🟡 Landtag votes and state election results |
|
||||||
| Municipalities | mayors, councils | fragmented | – | 🟡 via Wikidata |
|
| Municipalities | mayors, councils | fragmented | – | 🟡 via Wikidata |
|
||||||
| EU Council participant lists | which minister attended which Council | PDF per meeting | EU re-use policy | 🟡 not implemented yet |
|
| EU Council participant lists | which minister attended which Council | PDF per meeting | EU re-use policy | 🟡 not implemented yet |
|
||||||
| AMA farm subsidies, EU state-aid register (TAM) | subsidy recipients | search interfaces | – | 🟡 not implemented yet (bulk access and terms still to be checked) |
|
| AMA farm subsidies, EU state-aid register (TAM) | subsidy recipients | search interfaces | – | 🟡 not implemented yet (bulk access and terms still to be checked) |
|
||||||
| Election results, candidate lists | results per municipality, candidates | BMI / data.gv.at, official gazettes | open data / official | 🟡 not implemented yet |
|
| Election results, preference votes | party results for Austria and the states; candidates' preference votes (only candidates who resolve to a known politician) | BMI XLSX (Bundeswahlbehörde) | official works; CC BY 4.0 on data.gv.at | ✅ `bmi.elections` (NR 2024, NR 2019, EU 2024); 🟡 earlier elections, NR 2019 state lists, Landtag and municipal elections |
|
||||||
| Insolvency notices (Ediktsdatei) | companies tied to politicians | Justiz web application | terms to be checked before automating | 🟡 |
|
| Insolvency notices (Ediktsdatei) | companies tied to politicians | Justiz web application | terms to be checked before automating | 🟡 |
|
||||||
| Firmenbuch, Grundbuch, beneficial owners (WiEReG) | company roles, property | paid clearing houses; WiEReG public access restricted since the 2022 CJEU ruling | – | ⛔ cost and legal limits |
|
| Firmenbuch, Grundbuch, beneficial owners (WiEReG) | company roles, property | paid clearing houses; WiEReG public access restricted since the 2022 CJEU ruling | – | ⛔ cost and legal limits |
|
||||||
| Criminal record (*Strafregister*) | – | not public | – | ⛔ does not exist publicly |
|
| Criminal record (*Strafregister*) | – | not public | – | ⛔ does not exist publicly |
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 PORT=3000 HOSTNAME=0.0.0.0
|
|||||||
COPY --from=build /app/.next/standalone ./
|
COPY --from=build /app/.next/standalone ./
|
||||||
COPY --from=build /app/.next/static ./.next/static
|
COPY --from=build /app/.next/static ./.next/static
|
||||||
COPY --from=build /app/public ./public
|
COPY --from=build /app/public ./public
|
||||||
|
# Next.js caches fetched data here at runtime (portrait proxy).
|
||||||
|
RUN mkdir -p .next/cache && chown -R node:node .next/cache
|
||||||
USER node
|
USER node
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
+45
-3
@@ -16,7 +16,44 @@
|
|||||||
"organizations": "Organisationen",
|
"organizations": "Organisationen",
|
||||||
"money": "Geld",
|
"money": "Geld",
|
||||||
"social": "Social Media",
|
"social": "Social Media",
|
||||||
"wikipedia": "Wikipedia-Bearbeitungen"
|
"wikipedia": "Wikipedia-Bearbeitungen",
|
||||||
|
"imprint": "Impressum",
|
||||||
|
"privacy": "Datenschutz"
|
||||||
|
},
|
||||||
|
"Imprint": {
|
||||||
|
"title": "Impressum",
|
||||||
|
"intro": "Offenlegung gemäß § 5 ECG und §§ 24, 25 MedienG.",
|
||||||
|
"notConfigured": "Die Angaben zum Medieninhaber sind noch nicht eingetragen. Vor einer Veröffentlichung müssen sie vollständig sein.",
|
||||||
|
"missing": "[noch nicht eingetragen]",
|
||||||
|
"ownerHeading": "Medieninhaber und Herausgeber",
|
||||||
|
"email": "E-Mail",
|
||||||
|
"purposeHeading": "Unternehmensgegenstand",
|
||||||
|
"purpose": "Keiner. Politrack ist ein privates, nicht gewinnorientiertes Projekt ohne Werbung.",
|
||||||
|
"directionHeading": "Grundlegende Richtung",
|
||||||
|
"direction": "Information über die öffentliche Tätigkeit österreichischer Politikerinnen, Politiker und Parteien auf Grundlage öffentlich zugänglicher Quellen, unabhängig von Parteien und Interessengruppen.",
|
||||||
|
"correctionsHeading": "Korrekturen und Gegendarstellung",
|
||||||
|
"corrections": "Eine Angabe ist falsch oder unvollständig? Schreib uns bitte die Nummer der Angabe und eine Quelle. Widersprochene Angaben markieren wir als umstritten, falsche korrigieren wir.",
|
||||||
|
"liabilityHeading": "Haftung",
|
||||||
|
"liability": "Alle Angaben stammen aus den jeweils verlinkten Quellen; maßgeblich sind diese. Für die Inhalte verlinkter Seiten sind deren Betreiber verantwortlich."
|
||||||
|
},
|
||||||
|
"Privacy": {
|
||||||
|
"title": "Datenschutz",
|
||||||
|
"intro": "Welche Daten Politrack verarbeitet und welche Rechte du hast.",
|
||||||
|
"draft": "Entwurf: Dieser Text wurde noch nicht rechtlich geprüft.",
|
||||||
|
"missing": "[noch nicht eingetragen]",
|
||||||
|
"controllerHeading": "Verantwortlicher",
|
||||||
|
"visitorsHeading": "Wenn du diese Website besuchst",
|
||||||
|
"visitors": "Politrack verwendet keine Werbung, kein Tracking und keine Skripte, Schriften oder Einbettungen von Dritten. Beim Abruf fallen technisch notwendige Zugriffsdaten an (IP-Adresse, Zeitpunkt, aufgerufene Seite), die nur so lange gespeichert werden, wie es für den sicheren Betrieb nötig ist.",
|
||||||
|
"cookiesHeading": "Cookies",
|
||||||
|
"cookies": "Wir speichern nur deine eigenen Einstellungen in Cookies: Quellen- und Themenfilter sowie das Farbschema. Sie dienen keiner Nachverfolgung.",
|
||||||
|
"imagesHeading": "Porträts",
|
||||||
|
"images": "Porträts laden wir über unseren eigenen Server, sodass deine IP-Adresse nicht an das Parlament oder andere Quellen übermittelt wird. Links zu externen Quellen öffnest du selbst; dort gelten die Bestimmungen der jeweiligen Betreiber.",
|
||||||
|
"subjectsHeading": "Daten über Politikerinnen und Politiker",
|
||||||
|
"subjects": "Politrack verarbeitet personenbezogene Daten ausschließlich zur öffentlichen Rolle von Personen: Funktionen, Abstimmungen, öffentliche Aussagen und Auftritte, gemeldete Nebentätigkeiten, Parteispenden und öffentlich bekannte Verfahren. Private Spender werden nur so genannt, wie es die amtliche Veröffentlichung vorsieht.",
|
||||||
|
"basisHeading": "Rechtsgrundlage",
|
||||||
|
"basis": "Berechtigtes Interesse und öffentliches Interesse an politischer Transparenz (Art. 6 Abs. 1 lit. f DSGVO) sowie die Freiheit der Meinungsäußerung und Information (Art. 85 DSGVO).",
|
||||||
|
"rightsHeading": "Deine Rechte",
|
||||||
|
"rights": "Du hast das Recht auf Auskunft, Berichtigung, Löschung, Einschränkung und Widerspruch. Wende dich dazu an die oben genannte Adresse. Außerdem kannst du dich bei der Österreichischen Datenschutzbehörde beschweren."
|
||||||
},
|
},
|
||||||
"Home": {
|
"Home": {
|
||||||
"headline": "Politik in Österreich – nachvollziehbar.",
|
"headline": "Politik in Österreich – nachvollziehbar.",
|
||||||
@@ -120,7 +157,9 @@
|
|||||||
"travel": "Reisen & Treffen",
|
"travel": "Reisen & Treffen",
|
||||||
"social": "Social Media"
|
"social": "Social Media"
|
||||||
},
|
},
|
||||||
"factionVoteNote": "Im Nationalrat wird meist per Aufstehen abgestimmt; offiziell protokolliert ist dann nur das Stimmverhalten der Fraktion. Bei namentlichen Abstimmungen zeigen wir die eigene Stimme – und ob sie von der Fraktion abweicht.",
|
"showPartVotes": "Auch Änderungsanträge und Teilabstimmungen anzeigen",
|
||||||
|
"hidePartVotes": "Nur Abstimmungen über ganze Texte anzeigen",
|
||||||
|
"factionVoteNote":"Im Nationalrat wird meist per Aufstehen abgestimmt; offiziell protokolliert ist dann nur das Stimmverhalten der Fraktion. Bei namentlichen Abstimmungen zeigen wir die eigene Stimme – und ob sie von der Fraktion abweicht.",
|
||||||
"roleCorroborated": "mehrfach belegt",
|
"roleCorroborated": "mehrfach belegt",
|
||||||
"unverified": "laut Wikidata – nicht amtlich bestätigt",
|
"unverified": "laut Wikidata – nicht amtlich bestätigt",
|
||||||
"accountUnverified": "Laut Wikidata – nicht amtlich bestätigt",
|
"accountUnverified": "Laut Wikidata – nicht amtlich bestätigt",
|
||||||
@@ -186,6 +225,7 @@
|
|||||||
},
|
},
|
||||||
"Votes": {
|
"Votes": {
|
||||||
"title": "Abstimmungen",
|
"title": "Abstimmungen",
|
||||||
|
"includePartVotes": "Auch Änderungsanträge und Teilabstimmungen (EU-Parlament)",
|
||||||
"accepted": "angenommen",
|
"accepted": "angenommen",
|
||||||
"rejected": "abgelehnt",
|
"rejected": "abgelehnt",
|
||||||
"for": "dafür",
|
"for": "dafür",
|
||||||
@@ -226,6 +266,7 @@
|
|||||||
"contradicts": "widerspricht",
|
"contradicts": "widerspricht",
|
||||||
"none": "Keine Angaben mit deinen Quellen- und Themenfiltern.",
|
"none": "Keine Angaben mit deinen Quellen- und Themenfiltern.",
|
||||||
"type": {
|
"type": {
|
||||||
|
"election_result": "Wahlergebnis",
|
||||||
"role": "Funktion",
|
"role": "Funktion",
|
||||||
"vote": "Abstimmung",
|
"vote": "Abstimmung",
|
||||||
"donation": "Spende",
|
"donation": "Spende",
|
||||||
@@ -336,7 +377,8 @@
|
|||||||
"kind": "Art",
|
"kind": "Art",
|
||||||
"notCollected": "Wir umgehen keine Bezahlschranken, Logins oder technischen Sperren und halten uns an robots.txt und Nutzungsbedingungen. Von Medien speichern wir nur Überschrift, Teaser und Link.",
|
"notCollected": "Wir umgehen keine Bezahlschranken, Logins oder technischen Sperren und halten uns an robots.txt und Nutzungsbedingungen. Von Medien speichern wir nur Überschrift, Teaser und Link.",
|
||||||
"data": "Die Betreiber:innen dieser Instanz stellen die Daten auch maschinenlesbar bereit: als REST-API mit OpenAPI-Dokumentation, als MCP-Server für KI-Agenten und als Lesezugriff auf die Datenbank. Jede Angabe kommt dort mit denselben Belegen wie hier.",
|
"data": "Die Betreiber:innen dieser Instanz stellen die Daten auch maschinenlesbar bereit: als REST-API mit OpenAPI-Dokumentation, als MCP-Server für KI-Agenten und als Lesezugriff auf die Datenbank. Jede Angabe kommt dort mit denselben Belegen wie hier.",
|
||||||
"corrections": "Fehler gefunden? Wir korrigieren falsche Angaben, markieren widersprochene als umstritten und löschen nichts stillschweigend. Bitte nenne die Nummer der Angabe (siehe Permalink) und eine Quelle für die Korrektur."
|
"corrections": "Fehler gefunden? Wir korrigieren falsche Angaben, markieren widersprochene als umstritten und löschen nichts stillschweigend. Bitte nenne die Nummer der Angabe (siehe Permalink) und eine Quelle für die Korrektur.",
|
||||||
|
"correctionsContact": "Kontakt für Korrekturen"
|
||||||
},
|
},
|
||||||
"Common": {
|
"Common": {
|
||||||
"loadError": "Die Daten konnten nicht geladen werden. Bitte versuche es gleich noch einmal.",
|
"loadError": "Die Daten konnten nicht geladen werden. Bitte versuche es gleich noch einmal.",
|
||||||
|
|||||||
+45
-3
@@ -16,7 +16,9 @@
|
|||||||
"organizations": "Organisations",
|
"organizations": "Organisations",
|
||||||
"money": "Money",
|
"money": "Money",
|
||||||
"social": "Social media",
|
"social": "Social media",
|
||||||
"wikipedia": "Wikipedia edits"
|
"wikipedia": "Wikipedia edits",
|
||||||
|
"imprint": "Legal notice",
|
||||||
|
"privacy": "Privacy"
|
||||||
},
|
},
|
||||||
"Home": {
|
"Home": {
|
||||||
"headline": "Austrian politics – traceable.",
|
"headline": "Austrian politics – traceable.",
|
||||||
@@ -120,7 +122,9 @@
|
|||||||
"travel": "Travel & meetings",
|
"travel": "Travel & meetings",
|
||||||
"social": "Social media"
|
"social": "Social media"
|
||||||
},
|
},
|
||||||
"factionVoteNote": "The National Council mostly votes by standing up; then only each faction's vote is recorded. For roll-call votes we show the person's own vote – and whether it differs from their faction.",
|
"showPartVotes": "Also show amendments and part votes",
|
||||||
|
"hidePartVotes": "Show votes on whole texts only",
|
||||||
|
"factionVoteNote":"The National Council mostly votes by standing up; then only each faction's vote is recorded. For roll-call votes we show the person's own vote – and whether it differs from their faction.",
|
||||||
"roleCorroborated": "corroborated",
|
"roleCorroborated": "corroborated",
|
||||||
"unverified": "per Wikidata – not officially confirmed",
|
"unverified": "per Wikidata – not officially confirmed",
|
||||||
"accountUnverified": "According to Wikidata – not officially confirmed",
|
"accountUnverified": "According to Wikidata – not officially confirmed",
|
||||||
@@ -186,6 +190,7 @@
|
|||||||
},
|
},
|
||||||
"Votes": {
|
"Votes": {
|
||||||
"title": "Votes",
|
"title": "Votes",
|
||||||
|
"includePartVotes": "Include amendments and part votes (European Parliament)",
|
||||||
"accepted": "accepted",
|
"accepted": "accepted",
|
||||||
"rejected": "rejected",
|
"rejected": "rejected",
|
||||||
"for": "for",
|
"for": "for",
|
||||||
@@ -226,6 +231,7 @@
|
|||||||
"contradicts": "contradicts",
|
"contradicts": "contradicts",
|
||||||
"none": "No claims match your source and topic filters.",
|
"none": "No claims match your source and topic filters.",
|
||||||
"type": {
|
"type": {
|
||||||
|
"election_result": "Election result",
|
||||||
"role": "Office",
|
"role": "Office",
|
||||||
"vote": "Vote",
|
"vote": "Vote",
|
||||||
"donation": "Donation",
|
"donation": "Donation",
|
||||||
@@ -336,7 +342,8 @@
|
|||||||
"kind": "Kind",
|
"kind": "Kind",
|
||||||
"notCollected": "We don't get around paywalls, logins or technical barriers, and we respect robots.txt and terms of use. From media we store only the headline, teaser and link.",
|
"notCollected": "We don't get around paywalls, logins or technical barriers, and we respect robots.txt and terms of use. From media we store only the headline, teaser and link.",
|
||||||
"data": "The operators of this instance also provide the data in machine-readable form: a REST API with OpenAPI documentation, an MCP server for AI agents and read access to the database. Every fact comes with the same sources as here.",
|
"data": "The operators of this instance also provide the data in machine-readable form: a REST API with OpenAPI documentation, an MCP server for AI agents and read access to the database. Every fact comes with the same sources as here.",
|
||||||
"corrections": "Found a mistake? We correct wrong facts, mark contradicted ones as disputed and never delete anything silently. Please quote the fact's number (see its permalink) and a source for the correction."
|
"corrections": "Found a mistake? We correct wrong facts, mark contradicted ones as disputed and never delete anything silently. Please quote the fact's number (see its permalink) and a source for the correction.",
|
||||||
|
"correctionsContact": "Contact for corrections"
|
||||||
},
|
},
|
||||||
"Common": {
|
"Common": {
|
||||||
"loadError": "The data could not be loaded. Please try again in a moment.",
|
"loadError": "The data could not be loaded. Please try again in a moment.",
|
||||||
@@ -586,6 +593,41 @@
|
|||||||
"about": "About Politrack"
|
"about": "About Politrack"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Imprint": {
|
||||||
|
"title": "Legal notice",
|
||||||
|
"intro": "Disclosure under § 5 ECG and §§ 24, 25 MedienG (Austrian law).",
|
||||||
|
"notConfigured": "The publisher's details have not been entered yet. They must be complete before publication.",
|
||||||
|
"missing": "[not entered yet]",
|
||||||
|
"ownerHeading": "Media owner and publisher",
|
||||||
|
"email": "Email",
|
||||||
|
"purposeHeading": "Business purpose",
|
||||||
|
"purpose": "None. Politrack is a private, non-profit project without advertising.",
|
||||||
|
"directionHeading": "Editorial line",
|
||||||
|
"direction": "Information on the public activity of Austrian politicians and parties, based on publicly available sources and independent of parties and interest groups.",
|
||||||
|
"correctionsHeading": "Corrections and right of reply",
|
||||||
|
"corrections": "Is a fact wrong or incomplete? Please send us its number and a source. We mark contradicted facts as disputed and correct wrong ones.",
|
||||||
|
"liabilityHeading": "Liability",
|
||||||
|
"liability": "All facts come from the sources linked with them, which are authoritative. Linked sites are the responsibility of their operators."
|
||||||
|
},
|
||||||
|
"Privacy": {
|
||||||
|
"title": "Privacy",
|
||||||
|
"intro": "What data Politrack processes and what rights you have.",
|
||||||
|
"draft": "Draft: this text has not been legally reviewed yet.",
|
||||||
|
"missing": "[not entered yet]",
|
||||||
|
"controllerHeading": "Controller",
|
||||||
|
"visitorsHeading": "When you visit this website",
|
||||||
|
"visitors": "Politrack uses no advertising, no tracking and no third-party scripts, fonts or embeds. Serving a page produces technically necessary access data (IP address, time, page requested), kept only as long as needed to run the site securely.",
|
||||||
|
"cookiesHeading": "Cookies",
|
||||||
|
"cookies": "Cookies only store your own settings: source and topic filters and the colour scheme. They are not used for tracking.",
|
||||||
|
"imagesHeading": "Portraits",
|
||||||
|
"images": "Portraits are loaded through our own server, so your IP address is not passed to the parliament or other sources. External source links are yours to open; the operators' own terms apply there.",
|
||||||
|
"subjectsHeading": "Data about politicians",
|
||||||
|
"subjects": "Politrack processes personal data only about people's public role: offices, votes, public statements and appearances, declared side jobs, party donations and publicly known proceedings. Private donors are named only as the official publication names them.",
|
||||||
|
"basisHeading": "Legal basis",
|
||||||
|
"basis": "Legitimate and public interest in political transparency (Art. 6(1)(f) GDPR) and freedom of expression and information (Art. 85 GDPR).",
|
||||||
|
"rightsHeading": "Your rights",
|
||||||
|
"rights": "You have the right to access, rectification, erasure, restriction and objection. Please contact the address above. You can also complain to the Austrian Data Protection Authority."
|
||||||
|
},
|
||||||
"Footer": {
|
"Footer": {
|
||||||
"tagline": "Austrian politics, sourced. An independent project that collects public information on politicians and parties – every fact with its source.",
|
"tagline": "Austrian politics, sourced. An independent project that collects public information on politicians and parties – every fact with its source.",
|
||||||
"principleEvidence": "Every fact with its source",
|
"principleEvidence": "Every fact with its source",
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// Phone-width audit: emulate a 390x844 phone through the DevTools protocol (a plain headless window can't go
|
||||||
|
// below ~500 px and fakes overflow), then for each page report horizontal overflow, the elements causing it and
|
||||||
|
// small tap targets, and save a full-page screenshot. Needs Node 22+ and any Chromium browser (Chrome, Edge).
|
||||||
|
// Usage: node web/scripts/mobile-audit.mjs <browser executable> <outdir> <baseUrl> <path>...
|
||||||
|
// Example: node web/scripts/mobile-audit.mjs "/usr/bin/chromium" /tmp/audit http://localhost:3000 / /personen /geld
|
||||||
|
// From Git Bash, prefix MSYS_NO_PATHCONV=1, or it rewrites "/personen" into a Windows path.
|
||||||
|
import {spawn} from 'node:child_process';
|
||||||
|
import {mkdirSync, writeFileSync} from 'node:fs';
|
||||||
|
|
||||||
|
const [edge, outDir, base, ...paths] = process.argv.slice(2);
|
||||||
|
mkdirSync(outDir, {recursive: true});
|
||||||
|
const port = 9333;
|
||||||
|
const proc = spawn(edge, ['--headless=new', `--remote-debugging-port=${port}`, '--disable-gpu', '--no-first-run',
|
||||||
|
`--user-data-dir=${outDir}/profile`, 'about:blank'], {stdio: 'ignore'});
|
||||||
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||||
|
|
||||||
|
let target;
|
||||||
|
for (let i = 0; i < 40 && !target; i++) {
|
||||||
|
try { target = (await (await fetch(`http://127.0.0.1:${port}/json/list`)).json()).find((t) => t.type === 'page'); }
|
||||||
|
catch { await sleep(250); }
|
||||||
|
}
|
||||||
|
const ws = new WebSocket(target.webSocketDebuggerUrl);
|
||||||
|
await new Promise((r) => ws.addEventListener('open', r, {once: true}));
|
||||||
|
let seq = 0; const pending = new Map();
|
||||||
|
ws.addEventListener('message', (ev) => {
|
||||||
|
const msg = JSON.parse(ev.data);
|
||||||
|
if (msg.id && pending.has(msg.id)) { pending.get(msg.id)(msg); pending.delete(msg.id); }
|
||||||
|
});
|
||||||
|
const send = (method, params = {}) => new Promise((resolve) => {
|
||||||
|
const id = ++seq; pending.set(id, resolve); ws.send(JSON.stringify({id, method, params}));
|
||||||
|
});
|
||||||
|
const evaluate = async (expression) => (await send('Runtime.evaluate', {expression, returnByValue: true})).result?.result?.value;
|
||||||
|
|
||||||
|
await send('Page.enable');
|
||||||
|
await send('Emulation.setDeviceMetricsOverride', {width: 390, height: 844, deviceScaleFactor: 1, mobile: true});
|
||||||
|
await send('Emulation.setTouchEmulationEnabled', {enabled: true});
|
||||||
|
await send('Network.enable');
|
||||||
|
await send('Network.setUserAgentOverride', {userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 Mobile/15E148'});
|
||||||
|
|
||||||
|
const report = [];
|
||||||
|
for (const path of paths) {
|
||||||
|
await send('Page.navigate', {url: base + path});
|
||||||
|
await sleep(4000);
|
||||||
|
const info = await evaluate(`(() => {
|
||||||
|
const vw = document.documentElement.clientWidth;
|
||||||
|
const offenders = [];
|
||||||
|
for (const el of document.querySelectorAll('body *')) {
|
||||||
|
const r = el.getBoundingClientRect();
|
||||||
|
if (r.width > 0 && r.right > vw + 1) {
|
||||||
|
const style = getComputedStyle(el);
|
||||||
|
let p = el.parentElement, clipped = false;
|
||||||
|
while (p) { const s = getComputedStyle(p); if (/(auto|scroll|hidden|clip)/.test(s.overflowX)) { clipped = true; break; } p = p.parentElement; }
|
||||||
|
if (!clipped) offenders.push({tag: el.tagName.toLowerCase(), cls: String(el.className).slice(0, 60), right: Math.round(r.right), text: (el.textContent || '').trim().slice(0, 50)});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// keep only the outermost offenders
|
||||||
|
return {vw, scrollWidth: document.documentElement.scrollWidth, height: document.documentElement.scrollHeight,
|
||||||
|
offenders: offenders.slice(0, 12), tapTargetsTooSmall: [...document.querySelectorAll('a,button,input,select,summary')]
|
||||||
|
.filter((e) => { const r = e.getBoundingClientRect(); return r.width > 0 && r.height > 0 && (r.height < 24 || r.width < 24); }).length};
|
||||||
|
})()`);
|
||||||
|
const name = path.replace(/[^a-z0-9]+/gi, '_').replace(/^_|_$/g, '') || 'home';
|
||||||
|
const height = Math.min(info?.height ?? 2000, 4000);
|
||||||
|
await send('Emulation.setDeviceMetricsOverride', {width: 390, height, deviceScaleFactor: 1, mobile: true});
|
||||||
|
await sleep(500);
|
||||||
|
const shot = await send('Page.captureScreenshot', {format: 'png'});
|
||||||
|
writeFileSync(`${outDir}/${name}.png`, Buffer.from(shot.result.data, 'base64'));
|
||||||
|
await send('Emulation.setDeviceMetricsOverride', {width: 390, height: 844, deviceScaleFactor: 1, mobile: true});
|
||||||
|
report.push({path, ...info});
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(report, null, 1));
|
||||||
|
ws.close(); proc.kill();
|
||||||
|
process.exit(0);
|
||||||
@@ -10,7 +10,7 @@ const PAGE = 50;
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
params: Promise<{locale: string}>;
|
params: Promise<{locale: string}>;
|
||||||
searchParams: Promise<{party?: string; page?: string; roll_call?: string}>;
|
searchParams: Promise<{party?: string; page?: string; roll_call?: string; parts?: string}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function generateMetadata({params}: Props): Promise<Metadata> {
|
export async function generateMetadata({params}: Props): Promise<Metadata> {
|
||||||
@@ -25,16 +25,20 @@ export default async function VotesPage({params, searchParams}: Props) {
|
|||||||
const sp = await searchParams;
|
const sp = await searchParams;
|
||||||
const t = await getTranslations('Votes');
|
const t = await getTranslations('Votes');
|
||||||
const page = Math.max(1, Number(sp.page) || 1);
|
const page = Math.max(1, Number(sp.page) || 1);
|
||||||
const votes = await api.votes({party: sp.party, roll_call: sp.roll_call ? 'true' : undefined, limit: PAGE, offset: (page - 1) * PAGE});
|
const votes = await api.votes({party: sp.party, roll_call: sp.roll_call ? 'true' : undefined,
|
||||||
|
include_parts: sp.parts ? 'true' : undefined, limit: PAGE, offset: (page - 1) * PAGE});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHeader title={t('title')} lede={t('intro')} meta={sp.party ? t('filteredParty', {party: sp.party}) : undefined} />
|
<PageHeader title={t('title')} lede={t('intro')} meta={sp.party ? t('filteredParty', {party: sp.party}) : undefined} />
|
||||||
<FilterBar id="votes" active={countActive(sp.roll_call)} resetHref={sp.party ? `/abstimmungen?party=${sp.party}` : '/abstimmungen'}
|
<FilterBar id="votes" active={countActive(sp.roll_call, sp.parts)} resetHref={sp.party ? `/abstimmungen?party=${sp.party}` : '/abstimmungen'}
|
||||||
hidden={{party: sp.party}}>
|
hidden={{party: sp.party}}>
|
||||||
<label className="field field--check">
|
<label className="field field--check">
|
||||||
<input type="checkbox" name="roll_call" value="1" defaultChecked={Boolean(sp.roll_call)} /> {t('onlyRollCall')}
|
<input type="checkbox" name="roll_call" value="1" defaultChecked={Boolean(sp.roll_call)} /> {t('onlyRollCall')}
|
||||||
</label>
|
</label>
|
||||||
|
<label className="field field--check">
|
||||||
|
<input type="checkbox" name="parts" value="1" defaultChecked={Boolean(sp.parts)} /> {t('includePartVotes')}
|
||||||
|
</label>
|
||||||
</FilterBar>
|
</FilterBar>
|
||||||
<VoteLegend />
|
<VoteLegend />
|
||||||
<VoteList votes={votes} />
|
<VoteList votes={votes} />
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type {Metadata} from 'next';
|
||||||
|
import {getTranslations, setRequestLocale} from 'next-intl/server';
|
||||||
|
import {Notice} from '@/components/Notice';
|
||||||
|
import {PageHeader} from '@/components/PageHeader';
|
||||||
|
import {legalDetails} from '@/lib/legal';
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic'; // the operator's details are read from the environment at request time
|
||||||
|
|
||||||
|
const SECTIONS = ['visitors', 'cookies', 'images', 'subjects', 'basis', 'rights'] as const;
|
||||||
|
|
||||||
|
export async function generateMetadata({params}: {params: Promise<{locale: string}>}): Promise<Metadata> {
|
||||||
|
const {locale} = await params;
|
||||||
|
const t = await getTranslations({locale, namespace: 'Privacy'});
|
||||||
|
return {title: t('title')};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function PrivacyPage({params}: {params: Promise<{locale: string}>}) {
|
||||||
|
const {locale} = await params;
|
||||||
|
setRequestLocale(locale);
|
||||||
|
const t = await getTranslations('Privacy');
|
||||||
|
const {name, address, email} = legalDetails();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<article>
|
||||||
|
<PageHeader title={t('title')} lede={t('intro')} />
|
||||||
|
<div className="prose">
|
||||||
|
<Notice tone="caution">{t('draft')}</Notice>
|
||||||
|
<section>
|
||||||
|
<h2>{t('controllerHeading')}</h2>
|
||||||
|
<p>{name ?? t('missing')}<br />{address ?? t('missing')}</p>
|
||||||
|
<p>{email ? <a href={`mailto:${email}`}>{email}</a> : t('missing')}</p>
|
||||||
|
</section>
|
||||||
|
{SECTIONS.map((key) => (
|
||||||
|
<section key={key}>
|
||||||
|
<h2>{t(`${key}Heading`)}</h2>
|
||||||
|
<p>{t(key)}</p>
|
||||||
|
</section>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import type {Metadata} from 'next';
|
||||||
|
import {getTranslations, setRequestLocale} from 'next-intl/server';
|
||||||
|
import {Notice} from '@/components/Notice';
|
||||||
|
import {PageHeader} from '@/components/PageHeader';
|
||||||
|
import {legalDetails} from '@/lib/legal';
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic'; // the operator's details are read from the environment at request time
|
||||||
|
|
||||||
|
export async function generateMetadata({params}: {params: Promise<{locale: string}>}): Promise<Metadata> {
|
||||||
|
const {locale} = await params;
|
||||||
|
const t = await getTranslations({locale, namespace: 'Imprint'});
|
||||||
|
return {title: t('title')};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function ImprintPage({params}: {params: Promise<{locale: string}>}) {
|
||||||
|
const {locale} = await params;
|
||||||
|
setRequestLocale(locale);
|
||||||
|
const t = await getTranslations('Imprint');
|
||||||
|
const {name, address, email, correctionsEmail} = legalDetails();
|
||||||
|
const missing = t('missing');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<article>
|
||||||
|
<PageHeader title={t('title')} lede={t('intro')} />
|
||||||
|
<div className="prose">
|
||||||
|
{(!name || !address || !email) && <Notice tone="caution">{t('notConfigured')}</Notice>}
|
||||||
|
<section>
|
||||||
|
<h2>{t('ownerHeading')}</h2>
|
||||||
|
<p>{name ?? missing}<br />{address ?? missing}</p>
|
||||||
|
<p>{t('email')}: {email ? <a href={`mailto:${email}`}>{email}</a> : missing}</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>{t('purposeHeading')}</h2>
|
||||||
|
<p>{t('purpose')}</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>{t('directionHeading')}</h2>
|
||||||
|
<p>{t('direction')}</p>
|
||||||
|
</section>
|
||||||
|
<section id="korrekturen">
|
||||||
|
<h2>{t('correctionsHeading')}</h2>
|
||||||
|
<p>{t('corrections')}</p>
|
||||||
|
<p>{correctionsEmail ? <a href={`mailto:${correctionsEmail}`}>{correctionsEmail}</a> : missing}</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>{t('liabilityHeading')}</h2>
|
||||||
|
<p>{t('liability')}</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import {SourceMeter, StatusBadge} from '@/components/badges';
|
|||||||
import {ExternalLink} from '@/components/ExternalLink';
|
import {ExternalLink} from '@/components/ExternalLink';
|
||||||
import {Notice} from '@/components/Notice';
|
import {Notice} from '@/components/Notice';
|
||||||
import {PageHeader} from '@/components/PageHeader';
|
import {PageHeader} from '@/components/PageHeader';
|
||||||
|
import {Link} from '@/i18n/navigation';
|
||||||
import {api, type LegalStage} from '@/lib/api';
|
import {api, type LegalStage} from '@/lib/api';
|
||||||
|
|
||||||
const LEGAL_STAGES: LegalStage[] = ['allegation_reported', 'investigation', 'immunity_waiver_requested', 'immunity_waived',
|
const LEGAL_STAGES: LegalStage[] = ['allegation_reported', 'investigation', 'immunity_waiver_requested', 'immunity_waived',
|
||||||
@@ -125,7 +126,7 @@ export default async function MethodPage({params}: {params: Promise<{locale: str
|
|||||||
</section>
|
</section>
|
||||||
<section id={ANCHORS.corrections}>
|
<section id={ANCHORS.corrections}>
|
||||||
<h2>{t('section.corrections')}</h2>
|
<h2>{t('section.corrections')}</h2>
|
||||||
<p>{t('corrections')}</p>
|
<p>{t('corrections')} <Link href="/impressum#korrekturen">{t('correctionsContact')}</Link></p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default async function PartyPage({params}: Props) {
|
|||||||
const party = await loadParty(slug);
|
const party = await loadParty(slug);
|
||||||
const [votes, claims, posts] = await Promise.all([
|
const [votes, claims, posts] = await Promise.all([
|
||||||
api.votes({party: slug, limit: 10}),
|
api.votes({party: slug, limit: 10}),
|
||||||
api.claims({party: slug, types: ['donation', 'media_mention', 'legal_proceeding', 'money_flow', 'lobbying'], limit: 20}),
|
api.claims({party: slug, types: ['donation', 'media_mention', 'legal_proceeding', 'money_flow', 'lobbying', 'election_result'], limit: 20}),
|
||||||
api.social({party: slug, limit: 6})
|
api.social({party: slug, limit: 6})
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {isCurrent, roleLabel} from '@/lib/roles';
|
|||||||
// Claim types per tab (also used for the tab counts); tabs with their own component are listed in CUSTOM_TABS.
|
// Claim types per tab (also used for the tab counts); tabs with their own component are listed in CUSTOM_TABS.
|
||||||
const TABS = {
|
const TABS = {
|
||||||
overview: ['statement', 'vote', 'donation', 'side_job', 'media_mention', 'meeting', 'travel', 'legal_proceeding',
|
overview: ['statement', 'vote', 'donation', 'side_job', 'media_mention', 'meeting', 'travel', 'legal_proceeding',
|
||||||
'career', 'government_decision', 'declaration'],
|
'career', 'government_decision', 'declaration', 'election_result'],
|
||||||
timeline: [],
|
timeline: [],
|
||||||
votes: ['vote'],
|
votes: ['vote'],
|
||||||
travel: ['travel', 'meeting', 'appearance', 'government_decision'],
|
travel: ['travel', 'meeting', 'appearance', 'government_decision'],
|
||||||
@@ -48,7 +48,7 @@ const GLANCE: [string, ClaimType[], Tab][] = [
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
params: Promise<{locale: string; slug: string}>;
|
params: Promise<{locale: string; slug: string}>;
|
||||||
searchParams: Promise<{tab?: string; since?: string; until?: string}>;
|
searchParams: Promise<{tab?: string; since?: string; until?: string; parts?: string}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
async function loadPerson(slug: string): Promise<Person> {
|
async function loadPerson(slug: string): Promise<Person> {
|
||||||
@@ -70,7 +70,7 @@ export async function generateMetadata({params}: Props): Promise<Metadata> {
|
|||||||
export default async function PersonPage({params, searchParams}: Props) {
|
export default async function PersonPage({params, searchParams}: Props) {
|
||||||
const {locale, slug} = await params;
|
const {locale, slug} = await params;
|
||||||
setRequestLocale(locale);
|
setRequestLocale(locale);
|
||||||
const {tab: rawTab, since, until} = await searchParams;
|
const {tab: rawTab, since, until, parts} = await searchParams;
|
||||||
const tab: Tab = rawTab && rawTab in TABS ? (rawTab as Tab) : 'overview';
|
const tab: Tab = rawTab && rawTab in TABS ? (rawTab as Tab) : 'overview';
|
||||||
const t = await getTranslations('Person');
|
const t = await getTranslations('Person');
|
||||||
const tp = await getTranslations('Persons');
|
const tp = await getTranslations('Persons');
|
||||||
@@ -217,7 +217,10 @@ export default async function PersonPage({params, searchParams}: Props) {
|
|||||||
{tab === 'votes' && (
|
{tab === 'votes' && (
|
||||||
<section>
|
<section>
|
||||||
<Notice tone="info">{t('factionVoteNote')}</Notice>
|
<Notice tone="info">{t('factionVoteNote')}</Notice>
|
||||||
<VoteList votes={await api.personVotes(slug)} />
|
<p className="small">
|
||||||
|
<Link href={parts ? href('votes') : `${href('votes')}&parts=1`}>{t(parts ? 'hidePartVotes' : 'showPartVotes')}</Link>
|
||||||
|
</p>
|
||||||
|
<VoteList votes={await api.personVotes(slug, Boolean(parts))} />
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// Image proxy for portraits, so that visitors' IP addresses don't reach the publishers.
|
||||||
|
// Only raster images from the hosts below: anything else would turn this into an open proxy.
|
||||||
|
import type {NextRequest} from 'next/server';
|
||||||
|
|
||||||
|
const ALLOWED_HOSTS = new Set(['www.parlament.gv.at', 'www.europarl.europa.eu']);
|
||||||
|
const IMAGE_TYPES = new Set(['image/jpeg', 'image/png', 'image/webp', 'image/gif']);
|
||||||
|
const MAX_BYTES = 5 * 1024 * 1024;
|
||||||
|
const MAX_REDIRECTS = 3;
|
||||||
|
const WEEK = 7 * 24 * 60 * 60;
|
||||||
|
|
||||||
|
function allowedUrl(raw: string | null): URL | null {
|
||||||
|
try {
|
||||||
|
const url = new URL(raw ?? '');
|
||||||
|
return url.protocol === 'https:' && ALLOWED_HOSTS.has(url.hostname) ? url : null;
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function GET(request: NextRequest): Promise<Response> {
|
||||||
|
let url = allowedUrl(request.nextUrl.searchParams.get('u'));
|
||||||
|
if (!url) return new Response(null, {status: 400});
|
||||||
|
const headers = {'User-Agent': process.env.POLITRACK_USER_AGENT ?? 'PolitrackBot/0.1'};
|
||||||
|
|
||||||
|
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
||||||
|
let upstream: Response;
|
||||||
|
try {
|
||||||
|
upstream = await fetch(url, {headers, redirect: 'manual', signal: AbortSignal.timeout(10_000), next: {revalidate: WEEK}});
|
||||||
|
} catch {
|
||||||
|
return new Response(null, {status: 502});
|
||||||
|
}
|
||||||
|
if (upstream.status >= 300 && upstream.status < 400) {
|
||||||
|
url = allowedUrl(new URL(upstream.headers.get('location') ?? '', url).href);
|
||||||
|
if (!url) return new Response(null, {status: 502});
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!upstream.ok) return new Response(null, {status: 404});
|
||||||
|
const type = (upstream.headers.get('content-type') ?? '').split(';')[0].trim().toLowerCase();
|
||||||
|
if (!IMAGE_TYPES.has(type)) return new Response(null, {status: 415});
|
||||||
|
const body = await upstream.arrayBuffer();
|
||||||
|
if (body.byteLength > MAX_BYTES) return new Response(null, {status: 413});
|
||||||
|
return new Response(body, {
|
||||||
|
headers: {'Content-Type': type, 'Cache-Control': `public, max-age=${WEEK}`, 'X-Content-Type-Options': 'nosniff'}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return new Response(null, {status: 502});
|
||||||
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import {initials} from '@/lib/format';
|
import {initials} from '@/lib/format';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Portrait or initials. Portraits come from Wikimedia/parliament: loaded lazily and without a referrer.
|
* Portrait or initials. Portraits go through our own image proxy (app/api/img), so that visitors' IP addresses
|
||||||
* Decorative (alt=""), because the name is always printed next to it.
|
* don't reach third parties. Decorative (alt=""), because the name is always printed next to it.
|
||||||
*/
|
*/
|
||||||
export function Avatar({name, src, size = 'md'}: {name: string; src?: string | null; size?: 'md' | 'lg'}) {
|
export function Avatar({name, src, size = 'md'}: {name: string; src?: string | null; size?: 'md' | 'lg'}) {
|
||||||
const className = size === 'lg' ? 'avatar avatar--lg' : 'avatar';
|
const className = size === 'lg' ? 'avatar avatar--lg' : 'avatar';
|
||||||
if (src) {
|
if (src) {
|
||||||
return <img src={src} alt="" className={className} loading="lazy" decoding="async" referrerPolicy="no-referrer" />;
|
return <img src={`/api/img?u=${encodeURIComponent(src)}`} alt="" className={className} loading="lazy" decoding="async" />;
|
||||||
}
|
}
|
||||||
return <span className={className} aria-hidden="true">{initials(name)}</span>;
|
return <span className={className} aria-hidden="true">{initials(name)}</span>;
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,8 @@ const TYPE_ICONS: Partial<Record<ClaimType, IconName>> = {
|
|||||||
wiki_edit: 'pencil',
|
wiki_edit: 'pencil',
|
||||||
declaration: 'document',
|
declaration: 'document',
|
||||||
ownership: 'link',
|
ownership: 'link',
|
||||||
affiliation: 'link'
|
affiliation: 'link',
|
||||||
|
election_result: 'vote'
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function TypeLabel({type}: {type: ClaimType}) {
|
export async function TypeLabel({type}: {type: ClaimType}) {
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ const ITEMS = {
|
|||||||
former: {href: '/ehemalige', key: 'former', icon: 'history'},
|
former: {href: '/ehemalige', key: 'former', icon: 'history'},
|
||||||
method: {href: '/methodik', key: 'method', icon: 'book'},
|
method: {href: '/methodik', key: 'method', icon: 'book'},
|
||||||
settings: {href: '/einstellungen', key: 'settings', icon: 'sliders'},
|
settings: {href: '/einstellungen', key: 'settings', icon: 'sliders'},
|
||||||
search: {href: '/suche', key: 'search', icon: 'search'}
|
search: {href: '/suche', key: 'search', icon: 'search'},
|
||||||
|
imprint: {href: '/impressum', key: 'imprint', icon: 'document'},
|
||||||
|
privacy: {href: '/datenschutz', key: 'privacy', icon: 'shield'}
|
||||||
} satisfies Record<string, NavItem>;
|
} satisfies Record<string, NavItem>;
|
||||||
|
|
||||||
export const PRIMARY_NAV: NavItem[] = [ITEMS.persons, ITEMS.parties, ITEMS.votes, ITEMS.money, ITEMS.organizations, ITEMS.calendar];
|
export const PRIMARY_NAV: NavItem[] = [ITEMS.persons, ITEMS.parties, ITEMS.votes, ITEMS.money, ITEMS.organizations, ITEMS.calendar];
|
||||||
@@ -26,5 +28,5 @@ export const NAV_GROUPS: {key: string; items: NavItem[]}[] = [
|
|||||||
{key: 'people', items: [ITEMS.persons, ITEMS.parties, ITEMS.former]},
|
{key: 'people', items: [ITEMS.persons, ITEMS.parties, ITEMS.former]},
|
||||||
{key: 'decisions', items: [ITEMS.votes, ITEMS.calendar, ITEMS.social]},
|
{key: 'decisions', items: [ITEMS.votes, ITEMS.calendar, ITEMS.social]},
|
||||||
{key: 'influence', items: [ITEMS.money, ITEMS.organizations, ITEMS.wikipedia]},
|
{key: 'influence', items: [ITEMS.money, ITEMS.organizations, ITEMS.wikipedia]},
|
||||||
{key: 'about', items: [ITEMS.method, ITEMS.settings, ITEMS.search]}
|
{key: 'about', items: [ITEMS.method, ITEMS.settings, ITEMS.search, ITEMS.imprint, ITEMS.privacy]}
|
||||||
];
|
];
|
||||||
@@ -22,7 +22,7 @@ export type CalendarEvent = {
|
|||||||
|
|
||||||
export type Claim = {
|
export type Claim = {
|
||||||
id: number;
|
id: number;
|
||||||
claim_type: 'role' | 'vote' | 'donation' | 'money_flow' | 'statement' | 'appearance' | 'meeting' | 'travel' | 'side_job' | 'legal_proceeding' | 'lobbying' | 'media_mention' | 'career' | 'parliamentary_question' | 'government_decision' | 'wiki_edit' | 'declaration' | 'ownership' | 'affiliation' | 'party_finance' | 'other';
|
claim_type: 'role' | 'vote' | 'donation' | 'money_flow' | 'statement' | 'appearance' | 'meeting' | 'travel' | 'side_job' | 'legal_proceeding' | 'lobbying' | 'media_mention' | 'career' | 'parliamentary_question' | 'government_decision' | 'wiki_edit' | 'declaration' | 'ownership' | 'affiliation' | 'party_finance' | 'election_result' | 'other';
|
||||||
summary_de: string;
|
summary_de: string;
|
||||||
summary_en: string | null;
|
summary_en: string | null;
|
||||||
occurred_at: string | null;
|
occurred_at: string | null;
|
||||||
|
|||||||
+2
-2
@@ -74,9 +74,9 @@ export const api = {
|
|||||||
persons: (params: Params) => get<T.PersonListItem[]>('/api/v1/persons', params),
|
persons: (params: Params) => get<T.PersonListItem[]>('/api/v1/persons', params),
|
||||||
person: (slug: string) => get<T.PersonDetail>(`/api/v1/persons/${enc(slug)}`),
|
person: (slug: string) => get<T.PersonDetail>(`/api/v1/persons/${enc(slug)}`),
|
||||||
personNetwork: (slug: string) => get<T.Network>(`/api/v1/persons/${enc(slug)}/network`),
|
personNetwork: (slug: string) => get<T.Network>(`/api/v1/persons/${enc(slug)}/network`),
|
||||||
personVotes: async (slug: string) => {
|
personVotes: async (slug: string, includeParts = false) => {
|
||||||
const prefs = await getPrefs();
|
const prefs = await getPrefs();
|
||||||
return get<T.PersonVote[]>(`/api/v1/persons/${enc(slug)}/votes`, {topics: prefs.topics});
|
return get<T.PersonVote[]>(`/api/v1/persons/${enc(slug)}/votes`, {topics: prefs.topics, include_parts: includeParts || undefined});
|
||||||
},
|
},
|
||||||
former: (params: Params) => get<T.FormerPerson[]>('/api/v1/former', params),
|
former: (params: Params) => get<T.FormerPerson[]>('/api/v1/former', params),
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// The operator's details for the legal pages. They come from the environment (.env on the server), so the
|
||||||
|
// operator's name and address stay out of this public repository. Read at request time, not at build time.
|
||||||
|
export function legalDetails() {
|
||||||
|
const email = process.env.POLITRACK_LEGAL_EMAIL || null;
|
||||||
|
return {
|
||||||
|
name: process.env.POLITRACK_LEGAL_NAME || null,
|
||||||
|
address: process.env.POLITRACK_LEGAL_ADDRESS || null,
|
||||||
|
email,
|
||||||
|
correctionsEmail: process.env.POLITRACK_CORRECTIONS_EMAIL || email
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user