list_os_datapackages {osdatahub}R Documentation

Retrieve information on premium OS data packages

Description

Query the osdatahub Downloads API to gather information on available downloads for a specific OS premium data package based on given filters.

Usage

list_os_datapackages(product_id, version_id, key = get_os_key(), ...)

Arguments

product_id

(numeric or character) Retrieve information on a specific data product. Optional.

version_id

(numeric or character) Retrieve information on a specific version of a data product. Optional and only available when product_id has been specified.

key

(character) OS API key. Default action is to search for an environment variable using get_os_key().

...

Additional paramters. Not currently used.

Details

The OS Downloads API assists with the discovery and download of OS OpenData and OS premium data packages. This function is used for initial listing and discovery of premium products. Use the product and version IDs from this list to filter further or to initiate a download.

Before downloading a data package, it must be ordered online. See: https://osdatahub.os.uk/downloads/packages.

When a product_id is not specified then all available data packages are listed. The version_id filter can be used to find the specific download, but this filter is only valid when a specific product has been specified first.

For more information on the Downloads API, see https://osdatahub.os.uk/docs/downloads/technicalSpecification.

Value

A data.frame or a package_list, which extends a data.frame, containing the information on downloadable files from the Downloads API.

See Also

download_os_datapackages()

Examples

## Not run: 
# Retrieve a data.frame listing all OS Data Packages available.
# An API key is required and the packages must be ordered online first.
dp <- list_os_datapackages()

# Retrieve a specific data package.
# Note: 'product_id' will vary.
dp <- list_os_datapackages(product_id = 1234)

## End(Not run)


[Package osdatahub version 0.2.0 Index]