Metadata-class {MacrobondAPI}R Documentation

Metadata object

Description

A Metadata object is a container for metadata attributes of a TimeSeries or Entity. Metadata is represented by a name and a value. The type of the value can be a character, logical, numeric, integer or POSIXlt. An examples of a metadata names are "Region" and "Currency". Some metadata can have multiple values, like Region, but others, Currency, can have only one value. You can find out detailes about each type of metadata attribute through the MetadataInformation class. Read more about metadata here.

Details

Commonly used meta data attribute names are:

Region

A region code based on the ISO 3166 standard.

Currency

The currency code based on the three letter ISO 4217 codes.

DisplayUnit

The unit of the series.

Class

The class is a string with one of the values "stock" or "flow". This determines how the automatic frequency conversion in Macrobond works. If the value is flow, the data will be aggregated when converted to a lower frequency and distributed over the period when converted to a higher frequency.

MaturityDate

Some analyses, such as the Yield curve analysis, can use this information to automatically configure the maturity length. If you set this value, you should also set RateMethod but not set the MaturityDays value.

MaturityDays

This value is a positive integer that some analyses, such as the Yield curve analysis, can use this information to automatically configure the maturity length. If you set this value, you should also set RateMethod but not set the MaturityDate value. 1 week is 7 days, 1 month is 30 days and one year is 360 days.

RateMethod

This value should be either "simple" or "effective" that some analyses, such as the Yield curve analysis, can use this information for automatically configuration. If you set this value, you should also set one of the MaturityDate or MaturityLength values.

ForecastCutoffDate

This is used only when creating new in-house series. All observation at this date and later will flagged as forecasts. The date must not be before the start or after the end of the series.

IHCategory

This is a text describing the category for an in-house series. This can be set when uploading series. It will be used together with Region to group series in the Macrobond application when browsing the in-house database.

IHInfo

This is an optional comment for an in-house series. This can be set when uploading series and can be seen in the Series information report in the Macrobond application.

Currency

The currency code based on the three letter ISO 4217 codes.

LastModifiedTimeStamp

When the entity was last modified. This includes changes in both values (for time series) as well as metadata.

Source

The name of the source entity. Use this name in FetchOneEntity in order to get more information about the source.

Security

The name of the security entity. Use this name in FetchOneEntity in order to get more information about the security.

Company

The name of the company entity. Use this name in FetchOneEntity in order to get more information about the company.

Release

The name of the release entity. Use this name in FetchOneEntity in order to get more information about the release.

LastReleaseEventTime

For entities of type "Release": A timestamp for the previous release.

NextReleaseEventTime

For entities of type "Release": A timestamp for the next scheduled release.

Objects from the Class

Metadata for a TimeSeries or Entity can be retrieved by calling getMetadata.

New Metadata objects can be created by calling CreateEmptyMetadata or CreateDerivedMetadata. The content of newly created objects can be modified and can then be used when uploading in-house series.

Methods

getFirstMetadataValue

signature(m = "Metadata", name = "character"): Get the first metadata value for the attribute. This method is convenient since most metadata attributes can have only one value. If the attribute does not exist, then NULL is returned.

getMetadataValues

signature(m = "Metadata", name = "character"): Get a list of all the metadata value for the attribute. If the attribute does not exist, then an empty list is returned.

addMetadataValue

signature(m = "Metadata", name = "character", value = "ANY"): Add a metadata value of the specified name. The value can be a single value or a list, if that is allowed for the type of metadata. The data type of the value must match the definition in MetadataInformation.

getIsReadonly

signature(m = "Metadata"): Indicating whether new values can be added or hidden in this instance. Typically, only newly created instances of the metadata objects can be edited and only until they have been used in a series.

getMetadataNames

signature(m = "Metadata"): Get a list of all the metadata specified together with a description for each name.

hideMetadataValue

signature(m = "Metadata", name = "character"): Hide a value inherited from a parent metadata object.

show

signature(object = "Metadata"): Show a list of all the attributes in the object.

See Also

getMetadata, CreateEmptyMetadata, CreateDerivedMetadata, UploadOneOrMoreTimeSeries, MetadataInformation

Examples

seriesGdp <- FetchOneTimeSeries("usgdp")
meta <- getMetadata(seriesGdp)
show(meta)

[Package MacrobondAPI version 1.1-5 Index]