risAT is an R package that provides a tidyverse-friendly interface to the
Austrian RIS Open Government Data API (OGD-RIS API v2.6).
The package focuses on:
- reproducible research
- tidy data structures
- easy access to Austrian legal texts and jurisprudence
The API is documented here: https://data.bka.gv.at/ris/api/v2.6/
The package follows these principles:
-
User-facing API in English
- Function names and arguments are English
- snake_case naming
-
Internal mapping to RIS parameters
- RIS API parameters are in German
- The package translates internally
-
Tidyverse style
- Functions return
tibble - nested data stored as list-columns
- compatible with dplyr / tidyr / purrr workflows
- Functions return
-
Consistency with ParlAT
- same philosophy as the ParlAT package
- predictable naming scheme
- reproducible data pipelines
Initial focus: Jurisprudence
Endpoints:
- Judikatur / VwGH
- Judikatur / VfGH
Functions to implement:
ris_search_vwgh()ris_search_vfgh()ris_parse_search()
Base URL:
https://data.bka.gv.at/ris/api/v2.6/
Jurisprudence endpoint:
/Judikatur
Required parameter:
Applikation = "Vwgh" or "Vfgh"
User-facing arguments (English):
- query
- case_number
- legal_norm
- decision_date_from
- decision_date_to
- decision_type
- search_in
Internal mapping:
| English arg | RIS parameter |
|---|---|
| query | Suchworte |
| case_number | Geschaeftszahl |
| legal_norm | Norm |
| decision_date_from | EntscheidungsdatumVon |
| decision_date_to | EntscheidungsdatumBis |
| decision_type | Entscheidungsart |
Search location mapping:
search_in → RIS Dokumenttyp:
- "both"
- "headnotes" → SucheInRechtssaetzen
- "decision_texts" → SucheInEntscheidungstexten
All search functions return a tibble with:
Core columns:
- id
- application
- court
- decision_date
- case_number
- decision_type
- title
- ris_url
List columns:
- content_urls (tibble with data_type + url)
- app_metadata (nested metadata)
Attributes:
- total_hits
- page_number
- page_size
Function: ris_parse_search()
Responsibilities:
-
extract OgdSearchResult
-
flatten OgdDocumentReference list
-
extract metadata from:
- Metadaten/Technisch
- Metadaten/Allgemein
- application-specific metadata
-
extract content URLs from: Dokumentliste → ContentReference → ContentUrl
-
convert to tidy tibble
The package should include:
ris_req()→ build httr2 requestris_perform_json()→ perform request + parse JSONris_docproseite()→ map numeric page size to RIS enumris_parse_search()→ tidy parser
Use:
testthat- optionally
httptest2for mocking API calls
Basic tests:
- functions return tibble
- pagination works
- parser returns expected columns
Use roxygen2.
Each exported function must include:
- description
- parameters
- return value
- examples
Planned extensions:
- Justiz (OGH, LG, BG, …)
- BVwG / LVwG
- Bundesrecht (BrKons)
- BGBl
- History endpoint
Helpers:
ris_fetch_html()ris_fetch_pdf()ris_pick_content_url()
- tidyverse style
- pipe-friendly
- no base R loops where purrr is clearer
- explicit names
- minimal dependencies
- Respect RIS API rate limits
- avoid large parallel downloads
- follow OGD netiquette
When modifying this repo:
- Preserve function interfaces
- Keep English user-facing API
- Maintain tidy tibble output
- Do not break backward compatibility
- Keep parsing logic robust to missing fields
- Prefer clarity over cleverness