-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (131 loc) · 7.57 KB
/
index.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="theme-color" content="#476bd6">
<title>Nextbike Journey Calculator</title>
<meta name="Description" content="Visualise your Nextbike journey data with this handy tool">
<meta name="Author" content="Bob Harper">
<link rel="Publisher" href="http://github.com/BobHarper1">
<meta name="keywords" content="cycling, nextbike, belfast, bikes, rental, scheme, city, health, uk, journeys, co2, calories, calculate, data, statistics, northern ireland" />
<meta name="google" content="nositelinkssearchbox" />
<meta name="revisit-after" content="2 month">
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@bobdata" />
<meta name="twitter:title" content="Nextbike Journey Calculator" />
<meta name="twitter:description" content="Visualise your Nextbike journey data with this handy tool" />
<meta name="twitter:image" content="https://bobharper1.github.io/belfast-bikes-calculator/assets/p-fah.png" />
<link rel="me" href="https://twitter.com/bobdata">
<!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- our own inherit masker for some of the Bootstrap styles -->
<link href="style/index.css" rel="stylesheet" type="text/css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Twitter for websites async load -->
<script>
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));
</script>
<!-- chart.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="page-header">
<h1>Nextbike <small>Calculate your journeys</small></h1></div>
<p>Go to your <a href="http://www.belfastbikes.co.uk/en/belfast/" target="_blank">Nextbike</a> account, copy the text in the transactions and paste into the area below. <a href="help.html">Help</a></p>
<textarea class="form-control" rows="10" id="bikes-user-input" placeholder="Paste your rental history here, for example:
Date Description Amount
2016-02-09 10:20:21 Bike 83411 until 10:25:58 (Royal Avenue / Castlecourt - Europa Bus Station / Blackstaff Square)
2016-02-09 11:35:28 Bike 83084 until 11:44:46 (Linenhall Street / Donegall Square South - Carrick Hill/St Patricks Church)
Any non-journey lines (e.g. payment and account information) will be ignored. We do not capture or store your data!
This has been tested with UK Nextbike data. It might work with some other Nextbike systems. If you can help us test that, get in touch!
"></textarea>
<div id="message"></div>
<button id="submit" class="btn btn-primary btn-large btn-action">Go!</button>
<button id="clear" class="btn btn-large btn-action btn-default">Clear</button>
</div>
</div>
<div class="row hidethis" id="output">
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div id="journeys-number" class="panel-body"></div>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div id="total-distance" class="panel-body"></div>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div id="total-time" class="panel-body"></div>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="panel panel-default">
<div id="total-calories-co2" class="panel-body"></div>
</div>
</div>
<div class="col-xs-12 col-sm-8">
<div class="panel panel-default">
<div id="popular-stations" class="panel-body"></div>
</div>
</div>
<div class="col-xs-12 col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<h3>Total number of trips and distance</h3>
<canvas id="weekChart" height="120px"></canvas>
</div>
</div>
</div>
<div class="col-xs-12 col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">About the calculations</h3>
</div>
<div class="panel-body">
Your distance, calories and CO2 saving estimations are based on the duration of your journeys, rather than knowing what distance you travelled.<br/>An assumption is that you cycle at an average of 10km/h (which is <a href="https://www.technologyreview.com/s/421862/cyclists-pedal-faster-on-wednesdays-reveals-smart-bike-data/"
target="_blank">typical for urban bike rental scheme use <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a>).<br/>The CO2 saving and calories burned calculations are based on the <a href="https://www.cyclestreets.net/journey/help/faq/#co2"
target="_blank">method used by Cyclestreets <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a>. This makes some presumptions about what car you might otherwise have driven, your physique, and how fast you
cycle.<br/>Recorded journeys of under 2 mins that are to the same station aren't included in the final calculations, as they are likely to be instances of where bikes have been taken out but not ridden.
</div>
</div>
</div>
</div>
</div>
<script src="src/repeatPolyfill.js"></script> <!-- Makes String.prototype.repeat compatible pre-ECMA 6 -->
<script src="src/web.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-88802684-1', 'auto');
ga('send', 'pageview');
</script>
</body>