-
Notifications
You must be signed in to change notification settings - Fork 0
/
vishal.html
1531 lines (1531 loc) · 65.2 KB
/
vishal.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="semantic.css">
<title>UChicago Class of 2020 Survey</title>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('44', {packages: ['corechart']});
google.charts.setOnLoadCallback(startup);
colors = ["#800000", "#FFC9C9", "#DE7676", "#7A0000", "#FF9999",
"#c62323", "#6c2121", "#5c0303", "#F58C8C"];
var demo_chart;
var experiences_chart;
var family_chart;
var high_school_chart;
var app_chart;
var uchicago_chart;
var formatter
function startup(){
demo_chart = new google.visualization.ChartWrapper({
containerId: 'demographics'
});
experiences_chart = new google.visualization.ChartWrapper({
containerId: 'experiences'
});
family_chart = new google.visualization.ChartWrapper({
containerId: 'family'
});
high_school_chart = new google.visualization.ChartWrapper({
containerId: 'high_school'
})
app_chart = new google.visualization.ChartWrapper({
containerId: 'application'
})
uchicago_chart = new google.visualization.ChartWrapper({
containerId: 'plans_at_uc'
})
formatter = new google.visualization.NumberFormat({
pattern: '##.##%'
});
gender();
religion();
father_education();
school_type();
ap_classes();
varsity_recruit();
}
function sort_function(a,b){return b[1] - a[1];}
function gender() {
var data = new google.visualization.arrayToDataTable([
['Gender', 'Count'],
['Female', 374],
['Other', 12],
['Male', 295]
].sort(sort_function));
document.getElementById('demo_header').innerHTML = "What is your gender?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('PieChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function pvp_gender() {
var data = new google.visualization.arrayToDataTable([
['School Type', 'Female', 'Male'],
['Public', .5977, .3851],
['Private', .5032, .4904]
]);
formatter.format(data, 1);
formatter.format(data, 2);
document.getElementById('demo_header').innerHTML = "Gender by School"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.7,
min:0
}},
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('ColumnChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function ethnicity() {
var data = new google.visualization.arrayToDataTable([
['Ethnicity', 'Count'],
['Asian', 150],
['Black or African American', 45],
['Hispanic or Latino', 82],
["Indian or South Asian", 70],
["Middle Eastern", 10],
["White", 345],
["Other", 7]
].sort(sort_function));
document.getElementById('demo_header').innerHTML = "What is your ethnicity?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('PieChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function orientation() {
var data = new google.visualization.arrayToDataTable([
['Orientation', 'Count'],
['Asexual', 16],
['Bisexual', 48],
['Gay or Lesbian', 38],
["Queer", 11],
["Questioning", 28],
["Straight", 527],
["Other", 7],
["Unsure", 4]
].sort(sort_function));
document.getElementById('demo_header').innerHTML = "What is your sexual orientation?"
var options = {title:'What is your sexual orientation?',
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('PieChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function ht_location() {
var data = new google.visualization.arrayToDataTable([
['Location', 'Count'],
['Mid-Atlantic', 117],
['Midwest', 177],
['New England', 84],
["Outside the United States", 115],
['South', 85],
['Southwest', 17],
['West', 70]
].sort(sort_function));
document.getElementById('demo_header').innerHTML = "Where are you from?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('PieChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function hometown() {
var data = new google.visualization.arrayToDataTable([
['Type', 'Count'],
['City', 259],
['Rural', 21],
['Suburbs', 402]
].sort(sort_function));
document.getElementById('demo_header').innerHTML = "What kind of area did you grow up in?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('PieChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function pvp_hometown() {
var data = new google.visualization.arrayToDataTable([
['School Type', 'City', 'Rural', 'Surburbs'],
['Public', .2378, .0401, .7221],
['Private', .5256, .0192, .4551]
]);
formatter.format(data, 1);
formatter.format(data, 2);
formatter.format(data, 3);
document.getElementById('demo_header').innerHTML = "Hometown Type by School"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'labeled'},colors:colors,width:700,height:300};
demo_chart.setChartType('ColumnChart');
demo_chart.setDataTable(data);
demo_chart.setOptions(options);
demo_chart.draw();
}
function religion() {
var data = new google.visualization.arrayToDataTable([
['Religion', 'Count'],
['Agnostic', 138],
['Atheist', 169],
['Buddhist', 11],
['Catholic', 98],
['Hindu', 32],
['Jewish', 73],
['Muslim', 16],
['Protestant', 86],
['Other', 47]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "What religious identification fits you best?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function how_religious() {
var data = new google.visualization.arrayToDataTable([
['How Religious', 'Percent of Respondents'],
['Not Religious at All', .4632],
['Not Very Religious', .2176],
['Somewhat Religious', .1676],
['Very Religious', .1103],
['Extremely Religious', .0412]
]);
formatter.format(data, 1);
document.getElementById('experiences_header').innerHTML = "How religious would you say you are?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.7,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
experiences_chart.setChartType('ColumnChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function political_spectrum() {
var data = new google.visualization.arrayToDataTable([
['How Political', 'Percent of Respondents'],
['Very Liberal', .2463],
['Somewhat Liberal', .4926],
['Moderate', .1667],
['Somewhat Conservative', .0900],
['Very Conservative', .0044]
]);
formatter.format(data, 1);
document.getElementById('experiences_header').innerHTML = "Where on the political spectrum would you say you lie?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.7,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
experiences_chart.setChartType('ColumnChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function alcohol() {
var data = new google.visualization.arrayToDataTable([
['Consumed Alcohol', 'Count'],
['No', 256],
['Yes', 416]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Have you consumed alcohol recreationally?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function pvp_alcohol() {
var data = new google.visualization.arrayToDataTable([
['School Type', 'Percent that has consumed alcohol'],
['Public', .5536],
['Private', .6971],
['Other', .55],
]);
formatter.format(data, 1);
document.getElementById('experiences_header').innerHTML = "Alcohol Consumption by School Type"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
experiences_chart.setChartType('ColumnChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function ht_alcohol() {
var data = new google.visualization.arrayToDataTable([
['Hometown', 'Percent that has consumed alcohol'],
['City', .7059],
['Suburbs', .5707],
['Rural', .4762],
]);
formatter.format(data, 1);
document.getElementById('experiences_header').innerHTML = "Alcohol Consumption by Hometown"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
experiences_chart.setChartType('ColumnChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function alcohol_uc() {
var data = new google.visualization.arrayToDataTable([
['Consumed Alcohol', 'Count'],
['No', 226],
['Yes', 441]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Do you plan on consuming alcohol recreationally while in college?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function marijuana() {
var data = new google.visualization.arrayToDataTable([
['Used Marijuana', 'Count'],
['No', 495],
['Yes', 180]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Have you used marijuana recreationally? "
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function marijuana_uc() {
var data = new google.visualization.arrayToDataTable([
['Used Marijuana', 'Count'],
['No', 500],
['Yes', 169]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Do you plan on consuming marijuana recreationally while in college?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function fake_id() {
var data = new google.visualization.arrayToDataTable([
['Has Fake', 'Count'],
['No', 608],
['Yes', 66]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Do you currently have a fake ID?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function fake_id_uc() {
var data = new google.visualization.arrayToDataTable([
['Has Fake', 'Count'],
['No', 452],
['Yes', 60],
['Maybe', 158]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Do you plan on getting a fake ID during your first year of college?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function sex() {
var data = new google.visualization.arrayToDataTable([
['Has Sex', 'Count'],
['No', 440],
['Yes', 225]
].sort(sort_function));
document.getElementById('experiences_header').innerHTML = "Have you had sex?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function sex_uc() {
var data = new google.visualization.arrayToDataTable([
['Has Sex', 'Count'],
['No', 143],
['Yes', 513],
]);
document.getElementById('experiences_header').innerHTML = "Do you anticipate having sex at any point while in college?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
experiences_chart.setChartType('PieChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function gap_year_uc() {
var data = new google.visualization.arrayToDataTable([
['Hometown', 'Percent Who Took Gap Year'],
['Public', .0230],
['Private', .0932],
['Other', .0952],
]);
formatter.format(data, 1);
document.getElementById('experiences_header').innerHTML = "Taking a Gap Year by School Type"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.2,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
experiences_chart.setChartType('ColumnChart');
experiences_chart.setDataTable(data);
experiences_chart.setOptions(options);
experiences_chart.draw();
}
function father_education() {
var data = new google.visualization.arrayToDataTable([
['Education Level', 'Count'],
['Some high school, no diploma', 14],
['High school graduate, diploma or the equivalent', 28],
['Some college credit, no degree', 23],
['Trade/technical/vocational training', 17],
['Associate degree', 6],
['Bachelor\' degree', 155],
['Graduate degree', 433]
]);
document.getElementById('family_header').innerHTML = "What is your father's highest education level?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
family_chart.setChartType('PieChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function mother_education() {
var data = new google.visualization.arrayToDataTable([
['Education Level', 'Count'],
['Some high school, no diploma', 10],
['High school graduate, diploma or the equivalent', 27],
['Some college credit, no degree', 22],
['Trade/technical/vocational training', 11],
['Associate degree', 33],
['Bachelor\' degree', 193],
['Graduate degree', 384]
]);
document.getElementById('family_header').innerHTML = "What is your mother's highest education level?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
family_chart.setChartType('PieChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function legacy() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Count'],
['Yes, both parents', 20],
['Yes, one parent', 49],
['No', 611]
]);
document.getElementById('family_header').innerHTML = "Did either of your parents attend the University of Chicago?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
family_chart.setChartType('PieChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function income() {
var data = new google.visualization.arrayToDataTable([
['Income Bracket', 'Percent of Sample in this Bracket'],
['< $15,0000', .0198],
['$15,000 - $30,000', .0362],
['$30,000 - $60,000', .0741],
['$60,000 - $100,000', .1038],
['$100,000 - $150,000', .1483],
['$150,000 - $200,000', .1417],
['$200,000 - $300,000', .1680],
['$300,000 - $500,000', .1516],
['> $500,000', .1565]
]);
formatter.format(data, 1);
document.getElementById('family_header').innerHTML = "Roughly how much did your family earn in the previous year in US dollars?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.4,
min:0
}},
hAxis : {
textStyle : {
fontSize: 9 // or the number you want
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
family_chart.setChartType('ColumnChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function income_legacy() {
var data = new google.visualization.arrayToDataTable([
['Income Bracket', 'Percent of Non-Legacies in this Bracket', 'Percent of Legacies in this Bracket'],
['< $15,0000', .0219, 0],
['$15,000 - $30,000', .0401, 0],
['$30,000 - $60,000', .0785, .0339],
['$60,000 - $100,000', .1131, .0169],
['$100,000 - $150,000', .1478, .1525],
['$150,000 - $200,000', .1460, .1017],
['$200,000 - $300,000', .1752, .1017],
['$300,000 - $500,000', .1387, .2712],
['> $500,000', .1387, .3220]
]);
formatter.format(data, 1);
formatter.format(data, 2);
document.getElementById('family_header').innerHTML = "Percent of Non-Legacies and Legacies in Each Income Bracket"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.4,
min:0
}},
hAxis : {
textStyle : {
fontSize: 9 // or the number you want
}},
legend:{position: 'labeled'},colors:colors,width:700,height:300};
family_chart.setChartType('ColumnChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function siblings() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['0 Siblings', 0.1335],
['1 Sibling', 0.5089],
['2 Siblings', 0.2700],
['3 Siblings', .0564],
['4 Siblings', .0163],
['4+ Siblings', .0148]
]);
formatter.format(data, 1);
document.getElementById('family_header').innerHTML = "How many siblings do you have?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.6,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
family_chart.setChartType('ColumnChart');
family_chart.setDataTable(data);
family_chart.setOptions(options);
family_chart.draw();
}
function school_type() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Count'],
['Public high school', 338],
['Public charter high school', 11],
['Private (parochial) high school', 63],
['Private (non-parochial) high school', 249],
['Other', 21]
]);
document.getElementById('high_school_header').innerHTML = "What kind of high school did you attend?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
high_school_chart.setChartType('PieChart');
high_school_chart.setDataTable(data);
high_school_chart.setOptions(options);
high_school_chart.draw();
}
function hs_job() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['0 - 5 hours', 0.7897],
['5.5 - 10 hours', 0.1088],
['10.5 - 15 hours', 0.0338],
['15.5 - 20 hours', .0382],
['20.5 - 30 hours', .0162],
['30.5 - 40 hours', .0103],
['40+ hours', .0029]
]);
formatter.format(data, 1);
document.getElementById('high_school_header').innerHTML = "During your senior year, on average, how many hours per week did you work at a job?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:1,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
high_school_chart.setChartType('ColumnChart');
high_school_chart.setDataTable(data);
high_school_chart.setOptions(options);
high_school_chart.draw();
}
function cheating() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['No, never', 0.5773],
['Yes, on homework', 0.4015],
['Yes, on an exam', 0.1121]
]);
formatter.format(data, 1);
document.getElementById('high_school_header').innerHTML = "Did you ever cheat in high school?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
high_school_chart.setChartType('ColumnChart');
high_school_chart.setDataTable(data);
high_school_chart.setOptions(options);
high_school_chart.draw();
}
function alcohol_cheating() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Students Who Haven\'t Drank Alcohol', 'Students Who Have Drank Alcohol'],
['No, never', .6932, 0.5037],
['Yes, on homework', .2988, 0.4665],
['Yes, on an exam', .0677, 0.1340]
]);
formatter.format(data, 1);
formatter.format(data, 2);
document.getElementById('high_school_header').innerHTML = "Cheating by Alcohol Consumption"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'labeled'},colors:colors,width:700,height:300};
high_school_chart.setChartType('ColumnChart');
high_school_chart.setDataTable(data);
high_school_chart.setOptions(options);
high_school_chart.draw();
}
function ap_classes() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['0', .0576,],
['1', .0121],
['2', .0121],
['3', .0212],
['4', .0515],
['5', .0788],
['6', .1606],
['7', .0758],
['8', .1030],
['9', .0803],
['10', .0955],
['11', .0788],
['12', .0561],
['13', .0333],
['13+', .0833]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "How many college-level (AP/IB) courses did you take while in high school?"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.2,
min:0
}},
hAxis : {
textStyle : {
fontSize: 11 // or the number you want
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function sat() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['< 2000', .0654],
['2000 - 2045', .0436],
['2050 - 2095', .0501],
['2100 - 2145', .0654],
['2150 - 2195', .0959],
['2200 - 2245', .1264],
['2250 - 2295', .2113],
['2300 - 2345', .1830],
['2350 - 2400', .1590]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "If you took the SAT, what was your overall score? "
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.25,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function sat_recruit() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Average SAT Score'],
['Recruited for a varsity sport', 2149],
['Not recruited', 2224],
]);
document.getElementById('app_header').innerHTML = "Average SAT Score by Athletic Recruit"
var options = {
vAxis: {viewWindowMode:'explicit',
viewWindow:{
max:2400,
min:2000
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function sat_ethnicity() {
var data = new google.visualization.arrayToDataTable([
['Ethnicity', 'Average SAT Score'],
['Asian', 2277],
['Black or African American', 2129],
['Hispanic or Latino', 2098],
['Indian or South Asian', 2254],
['Middle-Eastern', 2150],
['White', 2226]
]);
document.getElementById('app_header').innerHTML = "Average SAT Score by Ethnicity"
var options = {
hAxis: {viewWindowMode:'explicit',
viewWindow:{
max:2400,
min:2000
}},
vAxis : {
textStyle : {
fontSize: 9 // or the number you want
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('BarChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function act() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent of Sample'],
['< 30', .0291],
['30', .0412],
['31', .0581],
['32', .1259],
['33 ', .1380],
['34', .2978],
['35', .2203],
['36', .0896]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "If you took the ACT, what was your overall score? "
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.4,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function pvp_counselor() {
var data = new google.visualization.arrayToDataTable([
['School Type', 'Hired Admissions Counselor'],
['Public School', 0.1404],
['Private School', .21217],
['Other', .05]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "Hired Private Admissions Counselor by School Type"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.3,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function income_counselor() {
var data = new google.visualization.arrayToDataTable([
['Income Bracket', 'Hired Private Admissions Counselor'],
['< $15,0000', .0833],
['$15,000 - $30,000', .0909],
['$30,000 - $60,000', .0444],
['$60,000 - $100,000', .1429],
['$100,000 - $150,000', .0899],
['$150,000 - $200,000', .1279],
['$200,000 - $300,000', .1863],
['$300,000 - $500,000', .2527],
['> $500,000', .3226]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "Hired Private Admissions Counselor by Income"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.4,
min:0
}},
hAxis : {
textStyle : {
fontSize: 9 // or the number you want
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function top_choice() {
var data = new google.visualization.arrayToDataTable([
['Hired Admissions Counselor', 'Count'],
['No', 219],
['Yes', 444]
].sort(sort_function));
document.getElementById('app_header').innerHTML = "Was UChicago your top choice school?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
app_chart.setChartType('PieChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function acceptance_top_choice() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Average (Number of Schools Accepted to / Number Applied)'],
['UChicago was not my top choice school', .4948],
['UChicago was my top choice school', .6687]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "Average Acceptance Rates to Colleges by UC Being Top Choice"
var options = {
vAxis: {format: 'percent',viewWindowMode:'explicit',
viewWindow:{
max:.8,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function uc_app() {
var data = new google.visualization.arrayToDataTable([
['Applied', 'Count'],
['Applied Early Action, accepted Early Action', 352],
['Applied Early Action, accepted Regular Decision', 135],
['Appleid Regular Decision, accepted Reguar Decision', 191]
]);
document.getElementById('app_header').innerHTML = "Did you apply to UChicago Regular Decision or Early Action?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
app_chart.setChartType('PieChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function number_apps() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Average Number of Colleges Applied To'],
['Applied Early Action, accepted Early Action', 6.87],
['Applied Early Action, accepted Regular Decision', 11.52],
['Applied Regular Decision, accepted Regular Decision', 11.57]
]);
document.getElementById('app_header').innerHTML = "Number of Applications Sent In"
var options = {
vAxis: {viewWindowMode:'explicit',
viewWindow:{
max:15,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function top_choice_uc_app() {
var data = new google.visualization.arrayToDataTable([
['Response', 'Percent Where UChicago was Top Choice'],
['Applied Early Action, accepted Early Action', .7370],
['Applied Early Action, accepted Regular Decision', .7481],
['Applied Regular Decision, accepted Regular Decision', .4835]
]);
formatter.format(data, 1);
document.getElementById('app_header').innerHTML = "UChicago was Top Choice by Type of Application"
var options = {
vAxis: {format:'percent', viewWindowMode:'explicit',
viewWindow:{
max:1,
min:0
}},
legend:{position: 'none'},colors:colors,width:700,height:300};
app_chart.setChartType('ColumnChart');
app_chart.setDataTable(data);
app_chart.setOptions(options);
app_chart.draw();
}
function varsity_recruit() {
var data = new google.visualization.arrayToDataTable([
['Varsity', 'Count'],
['No', 642],
['Yes', 38]
]);
document.getElementById('plans_at_uc_header').innerHTML = "Were you recruited to play for a varsity sports team?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
uchicago_chart.setChartType('PieChart');
uchicago_chart.setDataTable(data);
uchicago_chart.setOptions(options);
uchicago_chart.draw();
}
function club_sports() {
var data = new google.visualization.arrayToDataTable([
['Varsity', 'Count'],
['No', 170],
['Yes', 223],
['Maybe', 286]
]);
document.getElementById('plans_at_uc_header').innerHTML = "Are you planning on playing any club sports at UChicago?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
uchicago_chart.setChartType('PieChart');
uchicago_chart.setDataTable(data);
uchicago_chart.setOptions(options);
uchicago_chart.draw();
}
function dorm() {
var data = new google.visualization.arrayToDataTable([
['Varsity', 'Count'],
['Burton Judson', 58],
['Campus North', 223],
['International House', 17],
['Max Palevsky', 123],
['Renee Granville-Grossman (South)', 94],
['Snell-Hitchcock', 40],
['Stony Island', 9],
]);
document.getElementById('plans_at_uc_header').innerHTML = "Which dorm is your top preference?"
var options = {
tooltip: {text: "percentage"}, pieSliceText: "none",
legend:{position: 'labeled'},colors:colors,width:700,height:300};
uchicago_chart.setChartType('PieChart');
uchicago_chart.setDataTable(data);
uchicago_chart.setOptions(options);
uchicago_chart.draw();
}
function major() {
var data = new google.visualization.arrayToDataTable([
['Major', 'Class of 2020', 'Undergrads at UChicago'],
['Economics', .1937, .2404],