Skip to content

Commit ea754b7

Browse files
committed
Deploying to gh-pages from @ 9911b5a 🚀
1 parent 1c8d5d2 commit ea754b7

2 files changed

Lines changed: 148 additions & 29 deletions

File tree

graphomotor.html

Lines changed: 147 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ <h2>Contents</h2>
2525
<ul>
2626
<li><a href="#graphomotor-study-toolkit">Graphomotor Study Toolkit</a>
2727
<ul>
28-
<li><a href="#progress">Progress</a></li>
28+
<li><a href="#development-progress">Development Progress</a></li>
29+
<li><a href="#data-format-requirements">Data Format Requirements</a></li>
30+
<li><a href="#feature-extraction-capabilities">Feature Extraction Capabilities</a></li>
2931
<li><a href="#installation">Installation</a></li>
30-
<li><a href="#links-or-references">Links or References</a></li>
32+
<li><a href="#quick-start">Quick Start</a></li>
33+
<li><a href="#future-directions">Future Directions</a></li>
34+
<li><a href="#contributing">Contributing</a></li>
35+
<li><a href="#references">References</a></li>
3136
</ul></li>
3237
</ul>
3338

@@ -56,74 +61,188 @@ <h1 class="modulename">
5661

5762
<div class="docstring"><h1 id="graphomotor-study-toolkit">Graphomotor Study Toolkit</h1>
5863

64+
<p>A Python toolkit for analysis of graphomotor data collected via Curious.</p>
65+
66+
<p><a href="https://doi.org/10.5281/zenodo.15800191"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.15800191.svg" alt="DOI" /></a></p>
67+
5968
<p><a href="https://github.com/childmindresearch/graphomotor/actions/workflows/test.yaml?query=branch%3Amain"><img src="https://github.com/childmindresearch/graphomotor/actions/workflows/test.yaml/badge.svg?branch=main" alt="Build" /></a>
6069
<a href="https://codecov.io/gh/childmindresearch/graphomotor"><img src="https://codecov.io/gh/childmindresearch/graphomotor/branch/main/graph/badge.svg?token=22HWWFWPW5" alt="codecov" /></a>
6170
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" /></a>
6271
<img src="https://img.shields.io/badge/stability-experimental-orange.svg" alt="stability-experimental" />
6372
<a href="https://github.com/childmindresearch/graphomotor/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-LGPL--2.1-blue.svg" alt="LGPL--2.1 License" /></a>
64-
<a href="https://childmindresearch.github.io/graphomotor"><img src="https://img.shields.io/badge/api-docs-blue" alt="pages" /></a></p>
73+
<a href="https://childmindresearch.github.io/graphomotor"><img src="https://img.shields.io/badge/api-docs-blue" alt="Documentation" /></a></p>
6574

66-
<p>A Python toolkit for the analysis of Graphomotor study.</p>
75+
<p>Welcome to <code><a href="">graphomotor</a></code>, a specialized Python library for analyzing graphomotor data collected via <a href="https://www.gettingcurious.com/">Curious</a>. 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.</p>
6776

68-
<h2 id="progress">Progress</h2>
77+
<h2 id="development-progress">Development Progress</h2>
78+
79+
<p>⚠️ <strong>This package is under active development.</strong> Currently, the focus is on the Spiral task. After finalizing feature extraction, the next steps will involve implementing both preprocessing and visualization for this task. Once these parts are in place, we plan to extend support to other tasks.</p>
6980

7081
<table>
7182
<thead>
7283
<tr>
73-
<th style="text-align:left;">Task name</th>
84+
<th style="text-align:left;">Task</th>
7485
<th style="text-align:center;">Preprocessing</th>
75-
<th style="text-align:center;">Feature extraction</th>
86+
<th style="text-align:center;">Feature Extraction</th>
7687
<th style="text-align:center;">Visualization</th>
7788
</tr>
7889
</thead>
7990
<tbody>
8091
<tr>
8192
<td style="text-align:left;">Spiral</td>
82-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="data_cleaning" /></td>
83-
<td style="text-align:center;"><img src="https://img.shields.io/badge/in_progress-yellow" alt="feature_extraction" /></td>
84-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="visualization" /></td>
93+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Spiral: Preprocessing Pending" /></td>
94+
<td style="text-align:center;"><img src="https://img.shields.io/badge/in_progress-yellow" alt="Spiral: Feature Extraction In Progress" /></td>
95+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Spiral: Visualization Pending" /></td>
8596
</tr>
8697
<tr>
8798
<td style="text-align:left;">Rey-Osterrieth Complex Figure</td>
88-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="data_cleaning" /></td>
89-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="feature_extraction" /></td>
90-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="visualization" /></td>
99+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Rey-Osterrieth: Preprocessing Pending" /></td>
100+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Rey-Osterrieth: Feature Extraction Pending" /></td>
101+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Rey-Osterrieth: Visualization Pending" /></td>
91102
</tr>
92103
<tr>
93104
<td style="text-align:left;">Alphabetic Writing</td>
94-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="data_cleaning" /></td>
95-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="feature_extraction" /></td>
96-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="visualization" /></td>
105+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Alphabetic Writing: Preprocessing Pending" /></td>
106+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Alphabetic Writing: Feature Extraction Pending" /></td>
107+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Alphabetic Writing: Visualization Pending" /></td>
97108
</tr>
98109
<tr>
99-
<td style="text-align:left;">Digit Symbol Substitute</td>
100-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="data_cleaning" /></td>
101-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="feature_extraction" /></td>
102-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="visualization" /></td>
110+
<td style="text-align:left;">Digit Symbol Substitution</td>
111+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Digit Symbol Substitution: Preprocessing Pending" /></td>
112+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Digit Symbol Substitution: Feature Extraction Pending" /></td>
113+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Digit Symbol Substitution: Visualization Pending" /></td>
103114
</tr>
104115
<tr>
105116
<td style="text-align:left;">Trails Making</td>
106-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="data_cleaning" /></td>
107-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="feature_extraction" /></td>
108-
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="visualization" /></td>
117+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Trails Making: Preprocessing Pending" /></td>
118+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Trails Making: Feature Extraction Pending" /></td>
119+
<td style="text-align:center;"><img src="https://img.shields.io/badge/pending-red" alt="Trails Making: Visualization Pending" /></td>
109120
</tr>
110121
</tbody>
111122
</table>
112123

