-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
187 lines (177 loc) · 9.99 KB
/
Copy pathindex.html
File metadata and controls
187 lines (177 loc) · 9.99 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GitHub Visualisation</title>
<link rel="icon" type="image/png" sizes="32x32" href="./assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon-16x16.png">
<link rel="stylesheet" href="./assets/css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body style="background-color:#F2FFE9">
<nav class="navbar sticky-top" style="background-color: #e1f7d1;">
<a class="navbar-brand custom-colour" href="#">GitHub Visualisation 🧑💻</a>
<form class="form-inline ml-auto">
<input class="form-control mr-sm-2" type="text" placeholder="GitHub username" id="username">
<input class="form-control mr-sm-2" type="text" placeholder="Auth token (optional)" id="auth">
<button class="btn btn-outline-success my-2 my-sm-0 custom-colour" type="button" onclick="main();displayUserCard()">Visualise!</button>
</form>
</div>
</nav>
<br />
<div class="info">
<h2>What kind of developer are you?</h2>
<p>This project aims to visualise different aspects of the software engineering process by
interrogating the GitHub API for data about an inputted user and answering the questions below.
</p>
<hr>
<h3>How to use</h3>
<p> 1. Enter a valid GitHub username (and optionally an authentication token)
<br />
(Recommended username: 'alicedoherty')
<br />
2. Click "Visualise!"
<br />
3. Click on the questions below to view the relevant visualisations.
<br />
(Note: some graphs may take a few seconds to render)
</p>
</div>
<br />
<div class="d-flex justify-content-center">
<div class="accordion w-75" id="accordionExample">
<div class="card">
<div class="card-header custom-header" id="headingOne">
<h2 class="mb-0">
<button class="btn custom-btn" type="button" data-toggle="collapse" data-target="#collapseZero" aria-expanded="true" aria-controls="collapseZero">
Who are you?
</button>
</h2>
</div>
<div id="collapseZero" class="collapse" aria-labelledby="headingZero" data-parent="#accordionExample">
<div class="card-body green-background">
<p>
Basic information from the user's GitHub profile.
</p>
<hr>
<div class="card mb-3 graph w-50" id="user-card" style="display:none;max-width: 540px;">
<div class="row g-0">
<div class="col-md-4">
<img id="avatar" src="" class="img-fluid rounded-start" alt="Profile picture">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title" id="name"></h5>
<p class="card-text" id="bio"></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item" id="login"></li>
<li class="list-group-item" id="location"></li>
<li class="list-group-item" id="followers"></li>
<li class="list-group-item" id="following"></li>
</ul>
<div class="card-body">
<a href="" class="btn btn-primary" id="html-url">Visit Profile</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header custom-header" id="headingOne">
<h2 class="mb-0">
<button class="btn custom-btn" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
When are you the most productive?
</button>
</h2>
</div>
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body green-background">
<p>
A look into when you are the most productive, broken down by day and time.
<br />
The data visualised is the time and day of your commits.
<br />
For some side-to-side comparison the same metrics have been visualised for
Linus Torvalds.
<br />
</p>
<hr>
<p>
For an interesting visualisation try the user 'alicedoherty' and notice that most commits
are made on a Friday (aka when college assignments are due).
</p>
<div class="graph">
<canvas id="commit-day-chart"></canvas>
</div>
<div class="graph">
<canvas id="commit-time-chart"></canvas>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header custom-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn custom-btn" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
What are you interested in?
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body green-background">
<p>
A snapshot into the topics you are interested in.
<br />
This graph visualises the topics of your 30 most recently starred repositories.
</p>
<hr>
<h5 id="no-topics"></h5>
<div class="graph">
<canvas id="topics-chart"></canvas>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header custom-header" id="headingThree">
<h2 class="mb-0">
<button class="btn custom-btn" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
How popular are you?
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body green-background">
<p>
A look into the relationships between you and your followers.
<br />
This graph visualises how many friends you have, where friends are people that you
follow that also follow you back. "Not friends" here are people that you follow, who
don't follow you back.
</p>
<hr>
<h5 id="no-followers"></h5>
<div class="graph">
<canvas id="popularity-chart"></canvas>
</div>
<br />
<h5>Users you follow, who don't follow you back</h5>
<ul class="list-group" id="not-friends-list"></ul>
</div>
</div>
</div>
</div>
</div>
<!-- JavaScript files -->
<script src="assets/js/app.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<!-- JS needed for Bootstrap-->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>