gramener / gramener/eda

Change the existing API

Open
#4 0 comments 0 reactions 1 assignee Claimed by @nolancardozo View on GitHub
Dominant language
R
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Structure the API so that the following works:

```r
install.packages('eda')
library(eda)

# metadata returns an RC class.
# See http://adv-r.had.co.nz/OO-essentials.html
meta = metadata('path-to-file.xlsx', ...)

# All top level meta variables should be available as attributes
# The variable name is the same as the label in lowercase, with space -> underscore
meta$filename
meta$description
meta$source
meta$format
meta$file_size
meta$encoding
meta$row_count
meta$column_count
meta$row_description
meta$sampling_method
meta$prepared_on
meta$modified_on
meta$prepared_by

# All column info must be as a DataFrame
meta$columns
# The library user should be able to change the above.
# For example, they may override a column type from boolean to discrete

# Also store the data
meta$data

# We run methods on this class
meta$save(path='path-to-file.xlsx', sheet='Sheetname', format='xlsx')
# Format can only be XLSX for now, i.e. ignore it. We can add it later

# Apply univariate analysis on the (potentially modified) metadata
# Return ann RC object
uni = univariate(meta)

# This can be saved
uni$save(path='path-to-file.xlsx', sheet='Sheetname', format='xlsx')
uni$saveplot(path='path-to-file.xlsx', sheet='Sheetname', format='xlsx')
# Format can only be XLSX for now, i.e. ignore it. We can add it later
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.