Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding degree and first_timer stats #303

Merged
merged 36 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a0633ed
Add files via upload
raquelpanapalen Mar 25, 2020
54b24db
Merge pull request #13 from raquelpanapalen/raquelpanapalen-patch-15
raquelpanapalen Mar 25, 2020
3aae68b
Add files via upload
raquelpanapalen Mar 25, 2020
1e6920f
Merge pull request #14 from raquelpanapalen/raquelpanapalen-patch-16
raquelpanapalen Mar 25, 2020
b8ff23d
Add files via upload
raquelpanapalen Mar 25, 2020
041b484
Merge pull request #15 from raquelpanapalen/raquelpanapalen-patch-17
raquelpanapalen Mar 25, 2020
52bfb33
Add files via upload
raquelpanapalen Mar 25, 2020
2e9d7da
Merge pull request #16 from raquelpanapalen/raquelpanapalen-patch-18
raquelpanapalen Mar 25, 2020
038d3fa
Merge branch 'master' into master
Casassarnau Mar 26, 2020
258b797
Add files via upload
raquelpanapalen Apr 1, 2020
d13eeb2
Merge pull request #17 from raquelpanapalen/raquelpanapalen-patch-19
raquelpanapalen Apr 1, 2020
a32c9f8
Add files via upload
raquelpanapalen Apr 1, 2020
f64e3d2
Merge pull request #18 from raquelpanapalen/raquelpanapalen-patch-20
raquelpanapalen Apr 1, 2020
3dfbf16
Optimization started
Casassarnau Apr 5, 2020
2a25389
Merge pull request #19 from raquelpanapalen/optimization
raquelpanapalen Apr 5, 2020
6a747e8
optimizacion
raquelpanapalen Apr 5, 2020
3604e1f
optimizacion
raquelpanapalen Apr 5, 2020
940242f
Merge pull request #21 from raquelpanapalen/raquelpanapalen-patch-22
raquelpanapalen Apr 5, 2020
86ca78b
Merge pull request #20 from raquelpanapalen/raquelpanapalen-patch-21
raquelpanapalen Apr 5, 2020
9e22645
Bar chart fix
Casassarnau Apr 5, 2020
147f01f
fix
Casassarnau Apr 5, 2020
96e402d
Merge pull request #22 from raquelpanapalen/Bar_char_fix
raquelpanapalen Apr 6, 2020
4b146e0
Add files via upload
raquelpanapalen Apr 7, 2020
ecfb03e
Merge pull request #23 from raquelpanapalen/raquelpanapalen-patch-23
raquelpanapalen Apr 7, 2020
c55cc2a
Add files via upload
raquelpanapalen Apr 7, 2020
9a69349
Merge pull request #24 from raquelpanapalen/raquelpanapalen-patch-24
raquelpanapalen Apr 7, 2020
f411322
optimizacion
raquelpanapalen Apr 7, 2020
5958f96
Merge pull request #26 from raquelpanapalen/raquelpanapalen-patch-26
raquelpanapalen Apr 7, 2020
470c6a7
lennyface & resume
raquelpanapalen Apr 9, 2020
ea9a4c2
Merge pull request #27 from raquelpanapalen/raquelpanapalen-patch-27
raquelpanapalen Apr 9, 2020
0f3824c
lennyface & resume
raquelpanapalen Apr 9, 2020
bb37e66
Merge pull request #28 from raquelpanapalen/raquelpanapalen-patch-28
raquelpanapalen Apr 9, 2020
2f22a05
Add files via upload
raquelpanapalen Apr 9, 2020
ae00a83
Merge pull request #29 from raquelpanapalen/raquelpanapalen-patch-29
raquelpanapalen Apr 9, 2020
ab7e402
defaultdict(int)
raquelpanapalen Apr 9, 2020
6b5f802
Merge pull request #30 from raquelpanapalen/raquelpanapalen-patch-30
raquelpanapalen Apr 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 114 additions & 60 deletions stats/templates/application_stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ <h3>Confirmed only</h3>
<div id="university_stats_confirmed"></div>
</div>
</div>
</div>
<h2>Graduation year</h2>

<div class="row">
Expand All @@ -58,6 +57,30 @@ <h3>Confirmed only</h3>
<div id="graduation_year_stats_confirmed"></div>
</div>
</div>
<h2>Degree</h2>

<div class="row">
<div class="col-md-6">
<h3>All</h3>
<div id="degree_stats"></div>
</div>
<div class="col-md-6">
<h3>Confirmed only</h3>
<div id="degree_stats_confirmed"></div>
</div>
</div>
<h2>First timer</h2>

<div class="row">
<div class="col-md-6">
<h3>All</h3>
<div id="first_timer_stats"></div>
</div>
<div class="col-md-6">
<h3>Confirmed only</h3>
<div id="first_timer_stats_confirmed"></div>
</div>
</div>
<h2>T-Shirts sizes</h2>

