Reference

Aeconomica.set_apikeyFunction
set_apikey(key)

Set the API key to be used for requests. API keys are shown on the account page (https://aeconomica.io/account).

Alternatively, you can set the environmental variable AECONOMICA_APIKEY, which will be loaded at package load time.

You can overwrite this key at anytime by calling set_apikey again.

source

Series

Aeconomica.fetch_seriesFunction
fetch_series(code::AbstractString, vintage::AbstractString)

Fetch series with series_id code.

Vintage can be any of current (alias latest, default), previous or a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, series_id, values, vintage.

source
fetch_series(codes::AbstractArray{<:AbstractString, 1}, vintage::AbstractString)

Fetch a list of series with codes given by the array codes. For all series, fetch the vintage given by vintage.

Vintage can be any of current (alias latest, default), previous or a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, series_id, values, vintage.

source
fetch_series(series::AbstractArray{T, 1}) where T <: Pair{<:AbstractString, <:AbstractString}

Fetch a list of series with specified series codes and vintages.

Each element of the list is a pair series_code => vintage. Vintage must be explicitly specified.

Vintage can be any of current (alias latest), previous or a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, series_id, values, vintage.

Example

fetch_series(["CPI" => "latest", "CPI_SYD" => "previous"])`

source
Aeconomica.fetch_series_as_atFunction
fetch_series_as_at(code::AbstractString, as_at_date::AbstractString)

Fetch series with seriesid code, with whatever the latest vintage of the series was as at the date specified by `asat_date`.

asatdate must be a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, as_at_date, series_id, values.

source
fetch_series_as_at(codes::AbstractArray{<:AbstractString, 1}, as_at_date::AbstractString)

Fetch a list of series with codes given by the array codes, with whatever the latest vintage of the series was as at the date specified by as_at_date.

asatdate must be a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, as_at_date, series_id, values.

source
fetch_series_as_at(series::AbstractArray{T, 1}) where T <: Pair{<:AbstractString, <:AbstractString}

Fetch a list of series with specified series codes, with whatever the latest vintage of the series was as at the date specified by as_at_date.

Each element of the list is a pair series_code => as_at_date.

asatdate must be a date in YYYY-MM-DD form.

Returns a dataframe with four colums: dates, as_at_date, series_id, values.

Example

fetch_series_as_at(["CPI" => "2021-01-01", "CPI_SYD" => "2019-01-01"])`

source

Datasets

Aeconomica.fetch_datasetFunction
fetch_dataset(dataset_id::AbstractString; restrictions::Dict{<:AbstractString, <:AbstractArray{<:AbstractString, 1}}, vintage::AbstractString = "latest", dimensions::Symbol = :code)

Fetch dataset with datasetid `datasetid`.

Restrictions is an (optional) dictionary with keys (corresponding to names of dimensions) mapping to an Array of codes. Only series that have those codes for that dimension are returned in the dataset.

Vintage can be any of current (alias latest, default), previous or a date in YYYY-MM-DD form.

dimensions can be one of :code or :name. This dictates whether the values for each dimension in the dataset are returned as the codes for each dimension (the default), or (for :name) the long names that correspond to those codes.

Returns a dataframe, including columns: values, vintage. The dataframe will also have columns for each of the dimensions of the dataset.

source