Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Data exploration with python
The Keycube is a tangible, cubic-shaped text entry device designed for virtual and mixed-reality (VR/AR) workspaces. By shifting from a traditional 2D plane to a 3D cube, the device offers high mobility and freedom of posture, allowing users to type while standing, sitting, or moving without the need for a desk.
This report analyzes the experimental data from User Study 2 (p=22) to understand the ergonomic relationship between human hand morphology and the cube's 3D geometry.
To analyze the data, we first had to transform the wide-format CSV files into a long-format structure suitable for statistical grouping.
importpandasaspdimportnumpyasnpimportre# Load datasetsreachability=pd.read_csv('reachability.csv')
preferences=pd.read_csv('preferences.csv')
# Mapping numeric finger codes to anatomical namesfinger_map= {
1: 'LL', 2: 'LR', 3: 'LM', 4: 'LI', 5: 'LT',
6: 'RT', 7: 'RI', 8: 'RM', 9: 'RR', 10: 'RL'
}
# Preprocessing Preferences: Transforming keys into a searchable formatpref_keys= [cforcinpreferences.columnsiflen(c) <=3andcnotin ['Number', 'Handedness']]
pref_long=preferences.melt(id_vars=['Number'], value_vars=pref_keys, var_name='Key', value_name='FingerNum')
pref_long['FingerCode'] =pref_long['FingerNum'].map(finger_map)
pref_long['Face'] =pref_long['Key'].str[0]We visualized which fingers users naturally assign to each face of the cube. This helps identify the "Natural Home Row" for a cubic interface.
# Grouping by Face and Finger to find dominant usage patternsface_pref=pref_long.groupby(['Face', 'FingerCode']).size().unstack(fill_value=0)
# Visualized via Seaborn Heatmap# (See viz_exports/Dominant Finger Usage per Cube Face.png)Key Insight: Users demonstrate a highly consistent "cluster" behavior. The Thumbs (LT/RT) are prioritized for faces that provide structural support, while the Index and Middle fingers navigate the high-frequency side keys.
The core of the Keycube is its 4x4 grid on each face. To analyze reachability accurately, we developed a function to extract key numbers using Regular Expressions to avoid conflicts with finger names (e.g., distinguishing the "R" in "Red Face" from the "R" in "Right Ring finger").
defget_grid_data(reach_df, face_code):
# Use regex to find keys like -R1, -R16 while ignoring finger namesregex_pattern=rf'-{face_code}\d+$'cols= [cforcinreach_df.columnsifre.search(regex_pattern, c)]
data=reach_df[cols].mean().reset_index()
data.columns= ['FingerKey', 'Score']
# Extract only the key number from the end of the stringdata['KeyNum'] =data['FingerKey'].apply(lambdax: int(re.findall(r'\d+', x)[-1]))
# Pivot to a 4x4 physical representationreturndata.groupby('KeyNum')['Score'].mean().sort_index().values.reshape(4, 4)Ergonomic Result: The heatmaps generated by this code (stored as Average Reachability per Key.png) show that outer edges and corners suffer from a significantly lower reachability score compared to the center-top keys.
A critical part of the exploration was determining if the Keycube design is "Hand-Size Agnostic." We correlated the users' Hand Span with their Average Reachability Score.
# Correlating physical span with ease of usereach_cols= [cforcinreachability.columnsif'-'inc]
reachability['AvgReach'] =reachability[reach_cols].mean(axis=1)
# Linear regression plot to check correlation# (See viz_exports/Does Hand Span Predict Reachability.png)Finding: The data reveals a positive correlation between hand span and total reachability. This suggests that users with a smaller span (< 190mm) struggle with the current cube dimensions, highlighting a need for a "Mini" version of the hardware.
The 2D EDA performed here validates the primary ergonomic theories of the Keycube project:
- Preference follows Ergonomics: Users almost exclusively choose fingers that have a reachability score
$> 1.0$ for a given key. - Physical Constraints: Corner keys are statistically harder to reach across all demographics.
While these Python visualizations confirm the statistical trends, they cannot show the occlusion or the joint angles required to reach a specific key.
3D Visualization is the final frontier for this data. By mapping these 2D reachability averages onto a 3D OBJ model of the Keycube, we can provide developers with a real-time "Ergonomic Heat-Map" that moves as the virtual hand moves.