View source: R/download_data.R
| download_data | R Documentation |
This function allows you to download data from the IUROPA CJEU
Database via the IUROPA API. This function provides the same functionality
as the IUROPA Download Tool, which is available on the IUROPA website. You
need to choose a component in the IUROPA CJEU Database and a table in that
component. For example, you could choose the decisions table of the
CJEU Database Platform. You can specify filters to select specific
observations and you can select specific variables. You can use
describe_variables() to learn more about the variables available in
each table.
download_data(
component,
table,
filters = NULL,
variables = NULL,
session = NULL
)
component |
A string. The code for a component. Use
|
table |
A string. The name of a table in the specified
component. Use |
filters |
A named list. The default is |
variables |
A string vector. The default is |
session |
An object of class |
The IUROPA API has a rate limit, so this function downloads data from the IUROPA API in batches. It downloads 25,000 observations every 5 seconds. It prints a message to the console that indicates how many observations you have requested and approximately how long it will take to download the data. It also prints a message after every batch that indicates the current progress. After your download is complete, it will print the suggested citations for the data. Please use these citations if you use the data in a paper.
This function returns a tibble containing the requested data.
## Not run:
data <- download_data(
component = "cjeu_database_platform",
table = "decisions",
filters = list(
court = c("Court of Justice", "General Court")
)
)
data <- download_data(
component = "cjeu_database_platform",
table = "assignments",
filters = list(
court = "Court of Justice",
decision_date_min = "2015-01-01"
),
variables = c("iuropa_decision_id", "iuropa_judge_id", "judge")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.