download: Downloads time series data from UK office for National...

Description Usage Arguments Value Author(s) Examples

View source: R/onsR2.R

Description

The ONS publishes data in either dataset format or refernce table format. The dataset format can be dowload as csv but need to know the 4-letter code of the series and the specific dataset the series reside. The package has 19000 4-letter codes together with their corresponding dataset and other meta information. Once a code is specified, the function lookup the corrending dataset and download the series directly from ONS website.

Usage

1
  download(code, format = "ts")

Arguments

code

4-letter code for the time series

format

The format in which the data is returned(ts=time series, df= dataframe)

Value

title

description of time series

m_data

monthly time series (or data frame if format='df') data if available or NULL

q_data

quarterly time series (or data frame if format='df') data if available or NULL

y_data

yearly time series (or data frame if format='df') data if available or NULL

Author(s)

E Amoakohene (eamoakohene@gmail.com)

Examples

1
2
3
4
5
  #  download("ABMI")             #downloads GDP data in ts-format
  #  download("ABMI",format="df") #downloads GDP data in data frame format
  #  download("CHAY")             #downloads the RPI index

 

eamoakohene/onsR2 documentation built on May 17, 2021, 5:10 p.m.