Skip to contents

Download the results of your API query, using the status_url returned in start_ukcp_csv_job. Polls server once every five seconds.

Usage

download_ukcp_csv_results(
  status_url,
  output_folder = "outputs",
  keep_zip = F,
  API_KEY = Sys.getenv("UKCP_API_KEY")
)

Arguments

status_url

URL used to retrieve results from the API.

output_folder

Folder (in working directory) to save .csv files to.

keep_zip

Keep the original zip file (in your working directory root folder). Note the initial name will always be temp.zip.

API_KEY

UKCP API key. Defaults to using environment variable UKCP_API_KEY.

Value

Downloads the .zip file held at the status_url and extracts the csv(s) within (users can optionally keep the .zip file).

Examples

if (FALSE) {
 download_ukcp_csv_results(
  status_url = "https://ukclimateprojections-ui.metoffice.gov.uk/status/your-id-here",
  output_folder = "outputs"
)
}