You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,17 @@ The output of the `read_data()` function is a list object the format of which is
50
50
51
51
## Details
52
52
53
+
### How it works
54
+
55
+
When you design a template Excel file for data reporting and analysis you also create a *data guide* file that specifies the structure and location of the data in the template. If you design the template carefully you can use the same data guide for several versions of the template. That is, as long as the location of the indexed data does not change, you can use the same data guide for different versions of the template. You can specify the compatible version of the templates in the *data guide*. The package will check compatibility. Clearly, you should use versioned data templates, and hence, a required field in a template is its version number. An example of a template with data is provided in the package (`system.file("extdata", "example_data.xlsx", package = "excelDataGuide")`).
56
+
57
+
Once you have entered the data and metadata in a template you can use the package to extract the data into R. The package will check and coerce the data types to the required formats.
58
+
53
59
### Data guide
54
60
55
-
The *data guide* is a human readable and editable file in [YAML](https://yaml.org/spec/1.2.2/) format that specifies the structure and location of the data in the Excel file. It contains a list of data types, each of which is defined by a name and a set of parameters. As the name suggests, the *data guide* is used by the **excelDataGuide** package as a guide to extract all indexed data from the Excel file and convert it into proper R objects. An example of part of a *data guide* is shown below:
61
+
The *data guide* is a human readable and editable file in [YAML](https://yaml.org/spec/1.2.2/) format that specifies the structure and location of the data in the Excel file. It contains a list of data types, each of which is defined by a name and a set of parameters. As the name suggests, the *data guide* is used by the **excelDataGuide** package as a guide to extract all indexed data from the Excel file and convert it into proper R objects. Part of the *data guide* from the example in the package, *i.e.*`system.file("extdata", "example_guide.yml", package = "excelDataGuide")` is shown below:
56
62
57
-
```
63
+
```yaml
58
64
guide.version: '1.0'
59
65
template.name: competition
60
66
template.min.version: '9.3'
@@ -92,6 +98,11 @@ locations:
92
98
- A24:B25
93
99
```
94
100
101
+
We provide a json schema for the data guide, allowing you to check the validity of
102
+
guides that you wrote. The schema is available in the package as
103
+
`system.file("extdata", "excelguide_schema.json", package = "excelDataGuide")`. To
104
+
check its validity against the schema you can use the [Polyglottal JSON Schema Validator](https://www.npmjs.com/package/pajv).
105
+
95
106
## Future work
96
107
97
108
We want to provide guide and template structures for data types without upper size limit, typically time series with no pre-determined length.
0 commit comments