Learn R Programming

iotables (version 0.9.4)

iotable_year_get: Get available years from bulk IO tables

Description

Query which years are available for a given Eurostat IO product, country (geo), and currency unit in a bulk download.

Usage

iotable_year_get(
  labelled_io_data = NULL,
  source = "germany_1995",
  geo = "DE",
  unit = "MIO_EUR",
  time_unit = "year",
  stk_flow = "TOTAL",
  data_directory = NULL,
  force_download = TRUE
)

Value

A numeric vector of years, or a date vector if time_unit = "time".

Arguments

labelled_io_data

Optional labelled IO data from iotables_download(). If supplied, avoids re-reading from disk.

source

Character. Eurostat product code (see Details).

geo

Country code or name (e.g. "SK" or "Slovakia").

unit

Currency unit. Defaults to "MIO_NAC" (millions of national currency). Alternative: "MIO_EUR".

time_unit

Return mode for time. "year" (default) returns numeric years; "time" returns a vector of dates.

stk_flow

Flow type. Defaults to "DOM" (domestic output). Alternatives:

  • "IMP" for imports

  • "TOTAL" for total output For sources "naio_10_cp1620" (margins) and "naio_10_cp1630" (taxes), only "TOTAL" is used.

data_directory

Optional path used with iotable_get() or iotables_download() to persist bulk data.

force_download

Logical. Defaults to TRUE. If FALSE, reuse an existing file in data_directory or tempdir() when available.

Details

This function is usually called indirectly via iotable_get(). You normally do not need to call iotables_download() yourself unless working with bulk Eurostat files.

Supported Eurostat products include (non-exhaustive):

  • "naio_10_cp1700" — Symmetric IO table, basic prices (product × product)

  • "naio_10_cp1750" — Symmetric IO table, basic prices (industry × industry)

  • "naio_10_pyp1700" — Symmetric IO table (product × product), previous years’ prices

  • "naio_10_pyp1750" — Symmetric IO table (industry × industry), previous years’ prices

  • "naio_10_cp1620" / "naio_10_pyp1620" — Trade & transport margins

  • "naio_10_cp1630" / "naio_10_pyp1630" — Taxes less subsidies on products

See the Eurostat Symmetric Input–Output Tables page.

See Also

Other iotables processing functions: conforming_vector_create(), empty_remove(), household_column_find(), household_column_get(), key_column_create(), matrix_round(), output_get(), primary_input_get(), rows_add(), supplementary_add(), total_tax_add(), vector_transpose_longer(), vector_transpose_wider()

Examples

Run this code
germany_years <- iotable_year_get(
  source = "germany_1995", geo = "DE", unit = "MIO_EUR"
)
# Return as dates
germany_dates <- iotable_year_get(
  source = "germany_1995", geo = "DE",
  unit = "MIO_EUR", time_unit = "time"
)

Run the code above in your browser using DataLab