113-
<h2 id="installation">Installation</h2>
124+
<h2 id="data-format-requirements">Data Format Requirements</h2>
114125

115-
<p>Install the newest development version via :</p>
126+
<p>⚠️ <strong>This implementation requires data to adhere to a specific format matching the standard output from <a href="https://mindlogger.atlassian.net/servicedesk/customer/portal/3/article/859242501">Curious drawing responses</a>.</strong></p>
127+
128+
<p>When exporting drawing data from Curious, you typically receive the following files:</p>
129+
130+
<ul>
131+
<li><strong>report.csv</strong>: Contains the participants' actual responses.</li>
132+
<li><strong>activity_user_journey.csv</strong>: Logs the entire journey through the activity, including button actions like "Next", "Skip", "Back", and "Undo", regardless of whether a response was provided.</li>
133+
<li><strong>drawing-responses-{date}.zip</strong>: A ZIP archive with raw drawing response CSV files for each participant (e.g., <code>drawing-responses-Mon May 29 2023.zip</code>).</li>
134+
<li><strong>media-responses-{date}.zip</strong>: A ZIP archive containing SVG files for the drawing responses (e.g., <code>media-responses-Mon May 29 2023.zip</code>).</li>
135+
<li><strong>trails-responses-{date}.zip</strong>: A ZIP archive with raw trail making response CSV files (if there are any) for each participant (e.g., <code>trails-responses-Mon May 29 2023.zip</code>).</li>
136+
</ul>
137+
138+
<p>For Spiral tasks, the toolkit uses only the CSV files from the drawing responses ZIP. Support for additional tasks will be added in future releases.</p>
139+
140+
<h3 id="file-naming-convention">File Naming Convention</h3>
141+
142+
<p>Your spiral data files must follow this naming convention:</p>
116143

117144
<div class="pdoc-code codehilite">
118-
<pre><span></span><code>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/childmindresearch/graphomotor
145+
<pre><span></span><code>[5123456]a7f3b2e9-d4c8-f1a6-e5b9-c2d7f8a3e6b4-spiral_trace1_Dom.csv
119146
</code></pre>
120147
</div>
121148

122-
<h2 id="links-or-references">Links or References</h2>
149+
<p>Where:</p>
123150

