The class inherits all methods from a data frame, but has many fixed attributes.

indicator(
  x,
  shortcode,
  description,
  date_created,
  date_earliest,
  date_latest,
  original_source = NA_character_,
  original_code = NA_character_,
  keyword1,
  keyword2,
  keyword3,
  keywords = NA_character_
)

is.indicator(x)

# S3 method for indicator
print(x, ...)

Arguments

x

A data.frame or tibble.

shortcode

A short, unique, programatically usable indicator ID.

description

A precise character string describing the indicator for the data catalogue of the data observatory.

date_created

The creation day or the refreshment day of the indicator.

date_earliest

The date of the earliest observation. Can be a numeric containing a year.

date_latest

The date of the latest observation.

original_source

Defaults to NA_character_.

original_code

The identifier in the original source, if applicable.

keyword1

The first keywords, must be one of the pillars of the observatory.

keyword2

The second keyword must be a topic within a pillar.

keyword3

A search term within the topic.

keywords

A character vector of any optional, further keywords.

Value

A data.frame or tibble with indicator attributes.

Examples

test_indicator <- indicator ( x <- data.frame ( geo = rep(c("NL", "BE", "LU"), 4), time = rep(c(2016:2019),3), values = runif(12, 1,100) ), shortcode = "observatory_test_1", description = "A test indicator with random numbers", date_created = as.Date ( "2020-08-24"), date_earliest = min (x$time, na.rm=TRUE), date_latest = max(x$time, na.rm=TRUE), keyword1 = "test", keyword2 = "random", keyword3 = "Benelux" ) ## Only the first 10 observations are printed print (test_indicator)
#> indicator [observatory_test_1] test - random - Benelux #> A test indicator with random numbers #> The first 10 observations of 12 #> geo time values #> 1 NL 2016 8.994264 #> 2 BE 2017 83.598971 #> 3 LU 2018 60.475328 #> 4 NL 2019 16.563636 #> 5 BE 2016 1.732545 #> 6 LU 2017 47.172956 #> 7 NL 2018 50.279961 #> 8 BE 2019 29.686957 #> 9 LU 2016 73.555317 #> 10 NL 2017 77.479630