Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# data
data/

# scripts
scripts/

# experiments
experiments/

Expand Down
8 changes: 4 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
mobi@childmind.org.
<mobi@childmind.org>.

All complaints will be reviewed and investigated promptly and fairly.

Expand Down Expand Up @@ -117,13 +117,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Pull requests are always welcome, and we appreciate any help you give. Note that
When submitting a pull request, we ask you to check the following:

1. **Unit tests**, **documentation**, and **code style** are in order.
See the Continuous Integration for up to date information on the current code style, tests, and any other requirements.
See the Continuous Integration for up-to-date information on the current code style, tests, and any other requirements.

See the following [Google Python style guide](https://google.github.io/styleguide/pyguide.html#3164-guidelines-derived-from-guidos-recommendations) for coding style guidelines.

It is also OK to submit work in progress if you're unsure of what this exactly means, in which case you'll likely be asked to make some further changes.

Expand Down
80 changes: 68 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,88 @@
# Graphomotor Study Toolkit

A Python toolkit for analysis of graphomotor data collected via Curious.

[![Build](https://github.com/childmindresearch/graphomotor/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/childmindresearch/graphomotor/actions/workflows/test.yaml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/childmindresearch/graphomotor/branch/main/graph/badge.svg?token=22HWWFWPW5)](https://codecov.io/gh/childmindresearch/graphomotor)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)
[![LGPL--2.1 License](https://img.shields.io/badge/license-LGPL--2.1-blue.svg)](https://github.com/childmindresearch/graphomotor/blob/main/LICENSE)
[![pages](https://img.shields.io/badge/api-docs-blue)](https://childmindresearch.github.io/graphomotor)
[![Documentation](https://img.shields.io/badge/api-docs-blue)](https://childmindresearch.github.io/graphomotor)

Welcome to `graphomotor`, a specialized Python library for analyzing graphomotor data collected via [Curious](https://www.gettingcurious.com/). This toolkit provides comprehensive tools for processing, analyzing, and visualizing data from various graphomotor assessment tasks including spiral drawing, trails making, alphabetic writing, digit symbol substitution, and the Rey-Osterrieth Complex Figure Test.
Comment thread
alperkent marked this conversation as resolved.

## Feature Extraction Capabilities

A Python toolkit for the analysis of Graphomotor study.
The toolkit extracts clinically relevant metrics from digitized drawing data. Currently implemented features include:

## Progress
- **Temporal Features**: Task completion duration
Comment thread
alperkent marked this conversation as resolved.
Outdated
- **Velocity Features**: Velocity analysis including linear, radial, and angular velocity components with statistical measures (sum, median, variation, skewness, kurtosis)
Comment thread
alperkent marked this conversation as resolved.
Outdated
- **Distance Features**: Spatial accuracy measurements using Hausdorff distance metrics with temporal normalizations and segment-specific analysis
Comment thread
alperkent marked this conversation as resolved.
Outdated
- **Drawing Error Features**: Area under the curve (AUC) calculations between drawn paths and ideal reference trajectories to quantify spatial accuracy
Comment thread
alperkent marked this conversation as resolved.
Outdated

| Task name | Preprocessing | Feature extraction | Visualization |
> **Note:** This toolkit is under active development, with a primary focus on the spiral drawing task and planned expansion to additional graphomotor assessments in subsequent releases.

## Development Progress

| Task | Preprocessing | Feature Extraction | Visualization |
| :--- | :---: | :---: | :---: |
| Spiral | ![data_cleaning](https://img.shields.io/badge/pending-red) | ![feature_extraction](https://img.shields.io/badge/in_progress-yellow) | ![visualization](https://img.shields.io/badge/pending-red) |
| Rey-Osterrieth Complex Figure | ![data_cleaning](https://img.shields.io/badge/pending-red) | ![feature_extraction](https://img.shields.io/badge/pending-red) | ![visualization](https://img.shields.io/badge/pending-red) |
| Alphabetic Writing | ![data_cleaning](https://img.shields.io/badge/pending-red)| ![feature_extraction](https://img.shields.io/badge/pending-red) | ![visualization](https://img.shields.io/badge/pending-red) |
| Digit Symbol Substitute | ![data_cleaning](https://img.shields.io/badge/pending-red)| ![feature_extraction](https://img.shields.io/badge/pending-red) | ![visualization](https://img.shields.io/badge/pending-red) |
| Trails Making | ![data_cleaning](https://img.shields.io/badge/pending-red) | ![feature_extraction](https://img.shields.io/badge/pending-red) | ![visualization](https://img.shields.io/badge/pending-red) |
| Spiral | ![Spiral: Preprocessing Pending](https://img.shields.io/badge/pending-red) | ![Spiral: Feature Extraction In Progress](https://img.shields.io/badge/in_progress-yellow) | ![Spiral: Visualization Pending](https://img.shields.io/badge/pending-red) |
| Rey-Osterrieth Complex Figure | ![Rey-Osterrieth: Preprocessing Pending](https://img.shields.io/badge/pending-red) | ![Rey-Osterrieth: Feature Extraction Pending](https://img.shields.io/badge/pending-red) | ![Rey-Osterrieth: Visualization Pending](https://img.shields.io/badge/pending-red) |
| Alphabetic Writing | ![Alphabetic Writing: Preprocessing Pending](https://img.shields.io/badge/pending-red) | ![Alphabetic Writing: Feature Extraction Pending](https://img.shields.io/badge/pending-red) | ![Alphabetic Writing: Visualization Pending](https://img.shields.io/badge/pending-red) |
| Digit Symbol Substitution | ![Digit Symbol Substitution: Preprocessing Pending](https://img.shields.io/badge/pending-red) | ![Digit Symbol Substitution: Feature Extraction Pending](https://img.shields.io/badge/pending-red) | ![Digit Symbol Substitution: Visualization Pending](https://img.shields.io/badge/pending-red) |
| Trails Making | ![Trails Making: Preprocessing Pending](https://img.shields.io/badge/pending-red) | ![Trails Making: Feature Extraction Pending](https://img.shields.io/badge/pending-red) | ![Trails Making: Visualization Pending](https://img.shields.io/badge/pending-red) |

## Installation

Install the newest development version via :
Install the graphomotor package from PyPI:

```sh
pip install graphomotor
Comment thread
alperkent marked this conversation as resolved.
```

Or install the latest development version directly from GitHub:

```sh
pip install git+https://github.com/childmindresearch/graphomotor
```

## Links or References
## Quick Start

Currently, `graphomotor` is available as an importable Python library. CLI functionality is planned for future releases.

### Extracting Features from Spiral Drawing Data

```python
from graphomotor.core import orchestrator

# Path to your spiral drawing data file
input_file = "path/to/your/spiral_data.csv"
Comment thread
alperkent marked this conversation as resolved.

# Directory where extracted features will be saved
output_dir = "path/to/output/directory"

# Run the analysis pipeline
features = orchestrator.run_pipeline(
input_path=input_file,
output_path=output_dir
)

# Features are returned as a dictionary and saved as CSV
print(f"Successfully extracted {len(features)} feature categories")
```

For detailed configuration options and additional parameters, refer to the [`run_pipeline` documentation](https://childmindresearch.github.io/graphomotor/graphomotor/core/orchestrator.html#run_pipeline).

> **Note:** Currently, only single file processing is supported, with batch processing planned for future releases.

## Future Directions

The Graphomotor Study Toolkit is under active development. For more detailed information about upcoming features and development plans, please refer to the [GitHub Issues](https://github.com/childmindresearch/graphomotor/issues) page.

## Contributing

We welcome contributions from the community! If you're interested in contributing, please review our [Contributing Guidelines](CONTRIBUTING.md) for information on how to get started, coding standards, and the pull request process.

## References

- [A very important resource](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
1. Messan, K. S., Kia, S. M., Narayan, V. A., Redmond, S. J., Kogan, A., Hussain, M. A., McKhann, G. M. II, & Vahdat, S. (2022). Assessment of Smartphone-Based Spiral Tracing in Multiple Sclerosis Reveals Intra-Individual Reproducibility as a Major Determinant of the Clinical Utility of the Digital Test. Frontiers in Medical Technology, 3, 714682. [https://doi.org/10.3389/fmedt.2021.714682](https://doi.org/10.3389/fmedt.2021.714682)
13 changes: 2 additions & 11 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# This file is a placeholder, will be updated later.

# Security

Child Mind Institute values the security of our users, data, and servers. We take the security of our systems seriously and encourage users to report any suspected security vulnerabilities promptly.

## Supported Versions

MODIFY:

Note which version(s) will receive security updates. For example:

| Version | Supported |
| ------- | ------------------ |
| 1.0.x | :white_check_mark: |
| 0.9.x | :x: |
Only the latest minor version will receive security updates. All older minor versions should be considered unmaintained.

## Reporting Vulnerabilities

To report security vulnerabilities, please do NOT use our issues page. Instead, kindly email us at mobi@childmind.org. Please refrain from using other communication channels.
To report security vulnerabilities, please do NOT use our issues page. Instead, kindly email us at <mobi@childmind.org>. Please refrain from using other communication channels.

For non-security-related issues, we welcome your input and feedback on our issues page. Feel free to share your ideas and suggestions to help us improve our services.
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "graphomotor"
version = "0.1.0"
description = "Toolkit for analysis of Graphomotor study tasks"
description = "A Python toolkit for analysis of graphomotor data collected via Curious"
authors = [
{name = "Alp Erkent", email = "alp.erkent@childmind.org"}
{name = "Alp Erkent", email = "alp.erkent@childmind.org"},
{name = "Adam Santorelli", email = "adam.santorelli@childmind.org"}
]
license = "LGPL-2.1"
readme = "README.md"
Expand Down Expand Up @@ -39,7 +40,7 @@ src = ["src"]
target-version = "py312"

[tool.ruff.lint]
select = ["ANN", "D", "E", "F", "I"]
select = ["ANN", "D", "E", "F", "I", "INP"]
ignore = []
fixable = ["ALL"]
unfixable = []
Expand Down