R/codebook.R
Echo a list of a metadata, generated using metadata_list() as JSON-LD in a
script tag.
metadata_jsonld(results)
| results | a data frame, ideally with attributes set on variables |
|---|
data("bfi") metadata_jsonld(bfi)#> #> #> #> <script type="application/ld+json"> #> { #> "name": "results", #> "keywords": ["A1", "A2", "A3", "A4", "A5", "C1", "C2", "C3", "C4", "C5", "E1", "E2", "E3", "E4", "E5", "N1", "N2", "N3", "N4", "N5", "O1", "O2", "O3", "O4", "O5", "gender", "education", "age"], #> "variableMeasured": [ #> { #> "name": "A1", #> "data_summary": [ #> { #> "missing": "16", #> "complete": "2784", #> "n": "2800", #> "mean": "2.41", #> "sd": "1.41", #> "p0": "1", #> "p25": "1", #> "p50": "2", #> "p75": "3", #> "p100": "6", #> "hist": "▇▇▁▃▃▁▂▁", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "A2", #> "data_summary": [ #> { #> "missing": "27", #> "complete": "2773", #> "n": "2800", #> "mean": "4.8", #> "sd": "1.17", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▁▁▁▅▁▇▇", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "A3", #> "data_summary": [ #> { #> "missing": "26", #> "complete": "2774", #> "n": "2800", #> "mean": "4.6", #> "sd": "1.3", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▂▁▂▅▁▇▆", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "A4", #> "data_summary": [ #> { #> "missing": "19", #> "complete": "2781", #> "n": "2800", #> "mean": "4.7", #> "sd": "1.48", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▂▁▁▃▁▅▇", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "A5", #> "data_summary": [ #> { #> "missing": "16", #> "complete": "2784", #> "n": "2800", #> "mean": "4.56", #> "sd": "1.26", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▂▁▂▅▁▇▆", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "C1", #> "data_summary": [ #> { #> "missing": "21", #> "complete": "2779", #> "n": "2800", #> "mean": "4.5", #> "sd": "1.24", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▁▁▂▅▁▇▅", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "C2", #> "data_summary": [ #> { #> "missing": "24", #> "complete": "2776", #> "n": "2800", #> "mean": "4.37", #> "sd": "1.32", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▂▁▂▆▁▇▅", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "C3", #> "data_summary": [ #> { #> "missing": "20", #> "complete": "2780", #> "n": "2800", #> "mean": "4.3", #> "sd": "1.29", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▂▁▂▆▁▇▅", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "C4", #> "data_summary": [ #> { #> "missing": "26", #> "complete": "2774", #> "n": "2800", #> "mean": "2.55", #> "sd": "1.38", #> "p0": "1", #> "p25": "1", #> "p50": "2", #> "p75": "4", #> "p100": "6", #> "hist": "▇▇▁▅▅▁▂▁", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "C5", #> "data_summary": [ #> { #> "missing": "16", #> "complete": "2784", #> "n": "2800", #> "mean": "3.3", #> "sd": "1.63", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "5", #> "p100": "6", #> "hist": "▆▇▁▅▇▁▆▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "E1", #> "data_summary": [ #> { #> "missing": "23", #> "complete": "2777", #> "n": "2800", #> "mean": "2.97", #> "sd": "1.63", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▇▇▁▅▆▁▅▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "E2", #> "data_summary": [ #> { #> "missing": "16", #> "complete": "2784", #> "n": "2800", #> "mean": "3.14", #> "sd": "1.61", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▆▇▁▅▇▁▅▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "E3", #> "data_summary": [ #> { #> "missing": "25", #> "complete": "2775", #> "n": "2800", #> "mean": "4", #> "sd": "1.35", #> "p0": "1", #> "p25": "3", #> "p50": "4", #> "p75": "5", #> "p100": "6", #> "hist": "▂▃▁▃▇▁▇▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "E4", #> "data_summary": [ #> { #> "missing": "9", #> "complete": "2791", #> "n": "2800", #> "mean": "4.42", #> "sd": "1.46", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▂▁▂▃▁▇▆", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "E5", #> "data_summary": [ #> { #> "missing": "21", #> "complete": "2779", #> "n": "2800", #> "mean": "4.42", #> "sd": "1.33", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▂▁▂▅▁▇▅", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "N1", #> "data_summary": [ #> { #> "missing": "22", #> "complete": "2778", #> "n": "2800", #> "mean": "2.93", #> "sd": "1.57", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▇▇▁▅▆▁▅▂", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "N2", #> "data_summary": [ #> { #> "missing": "21", #> "complete": "2779", #> "n": "2800", #> "mean": "3.51", #> "sd": "1.53", #> "p0": "1", #> "p25": "2", #> "p50": "4", #> "p75": "5", #> "p100": "6", #> "hist": "▃▆▁▅▇▁▆▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "N3", #> "data_summary": [ #> { #> "missing": "11", #> "complete": "2789", #> "n": "2800", #> "mean": "3.22", #> "sd": "1.6", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▆▇▁▅▇▁▆▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "N4", #> "data_summary": [ #> { #> "missing": "36", #> "complete": "2764", #> "n": "2800", #> "mean": "3.19", #> "sd": "1.57", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▆▇▁▅▇▁▅▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "N5", #> "data_summary": [ #> { #> "missing": "29", #> "complete": "2771", #> "n": "2800", #> "mean": "2.97", #> "sd": "1.62", #> "p0": "1", #> "p25": "2", #> "p50": "3", #> "p75": "4", #> "p100": "6", #> "hist": "▇▇▁▅▆▁▃▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "O1", #> "data_summary": [ #> { #> "missing": "22", #> "complete": "2778", #> "n": "2800", #> "mean": "4.82", #> "sd": "1.13", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▁▁▂▅▁▇▇", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "O2", #> "data_summary": [ #> { #> "missing": "0", #> "complete": "2800", #> "n": "2800", #> "mean": "2.71", #> "sd": "1.57", #> "p0": "1", #> "p25": "1", #> "p50": "2", #> "p75": "4", #> "p100": "6", #> "hist": "▇▇▁▃▅▁▃▂", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "O3", #> "data_summary": [ #> { #> "missing": "28", #> "complete": "2772", #> "n": "2800", #> "mean": "4.44", #> "sd": "1.22", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "5", #> "p100": "6", #> "hist": "▁▁▁▂▆▁▇▅", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "O4", #> "data_summary": [ #> { #> "missing": "14", #> "complete": "2786", #> "n": "2800", #> "mean": "4.89", #> "sd": "1.22", #> "p0": "1", #> "p25": "4", #> "p50": "5", #> "p75": "6", #> "p100": "6", #> "hist": "▁▁▁▁▃▁▆▇", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "O5", #> "data_summary": [ #> { #> "missing": "20", #> "complete": "2780", #> "n": "2800", #> "mean": "2.49", #> "sd": "1.33", #> "p0": "1", #> "p25": "1", #> "p50": "2", #> "p75": "3", #> "p100": "6", #> "hist": "▇▇▁▅▃▁▂▁", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "gender", #> "data_summary": [ #> { #> "missing": "0", #> "complete": "2800", #> "n": "2800", #> "mean": "1.67", #> "sd": "0.47", #> "p0": "1", #> "p25": "1", #> "p50": "2", #> "p75": "2", #> "p100": "2", #> "hist": "▃▁▁▁▁▁▁▇", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "education", #> "data_summary": [ #> { #> "missing": "223", #> "complete": "2577", #> "n": "2800", #> "mean": "3.19", #> "sd": "1.11", #> "p0": "1", #> "p25": "3", #> "p50": "3", #> "p75": "4", #> "p100": "5", #> "hist": "▂▂▁▇▁▂▁▃", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> }, #> { #> "name": "age", #> "data_summary": [ #> { #> "missing": "0", #> "complete": "2800", #> "n": "2800", #> "mean": "28.78", #> "sd": "11.13", #> "p0": "3", #> "p25": "20", #> "p50": "26", #> "p75": "35", #> "p100": "86", #> "hist": "▁▇▆▃▂▁▁▁", #> "@type": "http://formr.org/codebook/SummaryStatistics" #> } #> ], #> "value": "Number", #> "@context": { #> "@vocab": "http://pending.schema.org/" #> }, #> "@type": "propertyValue" #> } #> ], #> "@context": "http://schema.org/", #> "@type": "Dataset" #> } #> </script>