124151
<ul>
125-
<li><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">A very important resource</a></li>
152+
<li><strong>Participant ID</strong>: Must be enclosed in brackets <code>[]</code> and be a 7-digit number starting with <code>5</code> (e.g., <code>[5123456]</code>) that matches the <code>target_secret_id</code> column in the <strong>report.csv</strong> file.</li>
153+
<li><strong>Activity Submission ID</strong>: Must be a 32-character hexadecimal string (e.g., <code>18f2-45ea-a1e4-2334e07cc706</code>) that matches the <code>id</code> column in the <strong>report.csv</strong> file.</li>
154+
<li><strong>Task</strong>: Must be one of the following that matches the <code>item</code> column in the <strong>report.csv</strong> file:
155+
<ul>
156+
<li><code>spiral_trace1_Dom</code> through <code>spiral_trace5_Dom</code> (dominant hand tracing tasks)</li>
157+
<li><code>spiral_trace1_NonDom</code> through <code>spiral_trace5_NonDom</code> (non-dominant hand tracing tasks)</li>
158+
<li><code>spiral_recall1_Dom</code> through <code>spiral_recall3_Dom</code> (dominant hand recall tasks)</li>
159+
<li><code>spiral_recall1_NonDom</code> through <code>spiral_recall3_NonDom</code> (non-dominant hand recall tasks)</li>
160+
</ul></li>
126161
</ul>
162+
163+
<h3 id="data-format">Data Format</h3>
164+
165+
<p>Your spiral data CSV file must contain the following columns:</p>
166+
167+
<div class="pdoc-code codehilite">
168+
<pre><span></span><code>line_number, x, y, UTC_Timestamp, seconds, epoch_time_in_seconds_start
169+
</code></pre>
170+
</div>
171+
172+
<p>This format represents the standard output from <a href="https://mindlogger.atlassian.net/servicedesk/customer/portal/3/article/596082739">Curious drawing responses data dictionary</a>.</p>
173+
174+
<h2 id="feature-extraction-capabilities">Feature Extraction Capabilities</h2>
175+
176+
<p>The toolkit extracts clinically relevant metrics from digitized drawing data. Currently implemented features include:</p>
177+
178+
<ul>
179+
<li><strong>Temporal Features</strong>: Task completion duration.</li>
180+
<li><strong>Velocity Features</strong>: Velocity analysis including linear, radial, and angular velocity components with statistical measures (sum, median, variation, skewness, kurtosis).</li>
181+
<li><strong>Distance Features</strong>: Spatial accuracy measurements using Hausdorff distance metrics with temporal normalizations and segment-specific analysis.</li>
182+
<li><strong>Drawing Error Features</strong>: Area under the curve (AUC) calculations between drawn paths and ideal reference trajectories to quantify spatial accuracy.</li>
183+
</ul>
184+
185+
<h2 id="installation">Installation</h2>
186+
187+
<p>Install the graphomotor package from PyPI:</p>
188+
189+
<div class="pdoc-code codehilite">
190+
<pre><span></span><code>pip<span class="w"> </span>install<span class="w"> </span>graphomotor
191+
</code></pre>
192+
</div>
193+
194+
<p>Or install the latest development version directly from GitHub:</p>
195+
196+
<div class="pdoc-code codehilite">
197+
<pre><span></span><code>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/childmindresearch/graphomotor
198+
</code></pre>
199+
</div>
200+
201+
<h2 id="quick-start">Quick Start</h2>
202+
203+
<p>Currently, <code><a href="">graphomotor</a></code> is available as an importable Python library. CLI functionality is planned for future releases.</p>
204+
205+
<h3 id="extracting-features-from-spiral-drawing-data">Extracting Features from Spiral Drawing Data</h3>
206+
207+
<div class="pdoc-code codehilite">
208+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn"><a href="graphomotor/core.html">graphomotor.core</a></span><span class="w"> </span><span class="kn">import</span> <span class="n">orchestrator</span>
209+
210+
<span class="c1"># Path to your spiral drawing data file</span>
211+
<span class="n">input_file</span> <span class="o">=</span> <span class="s2">&quot;path/to/your/spiral_data.csv&quot;</span>
212+
213+
<span class="c1"># Directory where extracted features will be saved</span>
214+
<span class="n">output_dir</span> <span class="o">=</span> <span class="s2">&quot;path/to/output/directory&quot;</span>
215+
216+
<span class="c1"># Run the analysis pipeline</span>
217+
<span class="n">features</span> <span class="o">=</span> <span class="n">orchestrator</span><span class="o">.</span><span class="n">run_pipeline</span><span class="p">(</span>
218+
<span class="n">input_path</span><span class="o">=</span><span class="n">input_file</span><span class="p">,</span>
219+
<span class="n">output_path</span><span class="o">=</span><span class="n">output_dir</span>
220+
<span class="p">)</span>
221+
222+
<span class="c1"># Features are returned as a dictionary and saved as CSV</span>
223+
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Successfully extracted </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">features</span><span class="p">)</span><span class="si">}</span><span class="s2"> feature categories&quot;</span><span class="p">)</span>
224+
</code></pre>
225+
</div>
226+
227+
<p>For detailed configuration options and additional parameters, refer to the <a href="https://childmindresearch.github.io/graphomotor/graphomotor/core/orchestrator.html#run_pipeline"><code>run_pipeline</code> documentation</a>.</p>
228+
229+
<blockquote>
230+
<p><strong>Note:</strong> Currently, only single file processing is supported, with batch processing planned for future releases.</p>
231+
</blockquote>
232+
233+
<h2 id="future-directions">Future Directions</h2>
234+
235+
<p>The Graphomotor Study Toolkit is under active development. For more detailed information about upcoming features and development plans, please refer to our <a href="https://github.com/childmindresearch/graphomotor/issues">GitHub Issues</a> page.</p>
236+
237+
<h2 id="contributing">Contributing</h2>
238+
239+
<p>We welcome contributions from the community! If you're interested in contributing, please review our <a href="CONTRIBUTING.md">Contributing Guidelines</a> for information on how to get started, coding standards, and the pull request process.</p>
240+
241+
<h2 id="references">References</h2>
242+
243+
<ol>
244+
<li>Messan, K. S., Kia, S. M., Narayan, V. A., Redmond, S. J., Kogan, A., Hussain, M. A., McKhann, G. M. II, &amp; 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. <a href="https://doi.org/10.3389/fmedt.2021.714682">https://doi.org/10.3389/fmedt.2021.714682</a></li>
245+
</ol>
127246
</div>
128247

129248
<input id="mod-graphomotor-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">

0 commit comments

Comments
 (0)