fetch_commons_memberships | R Documentation |
fetch_commons_memberships
fetches data from the Members Names platform
showing Commons memberships for each MP. The memberships are processed to
impose consistent rules on the start and end dates for memberships. A
membership with an NA end date is still open.
fetch_commons_memberships(from_date = NA, to_date = NA, on_date = NA)
from_date |
A string or Date representing a date. If a string is used it should specify the date in ISO 8601 date format e.g. '2000-12-31'. The default value is NA, which means no records are excluded on the basis of the from_date. |
to_date |
A string or Date representing a date. If a string is used it should specify the date in ISO 8601 date format e.g. 2000-12-31'. The default value is NA, which means no records are excluded on the basis of the to_date. |
on_date |
A string or Date representing a date. If a string is used it should specify the date in ISO 8601 date format e.g. 2000-12-31'. The default value is NA, which means no records are excluded on the basis of the on_date. |
The from_date and to_date arguments can be used to filter the memberships returned. The on_date argument is a convenience that sets the from_date and to_date to the same given date. The on_date has priority: if the on_date is set, the from_date and to_date are ignored.
The filtering is inclusive: a membership is returned if any part of it falls within the period specified with the from and to dates.
Note that a membership with an NA end date is still open.
A tibble of Commons memberships for each MP, with one row per Commons membership.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.