Description Usage Arguments Value Examples
The class inherits all methods from a data frame, but has many fixed attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | indicator(
x,
shortcode,
indicator_code = NULL,
indicator_name = NULL,
description,
description_at_source = NA_character_,
last_update_data = NULL,
date_earliest = NULL,
date_latest = NULL,
original_source = NA_character_,
code_at_source = NULL,
doi = NULL,
keyword1,
keyword2,
keyword3,
keyword4,
keywords = NA_character_
)
is.indicator(x)
## S3 method for class 'indicator'
print(x, ...)
|
x |
A data.frame or tibble with at least |
shortcode |
A short, unique, programatically usable, memorizable indicator ID, given by an observatory curator. |
indicator_code |
A machine-generated code. If there is no machine-generated code present,
it is filled with |
indicator_name |
A unique name for the indicator. |
description |
A precise character string describing the indicator for the data catalogue of the data observatory. |
description_at_source |
A machine read description from the source, may require manual revision. |
last_update_data |
The creation/refreshment date of the indicator. If omitted, calls
|
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_. |
code_at_source |
The identifier in the original source, if applicable. |
doi |
A document object identifier, if exists. |
keyword1 |
The first keywords must be on of the observatories: |
keyword2 |
The second keyword must be one of the pillars of the observatory. |
keyword3 |
The third must be a topic within a pillar. |
keyword4 |
A search term within the topic. |
keywords |
A character vector of any optional, further keywords. |
A data.frame or tibble with indicator attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | test_indicator <- indicator (
x <- data.frame (
geo = rep(c("NL", "BE", "LU"), 4),
time = rep(c(2016:2019),3),
value = runif(12, 1,100),
estimate = rep("actual", 12)
),
shortcode = "observatory_test_1",
description = "A test indicator with random numbers",
last_update_data = as.Date ( "2020-08-24"),
date_earliest = min (x$time, na.rm=TRUE),
date_latest = max(x$time, na.rm=TRUE),
keyword1 = "music", keyword2 = "economy", keyword3 = "demand", keyword4="pcr"
)
## Only the first 10 observations are printed
print (test_indicator)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.