Downloads UK trade in goods and services data from the ONS. Available from 1948.
Usage
ons_trade(
measure = c("balance", "exports", "imports"),
from = NULL,
to = NULL,
cache = TRUE
)Arguments
- measure
Character. One of
"balance"(default, trade balance),"exports"(total exports), or"imports"(total imports). All in GBP millions, current prices, seasonally adjusted.- from
Date or character (YYYY-MM-DD). Start date. Defaults to
NULL(all available data).- to
Date or character (YYYY-MM-DD). End date. Defaults to
NULL.- cache
Logical. Use cached data if available (default
TRUE).
Value
A data frame with columns:
- date
Date. First day of the month.
- value
Numeric. Trade value (GBP millions).
See also
Other trade and prices:
ons_house_prices(),
ons_retail_sales()