indicator.RdThe class inherits all methods from a data frame, but has many fixed attributes.
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 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. |
| 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.
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)#> indicator [observatory_test_1] music - economy - demand #> A test indicator with random numbers #> Source: music.dataobservatory.eu ; DOI: <not yet assigned or unknown> #> The first 10 observations of 12 #> geo time value estimate #> 1 NL 2016 8.994264 actual #> 2 BE 2017 83.598971 actual #> 3 LU 2018 60.475328 actual #> 4 NL 2019 16.563636 actual #> 5 BE 2016 1.732545 actual #> 6 LU 2017 47.172956 actual #> 7 NL 2018 50.279961 actual #> 8 BE 2019 29.686957 actual #> 9 LU 2016 73.555317 actual #> 10 NL 2017 77.479630 actual