<div class="row">
Expand Down Expand Up @@ -115,12 +138,11 @@ <h3>Confirmed only</h3>
bindto: '#shirts_stats_confirmed',
data: {
json: data['shirt_count_confirmed'],
type: 'bar',
keys: {
x: 'tshirt_size',
value: ['applications']
x: 'tshirt',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -129,17 +151,10 @@ <h3>Confirmed only</h3>
}
}
});

var status_data = {};
var sites = [];
$(data['status']).each(function (c, e) {
sites.push(e.status_name);
status_data[e.status_name] = e.applications;
});
c3.generate({
bindto: '#applications_stats',
data: {
json: status_data,
json: data['status'],
type: 'donut'

},
Expand All @@ -151,16 +166,10 @@ <h3>Confirmed only</h3>
}
}
});
var gender_data = {};
var genders = [];
$(data['gender']).each(function (c, e) {
genders.push(e.gender_name);
gender_data[e.gender_name] = e.applications;
});
c3.generate({
bindto: '#gender_stats',
data: {
json: gender_data,
json: data['gender'],
type: 'donut'

},
Expand All @@ -176,12 +185,11 @@ <h3>Confirmed only</h3>
bindto: '#shirts_stats',
data: {
json: data['shirt_count'],
type: 'bar',
keys: {
x: 'tshirt_size',
value: ['applications']
x: 'tshirt',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -194,12 +202,11 @@ <h3>Confirmed only</h3>
bindto: '#diet_stats',
data: {
json: data['diet'],
type: 'bar',
keys: {
x: 'diet',
value: ['applications']
x: 'diet',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -212,12 +219,11 @@ <h3>Confirmed only</h3>
bindto: '#diet_stats_confirmed',
data: {
json: data['diet_confirmed'],
type: 'bar',
keys: {
x: 'diet',
value: ['applications']
x: 'diet',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -231,8 +237,8 @@ <h3>Confirmed only</h3>
data: {
json: data['origin'],
keys: {
x: 'origin',
value: ['applications']
x: 'origin',
value: ['applications']
},
type: 'bar'

Expand All @@ -248,12 +254,11 @@ <h3>Confirmed only</h3>
bindto: '#origin_stats_confirmed',
data: {
json: data['origin_confirmed'],
type: 'bar',
keys: {
x: 'origin',
value: ['applications']
x: 'origin',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -266,12 +271,11 @@ <h3>Confirmed only</h3>
bindto: '#university_stats',
data: {
json: data['university'],
type: 'bar',
keys: {
x: 'university',
value: ['applications']
x: 'university',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -284,12 +288,11 @@ <h3>Confirmed only</h3>
bindto: '#university_stats_confirmed',
data: {
json: data['university_confirmed'],
type: 'bar',
keys: {
x: 'university',
value: ['applications']
x: 'university',
value: ['applications']
},
type: 'bar'

},

axis: {
Expand All @@ -298,16 +301,10 @@ <h3>Confirmed only</h3>
}
}
});
var grad_year_data = {};
var grad_years = [];
$(data['graduation_year']).each(function (c, e) {
grad_years.push(e.graduation_year);
grad_year_data[e.graduation_year] = e.applications;
});
c3.generate({
bindto: '#graduation_year_stats',
data: {
json: grad_year_data,
json: data['graduation_year'],
type: 'donut'

},
Expand All @@ -319,16 +316,73 @@ <h3>Confirmed only</h3>
}
}
});
var grad_year_confirmed_data = {};
var grad_years_confirmed = [];
$(data['graduation_year_confirmed']).each(function (c, e) {
grad_years_confirmed.push(e.graduation_year);
grad_year_confirmed_data[e.graduation_year] = e.applications;
});
c3.generate({
bindto: '#graduation_year_stats_confirmed',
data: {
json: grad_year_confirmed_data,
json: data['graduation_year_confirmed'],
type: 'donut'

},
donut: {
label: {
format: function (value, ratio, id) {
return value;
}
}
}
});
c3.generate({
bindto: '#degree_stats',
data: {
json: data['degree'],
type: 'bar',
keys: {
x: 'degree',
value: ['applications']
},
},
axis: {
x: {
type: 'category',
}
}
});
c3.generate({
bindto: '#degree_stats_confirmed',
data: {
json: data['degree_confirmed'],
type: 'bar',
keys: {
x: 'degree',
value: ['applications']
},
},

axis: {
x: {
type: 'category'
}
}
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the UI? Maybe it's time to create a new tab? It may become unreadable.

c3.generate({
bindto: '#first_timer_stats',
data: {
json: data['first_timer'],
type: 'donut'

},
donut: {
label: {
format: function (value, ratio, id) {
return value;
}
}
}
});
c3.generate({
bindto: '#first_timer_stats_confirmed',
data: {
json: data['first_timer_confirmed'],
type: 'donut'

},
Expand Down
Loading