get_related_data2: Retrieve related data for an OpenParlData record

View source: R/get_data.R

get_related_data2R Documentation

Description

get_related_data2 retrieves related records that are available for an OpenParlData record via its linked resources.

Usage

get_related_data2(res, table, silent = FALSE)

Arguments

res

an OpenParlData record (typically one row) as returned by get_data2().

table

name of the related table to retrieve. Use get_related_tables2() to see which related tables are available.

silent

if TRUE, no progress bar and messages are displayed.

Details

The function downloads the related data for a specified related table and combines the results into a single tibble. If multiple entities are present, the function iterates over them and optionally displays a progress bar.

Value

A tibble containing the related records.

Examples

## Not run: 
# Retrieve one person
res <- get_data2("persons", firstname = "Gerhard", lastname = "Andrey")

# List available related tables
get_related_tables2(res)

# Retrieve related data (replace "memberships" with an available table)
get_related_data2(res, table = "memberships")

## End(Not run)

swissparl documentation built on March 4, 2026, 9:07 a.m.