-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgraph.html
106 lines (104 loc) · 5.52 KB
/
graph.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!doctype html>
<html lang="en_US">
<head>
<title>Summary of Inter-key Timings</title>
<link rel="stylesheet" type="text/css" href="graph.css" />
</head>
<body>
<article id="help">
<section>
<h1>Using <code>keystroke.el</code></h1>
<p>To use <code>keystroke.el</code>, you need to:</p>
<ol>
<li>Download <code>keystroke.el</code>. For now, this is best accomplished by running <pre><code>git clone git://git.pavpanchekha.com/keylogger.el.git</code></pre></li>
<li>Set up the Emacs end of the data collection by loading <code>keystroke.el</code> and running <kbd>remember-every-key-stroke</kbd>.</li>
<li>You actually probably want to set up Emacs to run <code>load-every-key-stroke</code> and then <code>remember-every-key-stroke</code> every time you start Emacs.</li>
<li>Next, use Emacs for a while. Type something. Write a story. Hack.</li>
<li>Emacs will save keystroke data every half-hour; or, run <kbd>save-ever-key-stroke</kbd> to save immediately.</li>
<li>In the <code>keystroke.el</code> folder, run <code>translate.py</code>; it will convert Emacs's data into data consumable with JavaScript</li>
<li>Now open up <code>graph.html</code> in your favorite data; if you're viewing this page, you already know how. Note that you'll need JavaScript to use the viewer properly.</li>
<li>You probably want to set up something like <a href="https://dropbox.com" title="Simplify your life">Dropbox</a> to sync the saved data between different computers.</li>
</ol>
<h1>Troubleshooting</h1>
<p>If you're having problems, have you checked that...</p>
<ul>
<li>You've saved some data in Emacs?</li>
<li>You've run <code>transform.py</code> lately?</li>
<li>You have an HTML5-supporting, JavaScript-enabled browser?</li>
</ul>
</section>
</article>
<article id="your_data">
<figure id="graph">
<canvas id="timing_graph" width="600" height="400"></canvas>
<figcaption>Frequency (vertical) versus duration (horizontal) of key transitions.<br/>Only some transitions are shown; those without enough data to be meaningful are elided.</figcaption>
</figure>
<section class="thin" id="bulk_data">
<p>Here are some basic statistics of the data you've collected.</p>
<table>
<tr> <th>Total Characters</th> <td class="total"></td> </tr>
<tr> <th>Key Transitions</th> <td class="transitions"></td> </tr>
<tr> <th>Typing Time</th> <td class="time"></td> </tr>
</table>
<p>Note that you're unlikely to ever try all 100% of the possible key transitions; for example, how often do you type <span class="distroke">(]</span>?</p>
</section>
<section class="thin" id="finger_analysis">
<p>It's faster to go between different hands than moving the same finger back and forth.</p>
<table>
<tr> <th>Different Hands</th> <td class="d"></td> </tr>
<tr> <th>Same Hand, Different Fingers</th> <td class="sd"></td> </tr>
<tr> <th>Same Hand, Same Fingers</th> <td class="ss"></td> </tr>
<tr> <th>Double-tapping a Key</th> <td class="sp"></td> </tr>
<tr> <th>Overall Average</th> <td class="avg"></td> </tr>
</table>
<p>By rough count, your slowest transition is <span class="distroke slowest"></span> and your fastest is <span class="distroke fastest"></span></p>
</section>
<section class="thin" id="speed">
<p>These data give a rough estimate of your real-world typing speed.</p>
<table>
<tr> <th>Average Word Length</th> <td class="len"></td> </tr>
<tr> <th>Typing Speed</th> <td class="wpm"></td> </tr>
</table>
<p>The numbers above are lower than what you get in a typing
speed test; you type a lot of unusual character combinations
and make a lot more mistakes in your everyday typing.</p>
</section>
<section class="thin" id="layouts">
<p>How fast would you type if you used a different keyboard
layout, assuming familiarity was not an issue?</p>
<table>
<tr> <th>Dvorak</th> <td class="dvorak"></td> </tr>
<tr> <th>Colemak</th> <td class="colemak"></td> </tr>
</table>
<p>That's probably much slower than your current speed.
That's because it's not familiarity, it's muscular training,
that causes your typing to be fast.</p>
</section>
</article>
<script type="text/javascript">
window.data = void(0);
function load_data(data) {
for (var i in data) {
if (data[i][1] == 0) delete data[i];
}
window.data = data
}
</script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="timing_graph.js"></script>
<script type="text/javascript" src="bulk_data.js"></script>
<script type="text/javascript" src="finger_analysis.js"></script>
<script type="text/javascript" src="speed.js"></script>
<script type="text/javascript" src="layouts.js"></script>
<script type="text/javascript" src="layout_opt.js"></script>
<script type="text/javascript" src="keys.jsonp"></script>
<script type="text/javascript">
document.getElementsByTagName("body")[0].className = "good";
timing_graph(window.data);
bulk_data(window.data);
finger_analysis(window.data);
speed(window.data);
layouts(window.data);
</script>
</body>
</html>