combine_party_memberships: Combine consecutive records in a tibble of party memberships

View source: R/combine.R

combine_party_membershipsR Documentation

Combine consecutive records in a tibble of party memberships

Description

combine_party_memberships takes a tibble of party memberships and combines historically consecutive memberships of the same party into a single continuous memberships with the start date of the first membership and the end date of the last. Combining the memberships in this way means that party membership ids from the data platform are not included in the dataframe returned.

Usage

combine_party_memberships(pm)

Arguments

collapse

A tibble containing party memberships as returned by one of the fetch party membership functions.

Value

A tibble of party memberships, with one row per party membership. The memberships are processed and combined so that there is only one party membership for a period of continuous membership within the same party.


houseofcommonslibrary/clmnis documentation built on Aug. 17, 2024, 9:31 p.m.