Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ knitr::opts_chunk$set(
)
```

# metacore <a href='https://github.com/atorus-research/metacore'><img src="man/figures/metacore.PNG" align="right" style="height:139px;"/></a>
# metacore <a href='https://github.com/atorus-research/metacore'><img src="man/figures/metacore.PNG" align="right" style="height:139px;" alt="Metacore Package Hex Sticker"/></a>

<!-- badges: start -->
[<img src="https://img.shields.io/badge/Slack-RValidationHub-blue?style=flat&logo=slack">](https://RValidationHub.slack.com)
[<img src="https://img.shields.io/badge/Slack-RValidationHub-blue?style=flat&logo=slack" alt="Slack Status">](https://RValidationHub.slack.com)
[![R build status](https://github.com/atorus-research/metacore/workflows/R-CMD-check/badge.svg)](https://github.com/atorus-research/xportr/actions?workflow=R-CMD-check)
[<img src="https://img.shields.io/codecov/c/github/atorus-research/metacore">](https://app.codecov.io/gh/atorus-research/metacore)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg">](https://github.com/atorus-research/metacore/blob/master/LICENSE)
[<img src="https://img.shields.io/codecov/c/github/atorus-research/metacore" alt="Codecov Coverage">](https://app.codecov.io/gh/atorus-research/metacore)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License">](https://github.com/atorus-research/metacore/blob/master/LICENSE)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental-1)
[![CRAN status](https://www.r-pkg.org/badges/version/metacore)](https://CRAN.R-project.org/package=metacore)
[![R-CMD-check](https://github.com/atorus-research/metacore/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/atorus-research/metacore/actions/workflows/R-CMD-check.yaml)
Expand Down Expand Up @@ -56,9 +56,9 @@ A metacore object is made-up of 6 different tables, which are connected with a s

Here is a schema of how all this fits together:

![](man/figures/schema-colors.png "man/figures/Metacore Schema")
![Schema diagram showing the relationships between all metacore tables (variable names not included)](man/figures/schema-colors.png "man/figures/Metacore Schema")

### ds_spec <img src="man/figures/labeled-ds_spec.png" align="right" style="height:150px;"/>
### ds_spec <img src="man/figures/labeled-ds_spec.png" align="right" style="height:150px;" alt="Diagram of ds_spec table structure"/>

This table covers the basic information about each dataset. There is only a single row per dataset, with the following information:

Expand All @@ -68,7 +68,7 @@ This table covers the basic information about each dataset. There is only a sing

- *label*: Dataset label

### ds_vars <img src="man/figures/labeled-ds_vars.png" align="right" style="height:150px;"/>
### ds_vars <img src="man/figures/labeled-ds_vars.png" align="right" style="height:150px;" alt="Diagram of ds_vars table structure"/>

This table contains the information that bridges between purely dataset level and purely variable level. There is one row per dataset per variable:

Expand All @@ -86,7 +86,7 @@ This table contains the information that bridges between purely dataset level an

- *supp_flag*: Logical to determine if the variable is in the supplemental datasets

### var_spec <img src="man/figures/labeled-var_spec.png" align="right" style="height:150px;"/>
### var_spec <img src="man/figures/labeled-var_spec.png" align="right" style="height:150px;" alt="Diagram of var_spec table structure"/>

This table contains the purely variable level information. The goal is there is a single row per variable, which is common across all datasets. This helps ensure variables follow the CDISC standard. But, this isn't always possible, so if information for a given variable differs across datasets, the variable will be recorded as dataset.variable in the variable column.

Expand All @@ -102,7 +102,7 @@ This table contains the purely variable level information. The goal is there is

- *format*: Variable format

### value_spec <img src="man/figures/labeled-value_spec.png" align="right" style="height:150px;"/>
### value_spec <img src="man/figures/labeled-value_spec.png" align="right" style="height:150px;" alt="Diagram of value_spec table structure"/>

This table contains the information the information at the value level. There will be at least one row per dataset/variable combination. There is more than one row per dataset/variable combination if the combination has values which have differing metadata. For instance LBORRES that are different data types depending on the value. The information contained are as follows:

Expand All @@ -122,15 +122,15 @@ This table contains the information the information at the value level. There wi

- *derivation_id*: ID for the derivation to match with the **derivation** table

### derivations <img src="man/figures/labeled-derivation.png" align="right" style="height:150px;"/>
### derivations <img src="man/figures/labeled-derivation.png" align="right" style="height:150px;" alt="Diagram of derivation table structure"/>

This table has all the derivation information, with one row per derivation ID and the following information:

- *derivation_id*: The ID, which should match to **value_spec**

- *derivation*: Text describing the derivation

### codelist <img src="man/figures/labeled-code_list.png" align="right" style="height:150px;"/>
### codelist <img src="man/figures/labeled-code_list.png" align="right" style="height:150px;" alt="Diagram of codelist table structure"/>

This table contains the code lists, permitted value lists, and external libraries nested within a tibble. There is only a single row per list/library, with the following information:

Expand All @@ -144,7 +144,7 @@ This table contains the code lists, permitted value lists, and external librarie



### supp <img src="man/figures/labeled-supp.png" align="right" style="height:150px;"/>
### supp <img src="man/figures/labeled-supp.png" align="right" style="height:150px;" alt="Diagram of supp table structure"/>

This table contains the information needed to create supplemental tables. If you want to add a variable which will go into a supplemental qualifier then you can create as normal (i.e. label information going to the **var_spec** table and derivation and origin going into the **value_spec** table), but you need to flag it as supplemental in the **ds_vars** table and add a row to the **supp** table. There is only a single row per dataset/variable, with the following information:

Expand All @@ -159,7 +159,7 @@ This table contains the information needed to create supplemental tables. If you
To get more information about the metacore objects and how to build a specification reader, please see our vignettes.


![](man/figures/labeled_schema.png "man/figures/Metacore Schema")
![Schema diagram showing the relationships between all metacore tables](man/figures/labeled_schema.png "man/figures/Metacore Schema")

## Future Development

Expand Down
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# metacore <a href='https://github.com/atorus-research/metacore'><img src="man/figures/metacore.PNG" align="right" style="height:139px;"/></a>
# metacore <a href='https://github.com/atorus-research/metacore'><img src="man/figures/metacore.PNG" align="right" style="height:139px;" alt="Metacore Package Hex Sticker"/></a>

<!-- badges: start -->

[<img src="https://img.shields.io/badge/Slack-RValidationHub-blue?style=flat&logo=slack">](https://RValidationHub.slack.com)
[<img src="https://img.shields.io/badge/Slack-RValidationHub-blue?style=flat&logo=slack" alt="Slack Status">](https://RValidationHub.slack.com)
[![R build
status](https://github.com/atorus-research/metacore/workflows/R-CMD-check/badge.svg)](https://github.com/atorus-research/xportr/actions?workflow=R-CMD-check)
[<img src="https://img.shields.io/codecov/c/github/atorus-research/metacore">](https://app.codecov.io/gh/atorus-research/metacore)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg">](https://github.com/atorus-research/metacore/blob/master/LICENSE)
[<img src="https://img.shields.io/codecov/c/github/atorus-research/metacore" alt="Codecov Coverage">](https://app.codecov.io/gh/atorus-research/metacore)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License">](https://github.com/atorus-research/metacore/blob/master/LICENSE)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental-1)
[![CRAN
Expand Down Expand Up @@ -74,9 +74,15 @@ remember. They are as follows:

Here is a schema of how all this fits together:

![](man/figures/schema-colors.png "man/figures/Metacore Schema")
<figure>
<img src="man/figures/schema-colors.png"
title="man/figures/Metacore Schema"
alt="Schema diagram showing the relationships between all metacore tables (variable names not included)" />
<figcaption aria-hidden="true">Schema diagram showing the relationships
between all metacore tables (variable names not included)</figcaption>
</figure>

### ds_spec <img src="man/figures/labeled-ds_spec.png" align="right" style="height:150px;"/>
### ds_spec <img src="man/figures/labeled-ds_spec.png" align="right" style="height:150px;" alt="Diagram of ds_spec table structure"/>

This table covers the basic information about each dataset. There is
only a single row per dataset, with the following information:
Expand All @@ -87,7 +93,7 @@ only a single row per dataset, with the following information:

- *label*: Dataset label

### ds_vars <img src="man/figures/labeled-ds_vars.png" align="right" style="height:150px;"/>
### ds_vars <img src="man/figures/labeled-ds_vars.png" align="right" style="height:150px;" alt="Diagram of ds_vars table structure"/>

This table contains the information that bridges between purely dataset
level and purely variable level. There is one row per dataset per
Expand Down Expand Up @@ -116,7 +122,7 @@ variable:
- *supp_flag*: Logical to determine if the variable is in the
supplemental datasets

### var_spec <img src="man/figures/labeled-var_spec.png" align="right" style="height:150px;"/>
### var_spec <img src="man/figures/labeled-var_spec.png" align="right" style="height:150px;" alt="Diagram of var_spec table structure"/>

This table contains the purely variable level information. The goal is
there is a single row per variable, which is common across all datasets.
Expand All @@ -141,7 +147,7 @@ variable column.

- *format*: Variable format

### value_spec <img src="man/figures/labeled-value_spec.png" align="right" style="height:150px;"/>
### value_spec <img src="man/figures/labeled-value_spec.png" align="right" style="height:150px;" alt="Diagram of value_spec table structure"/>

This table contains the information the information at the value level.
There will be at least one row per dataset/variable combination. There
Expand Down Expand Up @@ -169,7 +175,7 @@ are as follows:
- *derivation_id*: ID for the derivation to match with the
**derivation** table

### derivations <img src="man/figures/labeled-derivation.png" align="right" style="height:150px;"/>
### derivations <img src="man/figures/labeled-derivation.png" align="right" style="height:150px;" alt="Diagram of derivation table structure"/>

This table has all the derivation information, with one row per
derivation ID and the following information:
Expand All @@ -178,7 +184,7 @@ derivation ID and the following information:

- *derivation*: Text describing the derivation

### codelist <img src="man/figures/labeled-code_list.png" align="right" style="height:150px;"/>
### codelist <img src="man/figures/labeled-code_list.png" align="right" style="height:150px;" alt="Diagram of codelist table structure"/>

This table contains the code lists, permitted value lists, and external
libraries nested within a tibble. There is only a single row per
Expand All @@ -195,7 +201,7 @@ list/library, with the following information:
- *type*: An indicator of if the information in the code column is a
code/decode table, permitted value, or external library

### supp <img src="man/figures/labeled-supp.png" align="right" style="height:150px;"/>
### supp <img src="man/figures/labeled-supp.png" align="right" style="height:150px;" alt="Diagram of supp table structure"/>

This table contains the information needed to create supplemental
tables. If you want to add a variable which will go into a supplemental
Expand All @@ -218,7 +224,13 @@ single row per dataset/variable, with the following information:
To get more information about the metacore objects and how to build a
specification reader, please see our vignettes.

![](man/figures/labeled_schema.png "man/figures/Metacore Schema")
<figure>
<img src="man/figures/labeled_schema.png"
title="man/figures/Metacore Schema"
alt="Schema diagram showing the relationships between all metacore tables" />
<figcaption aria-hidden="true">Schema diagram showing the relationships
between all metacore tables</figcaption>
</figure>

## Future Development

Expand Down
2 changes: 1 addition & 1 deletion vignettes/Building_Specification_Readers.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ As we can see, the mock spec we are using here doesn't match the format. Therefo

Here is a schema of how all this fits together

![](../man/figures/labeled_schema.png "Metacore Schema")
![Schema diagram showing the relationships between all metacore tables](../man/figures/labeled_schema.png "Metacore Schema")

ds_spec is connected to ds_vars by the 'dataset' variable and ds_vars is connected to var_spec by the 'variable' variable, etc. For more information on the make-up of metacore objects please see the README.

Expand Down