Generate only the tabular codebook and the machine-readable JSON-LD metadata.
compact_codebook(results)
| results | the data frame |
|---|
# will generate figures in a figure/ subdirectory old_base_dir <- knitr::opts_knit$get("base.dir") knitr::opts_knit$set(base.dir = tempdir()) on.exit(knitr::opts_knit$set(base.dir = old_base_dir)) data("bfi") bfi <- bfi[, c("BFIK_open_1", "BFIK_open_1")] compact_codebook(bfi)#> #> #> #> #> #> ```r #> knitr::asis_output(data_info) #> ``` #> #> #> #> #> ### Metadata #> #> #### Description #> #> ```r #> if (exists("name", meta)) { #> glue::glue( #> "__Dataset name__: {name}", #> .envir = meta) #> } #> ``` #> #> __Dataset name__: results #> #> ```r #> cat(description) #> ``` #> #> The dataset has N=28 rows and 2 columns. #> 28 rows have no missing values on any column. #> #> <details> #> <summary title="Expand this section to see some additional metadata in a structured format that is useful for search engines">Metadata for search engines</summary> #> #> #> #> #> #> #> - __Date published__: 2019-02-21 #> #> ```r #> meta <- meta[setdiff(names(meta), #> c("creator", "datePublished", "identifier", #> "url", "citation", "spatialCoverage", #> "temporalCoverage", "description", "name"))] #> pander::pander(meta) #> ``` #> #> #> #> * **keywords**: _BFIK_open_1_ and _BFIK_open_1.1_ #> #> <!-- end of list --> #> #> </details> #> #> #> #> ```r #> knitr::asis_output(survey_overview) #> ``` #> #> #> ## Variables #> #> #> ```r #> if (detailed_variables || detailed_scales) { #> knitr::asis_output(paste0(scales_items, sep = "\n\n\n", collapse = "\n\n\n")) #> } #> ``` #> #> #> ```r #> missingness_report #> ``` #> #> #> #> ```r #> items #> ``` #> #> #> #> #> ## Codebook table #> #> ```r #> export_table(metadata_table) #> ``` #> #>  #> #> #> ```r #> jsonld #> ``` #> #> #> #> #> <script type="application/ld+json"> #> { #> "name": "results", #> "datePublished": "2019-02-21", #> "description": "The dataset has N=28 rows and 2 columns.\n28 rows have no missing values on any column.\n\n\n## Table of variables\nThis table contains variable names, labels, their central tendencies and other attributes.\n\n|name |label |type |type_options |data_type |value_labels |optional |item_order |missing |complete |n |mean |sd |p0 |p25 |p50 |p75 |p100 |hist |\n|:-------------|:------------------------------------|:-------------|:------------|:---------|:----------------------------------------------------------------------------------------------------------------------------|:--------|:----------|:-------|:--------|:--|:----|:----|:--|:---|:---|:---|:----|:--------|\n|BFIK_open_1 |__Ich bin vielseitig interessiert.__ |rating_button |5 |numeric |1. 1: Trifft überhaupt nicht zu, - 2. 2, - 3. 3, - 4. 4, - 5. 5: Trifft voll und ganz zu, - NA. Item was never rendered for this user. |0 |8 |0 |28 |28 |4.39 |0.83 |2 |4 |5 |5 |5 |▁▁▂▁▁▃▁▇ |\n|BFIK_open_1.1 |__Ich bin vielseitig interessiert.__ |rating_button |5 |numeric |1. 1: Trifft überhaupt nicht zu, - 2. 2, - 3. 3, - 4. 4, - 5. 5: Trifft voll und ganz zu, - NA. Item was never rendered for this user. |0 |8 |0 |28 |28 |4.39 |0.83 |2 |4 |5 |5 |5 |▁▁▂▁▁▃▁▇ |\n\n### Note\nThis dataset was automatically described using the [codebook R package](https://rubenarslan.github.io/codebook/) (version 0.8.0).", #> "keywords": ["BFIK_open_1", "BFIK_open_1.1"], #> "@context": "http://schema.org/", #> "@type": "Dataset", #> "variableMeasured": [ #> { #> "name": "BFIK_open_1", #> "description": "__Ich bin vielseitig interessiert.__", #> "value": "1. 1: Trifft überhaupt nicht zu,\n2. 2,\n3. 3,\n4. 4,\n5. 5: Trifft voll und ganz zu,\nNA. Item was never rendered for this user.", #> "maxValue": 5, #> "minValue": 1, #> "measurementTechnique": "self-report", #> "@type": "propertyValue" #> }, #> { #> "name": "BFIK_open_1.1", #> "description": "__Ich bin vielseitig interessiert.__", #> "value": "1. 1: Trifft überhaupt nicht zu,\n2. 2,\n3. 3,\n4. 4,\n5. 5: Trifft voll und ganz zu,\nNA. Item was never rendered for this user.", #> "maxValue": 5, #> "minValue": 1, #> "measurementTechnique": "self-report", #> "@type": "propertyValue" #> } #> ] #> } #> </script> #> #> <details><summary>JSON-LD metadata</summary> #> The following JSON-LD can be found by search engines, if you share this codebook #> publicly on the web. #> #> ```json #> { #> "name": "results", #> "datePublished": "2019-02-21", #> "description": "The dataset has N=28 rows and 2 columns.\n28 rows have no missing values on any column.\n\n\n## Table of variables\nThis table contains variable names, labels, their central tendencies and other attributes.\n\n|name |label |type |type_options |data_type |value_labels |optional |item_order |missing |complete |n |mean |sd |p0 |p25 |p50 |p75 |p100 |hist |\n|:-------------|:------------------------------------|:-------------|:------------|:---------|:----------------------------------------------------------------------------------------------------------------------------|:--------|:----------|:-------|:--------|:--|:----|:----|:--|:---|:---|:---|:----|:--------|\n|BFIK_open_1 |__Ich bin vielseitig interessiert.__ |rating_button |5 |numeric |1. 1: Trifft überhaupt nicht zu, - 2. 2, - 3. 3, - 4. 4, - 5. 5: Trifft voll und ganz zu, - NA. Item was never rendered for this user. |0 |8 |0 |28 |28 |4.39 |0.83 |2 |4 |5 |5 |5 |▁▁▂▁▁▃▁▇ |\n|BFIK_open_1.1 |__Ich bin vielseitig interessiert.__ |rating_button |5 |numeric |1. 1: Trifft überhaupt nicht zu, - 2. 2, - 3. 3, - 4. 4, - 5. 5: Trifft voll und ganz zu, - NA. Item was never rendered for this user. |0 |8 |0 |28 |28 |4.39 |0.83 |2 |4 |5 |5 |5 |▁▁▂▁▁▃▁▇ |\n\n### Note\nThis dataset was automatically described using the [codebook R package](https://rubenarslan.github.io/codebook/) (version 0.8.0).", #> "keywords": ["BFIK_open_1", "BFIK_open_1.1"], #> "@context": "http://schema.org/", #> "@type": "Dataset", #> "variableMeasured": [ #> { #> "name": "BFIK_open_1", #> "description": "__Ich bin vielseitig interessiert.__", #> "value": "1. 1: Trifft überhaupt nicht zu,\n2. 2,\n3. 3,\n4. 4,\n5. 5: Trifft voll und ganz zu,\nNA. Item was never rendered for this user.", #> "maxValue": 5, #> "minValue": 1, #> "measurementTechnique": "self-report", #> "@type": "propertyValue" #> }, #> { #> "name": "BFIK_open_1.1", #> "description": "__Ich bin vielseitig interessiert.__", #> "value": "1. 1: Trifft überhaupt nicht zu,\n2. 2,\n3. 3,\n4. 4,\n5. 5: Trifft voll und ganz zu,\nNA. Item was never rendered for this user.", #> "maxValue": 5, #> "minValue": 1, #> "measurementTechnique": "self-report", #> "@type": "propertyValue" #> } #> ] #> }` #> ``` #> </details>