get_data {swissparl} | R Documentation |
Retrieve data from WebServices
Description
get_data
retrieves data from the WebServices of the Swiss Parliament.
Usage
get_data(
table,
package_size = 1000,
stop = T,
attempts = 10,
wtf = 1,
silent = F,
...
)
Arguments
table |
name of the table to download. For an overview of available tables use |
package_size |
number of rows to download at once (maximum = 1000). If a query exceeds |
stop |
if |
attempts |
maximum number of repetitions of a single subquery if it was not successful. |
wtf |
factor for extending the waiting time after unsuccessful queries. If |
silent |
if |
... |
optional filter arguments with values. Since all entries are available in several languages, it is
recommended to filter the calls by language., e.g.
|
Value
A tibble of different length and variable composition.
Examples
## Not run:
# Retrieve data on the members of the Swiss Parliament
get_data(table = "Person", Language = "DE")
# Retrieve voting behavior of selected councillors
get_data(
table = "Voting",
PersonNumber = c(21, 4167),
Language = "DE"
)
# Retrieve businesses submitted during a specified period
get_data(
table = "Business",
SubmissionDate = c(">2018-12-31", "<2019-02-01"),
Language = "DE"
)
# Retrieve businesses on the subject of CO2
get_data(
table = "Business",
Title = "~CO2",
Language = "DE"
)
## End(Not run)