eider

eider: an R package for processing health records declaratively

https://github.com/alan-turing-institute/eider

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (20.5%) to scientific vocabulary

Keywords

hut23 hut23-1515
Last synced: 11 months ago · JSON representation

Repository

eider: an R package for processing health records declaratively

Basic Info
Statistics
  • Stars: 4
  • Watchers: 6
  • Forks: 0
  • Open Issues: 5
  • Releases: 0
Topics
hut23 hut23-1515
Created over 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# eider 




**eider** is an R package for extracting machine learning features from tabular data, in particular health records, in a declarative manner.

Features are specified as JSON objects which contain all the necessary information required to perform a given calculation.
For example, the following calculates the number of total rows per patient `id` in the table labelled `ae2` (details on how to specify this table are in the function documentation).

```json
{
  "source_table": "ae2",
  "transformation_type": "COUNT",
  "grouping_column": "id",
  "absent_default_value": 0,
  "output_feature_name": "total_ae_attendances"
}
```

The output of this is a column named `total_ae_attendances`, containing the number of rows per patient, and with a value of 0 for any patients who do not appear in the `ae2` table.

This declarative approach provides an alternative to traditional, imperative-style, `dplyr` pipelines which can be more difficult to reason about, especially when a series of features is being extracted and merged together.
As features are specified without reference to a specific programming language or paradigm, it also encourages code that is concise, easy to read, and maintainable.

`eider` is a collaboration between The Alan Turing Institute, Public Health Scotland, and the Universities of Edinburgh and Durham.
It grew out of a desire to generalise the feature extraction process for health data, specifically the [SPARRA *(Scottish Patients At Risk of Readmission and Admission)* project](https://www.gov.scot/publications/sparra-made-easy/) ([GitHub repo](https://github.com/jamesliley/SPARRAv4)), and to allow similar analyses to be carried out in different contexts.

## Installation

Install via CRAN:

```r
install.packages("eider")
```

Alternatively, install `eider` from its source code on [GitHub](https://github.com/alan-turing-institute/eider) using:

``` r
install.packages("devtools")
devtools::install_github("alan-turing-institute/eider", build_vignettes = TRUE)
```

## Documentation

The package documentation is available [online](https://alan-turing-institute.github.io/eider/).
In particular, the [package articles](https://alan-turing-institute.github.io/eider/articles/) contain a series of vignettes which provide detailed guidance on the package and its features.

## Development

If you are making changes to the library itself, first clone the repository:

```
git clone git@github.com:alan-turing-institute/eider.git
```

You will need to install the `lintr`, `pkgdown`, `devtools` R packages to build documentation, run tests, and lint.
Then, from the repository root, you can use the following commands:

- `make doc` generates all function documentation, and also generates the `README.md` file from `README.rmd`
- `make lint` lints the project directory
- `make test` runs all tests

You can also use [`pre-commit`](https://pre-commit.com/) to run all of these before committing, to ensure that you do not commit incomplete code.
Firstly, install `pre-commit` according to the instructions on the webpage above.
Then run `pre-commit install`.

*What about vignettes?*
Well, building vignettes is slightly more complicated.
You can perform a one-time build from the R console using `pkgdown::build_site()`, but running this every time you edit a file gets tiring quickly.
To automate this, first install the package with `make install`, and install a working version of Python and also [`entr`](https://github.com/eradman/entr) (the latter is available on Homebrew via `brew install entr`).
Then run `make vig`: this will monitor your vignette RMarkdown files, rebuild the vignettes any time they are changed, and launch a HTTP server on port 8000 to view the files.
If you change any library code you will have to run `make install` again before rerunning `make vig`.

Owner

  • Name: The Alan Turing Institute
  • Login: alan-turing-institute
  • Kind: organization
  • Email: info@turing.ac.uk

The UK's national institute for data science and artificial intelligence.

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 271
  • Total Committers: 3
  • Avg Commits per committer: 90.333
  • Development Distribution Score (DDS): 0.314
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jonathan Yong y****e@g****m 186
Helen Duncan h****n@t****k 80
Louis Aslett l****t@d****k 5
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 66
  • Total pull requests: 33
  • Average time to close issues: 11 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 1.05
  • Average comments per pull request: 0.79
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • yongrenjie (44)
  • helendduncan (12)
  • louisaslett (1)
Pull Request Authors
  • yongrenjie (15)
  • helendduncan (13)
  • louisaslett (1)
Top Labels
Issue Labels
enhancement (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 469 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: eider

Declarative Feature Extraction from Tabular Data Records

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 469 Last month
Rankings
Dependent packages count: 27.8%
Dependent repos count: 35.7%
Average: 49.5%
Downloads: 85.2%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • peaceiris/actions-gh-pages v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • dplyr * imports
  • fs * imports
  • jsonlite * imports
  • logger * imports
  • lubridate * imports
  • magrittr * imports
  • purrr * imports
  • rlang * imports
  • stringr * imports
  • tibble * imports
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • tidyr * suggests