This is the API wrapper function for the getDataset operation. It retrieves the ZIP archive of the requested session dataset, then unzip the content to a specified local directory.

get_dataset(dataset_list, save_to_dir = ".",
  api_key = legiscan_api_key())

Arguments

dataset_list

List object returned from get_dataset_list

save_to_dir

Local directory to save the unzipped dataset. Default to working directory "."

api_key

Your LegiScan API key (see legiscan_api_key)

Value

NULL. No return value. Dataset will be unzipped to local disk.

See also

Examples

# NOT RUN {
# One dataset
get_dataset(one_dataset, save_to_dir = "data_json")

# Multiple datasets. Use walk() to avoid printing NULL to console.
# But lapply() and map() works too
walk(multiple_datasets, get_dataset, save_to_dir = "data_json")
# }