Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


timeseriesdb (version 0.4.1)

createTimeseriesMain: Create Statements for PostgreSQL tables

Description

These function creates statements to set up 5 Tables used to manage and archive time series information in PostgreSQL. Make sure you have sufficient rights to create relations in your PostgreSQL schema. These function are only used for an initial setup. You can either run this group of functions separately or use runCreateTables to run all functions at once.

Usage

createTimeseriesMain(schema = "timeseries", tbl = "timeseries_main")

createTimeseriesVintages(schema = "timeseries", tbl = "timeseries_vintages")

createTimeseriesSets(schema = "timeseries", tbl = "timeseries_sets")

createMetaUnlocalized(schema = "timeseries", tbl = "meta_data_unlocalized", main = "timeseries_main")

createMetaLocalized(schema = "timeseries", tbl = "meta_data_localized", main = "timeseries_main")

createMetaDatasets(schema = "timeseries", tbl = "meta_datasets")

Arguments

schema

character denoting a PostgreSQL schema

tbl

character denoting a table name

main

character denoting name of the main table for referencing. This argument is only available to meta data statements.

Details

The following tables will be create in the given schema.

  • "timeseries_main"contains time series themselves as hstore key value pairs.

  • "timeseries_vintages"contains vintages of time series. This is useful for published data that can be revised. see also OECD defintion of vintages

  • "timeseries_sets"contains a vector of time series keys. This table can be used like a shopping cart in an e-commerce application.

  • "meta_data_unlocalized"contains translation agnostic meta information, e.g., username.

  • "meta_data_localized"contains translation specific meta information, e.g., wording of a question.

References

OECD Defintion of vintages: http://www.oecd.org/std/40315408.pdf