Report
As a class, we brainstormed and came up with a long list of further questions we
can ask based on the FCQ data. Out of these questions, our team chose to tackle on
the following questions. Each member on our team is reponsible for one question.
How many instructors have taught each subject? Kari
var groups = _.groupBy(data, 'Subject');
// collect all the instructor names for each class and count uniq
var ret1 = _.mapValues(groups, function(d){
var instrArr = _.pluck(d, 'Instructors');
//var j = 0;
var nameArr = _.map(instrArr, function(d){
var names = _.pluck(d, 'name');
//if (j==0){console.log(names); j++}
return names;
});
return _.size(_.uniq(_.flatten(nameArr)));
});
return ret1;
| Subject |
Num Instructors |
| HIST |
45 |
| HONR |
10 |
| HUMN |
13 |
| IAFS |
16 |
| IPHY |
34 |
| LING |
19 |
| MATH |
61 |
| MCDB |
32 |
| BAKR |
3 |
| PHIL |
48 |
| PHYS |
54 |
| PSCI |
47 |
| NRSC |
9 |
| PSYC |
47 |
| WRTG |
85 |
| RLST |
13 |
| SLHS |
28 |
| SOCY |
58 |
| ARAB |
3 |
| PORT |
2 |
| SPAN |
62 |
| COMR |
4 |
| FARR |
8 |
| GSAP |
2 |
| INVS |
5 |
| PACS |
2 |
| SEWL |
3 |
| DNCE |
31 |
| THTR |
31 |
| WMST |
14 |
| ACCT |
17 |
| BADM |
16 |
| BCOR |
23 |
| BSLW |
1 |
| BUSM |
5 |
| CESR |
5 |
| ESBM |
13 |
| FNCE |
16 |
| INBU |
3 |
| MBAC |
11 |
| MBAX |
26 |
| MGMT |
28 |
| MKTG |
20 |
| REAL |
3 |
| EDUC |
75 |
| ASEN |
38 |
| CHEN |
21 |
| CSCI |
34 |
| AREN |
18 |
| CVEN |
40 |
| ECEN |
37 |
| EMEN |
9 |
| EHON |
2 |
| GEEN |
44 |
| EVEN |
2 |
| HUEN |
11 |
| MCEN |
48 |
| TLEN |
19 |
| ATLS |
18 |
| MUSM |
5 |
| RSEI |
1 |
| JOUR |
52 |
| LAWS |
89 |
| CONV |
2 |
| EMUS |
19 |
| MUEL |
25 |
| MUSC |
50 |
| PMUS |
31 |
| TMUS |
1 |
| AIRR |
5 |
| MILR |
5 |
| NAVR |
6 |
| CSVC |
2 |
| LDSP |
9 |
| NRLN |
1 |
| PRLC |
3 |
| ARCH |
1 |
| ENVD |
35 |
| ARTH |
10 |
| ARTS |
40 |
| CAMW |
2 |
| CWCV |
1 |
| LGBT |
1 |
| LIBB |
3 |
| CHIN |
6 |
| FRSI |
1 |
| HIND |
1 |
| JPNS |
7 |
| KREN |
1 |
| ANTH |
23 |
| APPM |
28 |
| ASTR |
21 |
| ARSC |
20 |
| ATOC |
19 |
| CHEM |
34 |
| CLAS |
16 |
| COMM |
35 |
| EBIO |
35 |
| ECON |
48 |
| ENGL |
72 |
| ENVS |
16 |
| ETHN |
16 |
| FILM |
23 |
| FREN |
23 |
| ITAL |
9 |
| GEOG |
22 |
| GEOL |
30 |
| GRMN |
20 |
| HEBR |
3 |
| RUSS |
10 |
| SCAN |
2 |
| SWED |
1 |
| LEAD |
1 |
Does the instruction tends to give out higher grades if they teach more classes? or the reverse? Ming
var graded = _.filter(data,function(d){
return d.hasOwnProperty("AVG_GRD");
})
var smallData = _.map(graded, function(d){
var avg_grd = d.AVG_GRD;
var nameArr = _.pluck(d.Instructors, 'name');
var objArray = _.map(nameArr, function(d){
var obj = {name:d,AVG_GRD:avg_grd};
return obj;
})
return objArray;
});
var groups = _.groupBy(_.flatten(smallData),'name');
var groups2 = _.map(groups, function(d){
var avg = _.reduce(d, function(total,e){
return total+e.AVG_GRD;
},0)/_.size(d);
var obj = {classcount:_.size(d),AVG_GRD:avg,name:_.first(d).name}
return obj;
});
var groups3 = _.groupBy(groups2,'classcount');
var avgbyCount = _.mapValues(groups3, function(d){
var avg = _.round(_.reduce(d, function(total,e){
return total+e.AVG_GRD;
},0)/_.size(d),2);
var obj = {classcount:_.first(d).classcount,AVG_GRD:avg,instrCount:_.size(d)}
return obj;
});
return avgbyCount
Based on the table below, there does not seem to be a trend between the number of classes taught and average grade.
| Num Classes Taught |
Avg Grade | Num Instructors |
| 1 |
3.28 |
800
|
| 2 |
3.27 |
656
|
| 3 |
3.3 |
277
|
| 4 |
3.21 |
139
|
| 5 |
3.23 |
61
|
| 6 |
3.17 |
69
|
| 7 |
3.2 |
29
|
| 8 |
3.11 |
25
|
| 9 |
3.55 |
7
|
| 10 |
2.72 |
2
|
| 14 |
3.48 |
2
|
| 15 |
3.53 |
2
|
| 16 |
3.86 |
1
|
| 20 |
3.3 |
1
|
| 21 |
2.55 |
1
|
| 22 |
3.19 |
1
|
| 25 |
2.91 |
1
|
| 26 |
3.12 |
1
|
| 27 |
2.91 |
1
|
| 33 |
2.7 |
1
|
| 39 |
2.73 |
1
|
| 41 |
2.6 |
1
|
| 60 |
2.92 |
1
|
| 64 |
2.38 |
1
|
Which department has the lowest enrollment? John
var grps = _.groupBy(data, 'CrsPBADept')
var ret1 = _.mapValues(grps, function(d){
var enrollNumbers = _.pluck(d, 'N.ENROLL')
return _.sum(enrollNumbers)
})
var min = _.min(ret1)
var dept = _.pick(ret1, function(d){
return d == min
})
return dept
Which subject is most in demand,based on the total number of enrollment? Sussant
var group = _.groupBy(data, "Subject")
var sum = _.mapValues(group, function(n){
var enroll = _.pluck(n, "N.ENROLL")
return _.sum(enroll)
})
var max = _.max(sum)
var result = _.pick(sum, function(x){
return x == max
})
return result
{
"MATH": 8725
}
MATH is the subject most in demand with 8725 enrollments.
Which course has the highest enrollment? Andrew
var grps = _.groupBy(data, 'CourseTitle')
var ret1 = _.mapValues(grps, function(d){
var enrollNumbers = _.pluck(d, 'N.ENROLL')
return _.sum(enrollNumbers)
})
var max = _.max(ret1)
var bigClass = _.pick(ret1, function(d){
return d == max
})
return bigClass
| First-Year Writing and Rhetoric |
3187 |