From 5badfdebe932ad228ef574e2a01e373224d58f98 Mon Sep 17 00:00:00 2001 From: Wade Fagen <waf@illinois.edu> Date: Tue, 21 Feb 2017 09:38:02 -0600 Subject: [PATCH] demo_genderDiversityVis2 --- demo_genderDiversityVis2/genderDiversity.csv | 108 ++++++++++++++++ demo_genderDiversityVis2/project.json | 5 + demo_genderDiversityVis2/py/compute.py | 4 + .../res/genderDiversity copy.csv | 108 ++++++++++++++++ .../res/genderDiversity.csv | 1 + demo_genderDiversityVis2/web/index.html | 9 ++ demo_genderDiversityVis2/web/vis.js | 120 ++++++++++++++++++ 7 files changed, 355 insertions(+) create mode 100644 demo_genderDiversityVis2/genderDiversity.csv create mode 100644 demo_genderDiversityVis2/project.json create mode 100644 demo_genderDiversityVis2/py/compute.py create mode 100644 demo_genderDiversityVis2/res/genderDiversity copy.csv create mode 100644 demo_genderDiversityVis2/res/genderDiversity.csv create mode 100644 demo_genderDiversityVis2/web/index.html create mode 100644 demo_genderDiversityVis2/web/vis.js diff --git a/demo_genderDiversityVis2/genderDiversity.csv b/demo_genderDiversityVis2/genderDiversity.csv new file mode 100644 index 0000000..26c08e8 --- /dev/null +++ b/demo_genderDiversityVis2/genderDiversity.csv @@ -0,0 +1,108 @@ +College,Major Name,Total_2005,Male_2005,Female_2005,Total_2015,Male_2015,Female_2015,%Female_2005,%Female_2015 +KL,Agr & Consumer Economics,83.0,49.0,34.0,670.0,445.0,225.0,0.40963855421686746,0.3358208955223881 +KL,Animal Sciences,598.0,163.0,435.0,620.0,123.0,497.0,0.7274247491638796,0.8016129032258065 +KL,Crop Sciences,149.0,97.0,51.0,264.0,152.0,112.0,0.3422818791946309,0.42424242424242425 +KL,Food Science & Human Nutrition,440.0,109.0,331.0,493.0,119.0,374.0,0.7522727272727273,0.7586206896551724 +KL,Horticulture,72.0,48.0,24.0,24.0,6.0,18.0,0.3333333333333333,0.75 +KL,Human & Community Development,31.0,6.0,25.0,32.0,5.0,27.0,0.8064516129032258,0.84375 +KL,Human Development & Family St,216.0,13.0,202.0,198.0,24.0,174.0,0.9351851851851852,0.8787878787878788 +KL,Natural Res & Env Sciences,94.0,48.0,46.0,83.0,46.0,37.0,0.48936170212765956,0.4457831325301205 +KL,Natural Resrcs & Environ Sci,196.0,122.0,74.0,235.0,124.0,111.0,0.37755102040816324,0.4723404255319149 +KL,Nutritional Sciences,53.0,10.0,43.0,45.0,13.0,32.0,0.8113207547169812,0.7111111111111111 +KL,Technical Systems Management,92.0,86.0,6.0,205.0,181.0,24.0,0.06521739130434782,0.11707317073170732 +KM,Accountancy,1261.0,687.0,572.0,1422.0,687.0,735.0,0.4536082474226804,0.5168776371308017 +KM,Business Administration,952.0,490.0,462.0,89.0,38.0,51.0,0.4852941176470588,0.5730337078651685 +KM,Business Administration (MBA),238.0,171.0,67.0,288.0,203.0,85.0,0.2815126050420168,0.2951388888888889 +KM,Curric Unassigned,363.0,220.0,142.0,1026.0,564.0,462.0,0.39118457300275483,0.4502923976608187 +KM,Finance,896.0,622.0,271.0,705.0,455.0,250.0,0.30245535714285715,0.3546099290780142 +KM,Nondegree,34.0,18.0,16.0,78.0,45.0,33.0,0.47058823529411764,0.4230769230769231 +KN,Early Childhood Education,60.0,2.0,58.0,62.0,2.0,60.0,0.9666666666666667,0.967741935483871 +KN,Ed Organization and Leadership,127.0,47.0,80.0,80.0,24.0,56.0,0.6299212598425197,0.7 +KN,Educational Policy Studies,135.0,41.0,94.0,126.0,48.0,78.0,0.6962962962962963,0.6190476190476191 +KN,Educational Psychology,124.0,34.0,90.0,51.0,15.0,36.0,0.7258064516129032,0.7058823529411765 +KN,Elementary Education,408.0,36.0,372.0,378.0,25.0,353.0,0.9117647058823529,0.9338624338624338 +KN,Special Education,157.0,15.0,142.0,172.0,17.0,155.0,0.9044585987261147,0.9011627906976745 +KP,Aerospace Engineering,381.0,326.0,55.0,657.0,588.0,69.0,0.14435695538057744,0.1050228310502283 +KP,Bioengineering,60.0,40.0,20.0,318.0,167.0,151.0,0.3333333333333333,0.4748427672955975 +KP,Civil Engineering,795.0,641.0,154.0,1319.0,976.0,343.0,0.19371069182389938,0.26004548900682334 +KP,Computer Engineering,563.0,520.0,42.0,1062.0,952.0,109.0,0.07460035523978685,0.10263653483992467 +KP,Computer Science,1064.0,943.0,119.0,1640.0,1310.0,330.0,0.1118421052631579,0.20121951219512196 +KP,Electrical Engineering,1406.0,1223.0,183.0,1146.0,1002.0,144.0,0.1301564722617354,0.1256544502617801 +KP,Engineering Mechanics,78.0,63.0,15.0,112.0,101.0,11.0,0.19230769230769232,0.09821428571428571 +KP,Engineering Physics,101.0,87.0,14.0,248.0,218.0,30.0,0.13861386138613863,0.12096774193548387 +KP,Environ Engr in Civil Engr,61.0,33.0,28.0,100.0,46.0,54.0,0.45901639344262296,0.54 +KP,General Engineering,624.0,509.0,115.0,230.0,172.0,58.0,0.1842948717948718,0.25217391304347825 +KP,Industrial Engineering,81.0,54.0,27.0,337.0,247.0,90.0,0.3333333333333333,0.26706231454005935 +KP,Materials Science & Engr,383.0,288.0,95.0,586.0,418.0,168.0,0.24804177545691905,0.28668941979522183 +KP,Mechanical Engineering,1055.0,931.0,121.0,1251.0,1069.0,182.0,0.11469194312796209,0.14548361310951238 +KP,Nondegree,83.0,65.0,18.0,218.0,172.0,46.0,0.21686746987951808,0.21100917431192662 +KP,Physics,296.0,258.0,38.0,261.0,203.0,58.0,0.12837837837837837,0.2222222222222222 +KP,Systems & Entrepreneurial Engr,27.0,24.0,3.0,28.0,21.0,7.0,0.1111111111111111,0.25 +KP,Theoretical & Applied Mechans,67.0,58.0,9.0,47.0,39.0,8.0,0.13432835820895522,0.1702127659574468 +KR,Architectural Studies,534.0,308.0,226.0,402.0,220.0,182.0,0.4232209737827715,0.4527363184079602 +KR,Architecture,203.0,114.0,88.0,172.0,105.0,67.0,0.43349753694581283,0.38953488372093026 +KR,Art Education,106.0,17.0,89.0,42.0,9.0,33.0,0.839622641509434,0.7857142857142857 +KR,Art History,31.0,3.0,28.0,21.0,1.0,20.0,0.9032258064516129,0.9523809523809523 +KR,Art and Design,48.0,25.0,23.0,42.0,13.0,29.0,0.4791666666666667,0.6904761904761905 +KR,Dance,66.0,8.0,58.0,70.0,13.0,57.0,0.8787878787878788,0.8142857142857143 +KR,Graphic Design,75.0,21.0,54.0,94.0,19.0,75.0,0.72,0.7978723404255319 +KR,Industrial Design,98.0,47.0,51.0,132.0,53.0,79.0,0.5204081632653061,0.5984848484848485 +KR,Instrumental Music,122.0,52.0,70.0,76.0,33.0,43.0,0.5737704918032787,0.5657894736842105 +KR,Landscape Architecture,158.0,93.0,65.0,127.0,41.0,86.0,0.41139240506329117,0.6771653543307087 +KR,Music,277.0,123.0,154.0,341.0,177.0,164.0,0.555956678700361,0.4809384164222874 +KR,Music Education,227.0,101.0,126.0,180.0,74.0,106.0,0.5550660792951542,0.5888888888888889 +KR,Nondegree,29.0,16.0,13.0,30.0,15.0,15.0,0.4482758620689655,0.5 +KR,Theatre,199.0,94.0,105.0,160.0,72.0,88.0,0.5276381909547738,0.55 +KR,Urban Planning,191.0,98.0,93.0,142.0,62.0,80.0,0.4869109947643979,0.5633802816901409 +KT,Advertising,263.0,67.0,196.0,589.0,186.0,403.0,0.7452471482889734,0.6842105263157895 +KT,Broadcast Journalism,79.0,30.0,49.0,100.0,35.0,65.0,0.620253164556962,0.65 +KT,Journalism,31.0,11.0,20.0,141.0,53.0,88.0,0.6451612903225806,0.624113475177305 +KT,News-Editorial,125.0,48.0,77.0,77.0,24.0,53.0,0.616,0.6883116883116883 +KU,Law,668.0,397.0,270.0,580.0,332.0,248.0,0.4041916167664671,0.42758620689655175 +KV,Actuarial Science,249.0,167.0,82.0,389.0,224.0,164.0,0.3293172690763052,0.42159383033419023 +KV,Anthropology,207.0,72.0,135.0,146.0,43.0,103.0,0.6521739130434783,0.7054794520547946 +KV,Applied Mathematics,35.0,15.0,20.0,36.0,20.0,16.0,0.5714285714285714,0.4444444444444444 +KV,Astronomy,72.0,43.0,29.0,82.0,47.0,35.0,0.4027777777777778,0.4268292682926829 +KV,Atmospheric Sciences,37.0,26.0,11.0,111.0,65.0,46.0,0.2972972972972973,0.4144144144144144 +KV,Biochemistry,377.0,202.0,174.0,234.0,127.0,107.0,0.46153846153846156,0.45726495726495725 +KV,Biology,1069.0,495.0,573.0,730.0,302.0,428.0,0.5360149672591207,0.5863013698630137 +KV,Biophysics & Computnl Biology,68.0,47.0,21.0,46.0,37.0,9.0,0.3088235294117647,0.1956521739130435 +KV,Chemical Engineering,394.0,255.0,138.0,768.0,549.0,219.0,0.350253807106599,0.28515625 +KV,Chemistry,760.0,449.0,311.0,881.0,527.0,354.0,0.40921052631578947,0.4018161180476731 +KV,Comparative Literature,64.0,15.0,49.0,22.0,6.0,16.0,0.765625,0.7272727272727273 +KV,E Asian Languages & Cultures,67.0,35.0,32.0,70.0,22.0,48.0,0.47761194029850745,0.6857142857142857 +KV,Economics,861.0,652.0,209.0,1141.0,804.0,337.0,0.24274099883855982,0.2953549517966696 +KV,English,1058.0,333.0,724.0,439.0,135.0,304.0,0.6843100189035917,0.6924829157175398 +KV,Entomology,33.0,16.0,17.0,42.0,23.0,19.0,0.5151515151515151,0.4523809523809524 +KV,French,102.0,29.0,73.0,42.0,14.0,28.0,0.7156862745098039,0.6666666666666666 +KV,General Curriculum,3775.0,1700.0,2070.0,155.0,102.0,53.0,0.5483443708609271,0.3419354838709677 +KV,Geography,82.0,57.0,25.0,39.0,23.0,16.0,0.3048780487804878,0.41025641025641024 +KV,Geology,93.0,59.0,34.0,112.0,85.0,27.0,0.3655913978494624,0.24107142857142858 +KV,History,693.0,417.0,275.0,301.0,173.0,128.0,0.3968253968253968,0.42524916943521596 +KV,Integrative Biology,251.0,113.0,138.0,402.0,153.0,249.0,0.549800796812749,0.6194029850746269 +KV,Linguistics,103.0,42.0,61.0,114.0,38.0,76.0,0.5922330097087378,0.6666666666666666 +KV,Math & Computer Science,128.0,117.0,10.0,263.0,216.0,47.0,0.078125,0.17870722433460076 +KV,Mathematics,613.0,394.0,219.0,759.0,465.0,294.0,0.3572593800978793,0.38735177865612647 +KV,Microbiology,86.0,37.0,49.0,55.0,22.0,33.0,0.5697674418604651,0.6 +KV,Molecular & Integrative Physi,37.0,21.0,16.0,25.0,12.0,13.0,0.43243243243243246,0.52 +KV,Molecular and Cellular Biology,794.0,324.0,469.0,1041.0,517.0,524.0,0.5906801007556675,0.5033621517771374 +KV,Neuroscience,59.0,26.0,33.0,67.0,32.0,35.0,0.559322033898305,0.5223880597014925 +KV,Nondegree,130.0,68.0,60.0,213.0,98.0,115.0,0.46153846153846156,0.539906103286385 +KV,Philosophy,137.0,105.0,32.0,79.0,58.0,21.0,0.23357664233576642,0.26582278481012656 +KV,Physics,187.0,145.0,42.0,386.0,332.0,54.0,0.22459893048128343,0.13989637305699482 +KV,Political Science,1064.0,642.0,419.0,628.0,370.0,258.0,0.39379699248120303,0.410828025477707 +KV,Psychology,1376.0,381.0,995.0,1480.0,436.0,1044.0,0.7231104651162791,0.7054054054054054 +KV,Sociology,472.0,156.0,316.0,241.0,107.0,134.0,0.6694915254237288,0.5560165975103735 +KV,Spanish,318.0,97.0,221.0,121.0,27.0,94.0,0.6949685534591195,0.7768595041322314 +KV,Statistics,77.0,44.0,33.0,336.0,193.0,143.0,0.42857142857142855,0.4255952380952381 +KV,Teaching of English Sec Lang,50.0,12.0,38.0,39.0,12.0,27.0,0.76,0.6923076923076923 +KY,Community Health,447.0,102.0,345.0,615.0,147.0,468.0,0.7718120805369127,0.7609756097560976 +KY,Kinesiology,658.0,261.0,397.0,621.0,265.0,356.0,0.6033434650455927,0.573268921095008 +KY,"Recreation, Sport, and Tourism",36.0,22.0,14.0,317.0,211.0,106.0,0.3888888888888889,0.334384858044164 +KY,Speech & Hearing Science,298.0,13.0,285.0,350.0,16.0,334.0,0.9563758389261745,0.9542857142857143 +LC,VMS-Veterinary Clinical Medcne,27.0,12.0,15.0,38.0,8.0,30.0,0.5555555555555556,0.7894736842105263 +LC,Veterinary Medicine,404.0,92.0,312.0,491.0,70.0,420.0,0.7722772277227723,0.8553971486761711 +LG,Human Res & Industrial Rels,141.0,51.0,90.0,186.0,58.0,128.0,0.6382978723404256,0.6881720430107527 +LL,Social Work,289.0,19.0,270.0,468.0,56.0,412.0,0.9342560553633218,0.8803418803418803 +LN,Nondegree-CE,86.0,29.0,57.0,52.0,16.0,36.0,0.6627906976744186,0.6923076923076923 +LP,Library & Information Science,247.0,68.0,179.0,268.0,73.0,195.0,0.7246963562753036,0.7276119402985075 diff --git a/demo_genderDiversityVis2/project.json b/demo_genderDiversityVis2/project.json new file mode 100644 index 0000000..cf797fd --- /dev/null +++ b/demo_genderDiversityVis2/project.json @@ -0,0 +1,5 @@ +{ + "title": "Gender Diversity Visualization 2", + "index": 20170221, + "type": "Demo" +} diff --git a/demo_genderDiversityVis2/py/compute.py b/demo_genderDiversityVis2/py/compute.py new file mode 100644 index 0000000..3a20702 --- /dev/null +++ b/demo_genderDiversityVis2/py/compute.py @@ -0,0 +1,4 @@ +import csv +import json + +# There's no need for any Python here. diff --git a/demo_genderDiversityVis2/res/genderDiversity copy.csv b/demo_genderDiversityVis2/res/genderDiversity copy.csv new file mode 100644 index 0000000..26c08e8 --- /dev/null +++ b/demo_genderDiversityVis2/res/genderDiversity copy.csv @@ -0,0 +1,108 @@ +College,Major Name,Total_2005,Male_2005,Female_2005,Total_2015,Male_2015,Female_2015,%Female_2005,%Female_2015 +KL,Agr & Consumer Economics,83.0,49.0,34.0,670.0,445.0,225.0,0.40963855421686746,0.3358208955223881 +KL,Animal Sciences,598.0,163.0,435.0,620.0,123.0,497.0,0.7274247491638796,0.8016129032258065 +KL,Crop Sciences,149.0,97.0,51.0,264.0,152.0,112.0,0.3422818791946309,0.42424242424242425 +KL,Food Science & Human Nutrition,440.0,109.0,331.0,493.0,119.0,374.0,0.7522727272727273,0.7586206896551724 +KL,Horticulture,72.0,48.0,24.0,24.0,6.0,18.0,0.3333333333333333,0.75 +KL,Human & Community Development,31.0,6.0,25.0,32.0,5.0,27.0,0.8064516129032258,0.84375 +KL,Human Development & Family St,216.0,13.0,202.0,198.0,24.0,174.0,0.9351851851851852,0.8787878787878788 +KL,Natural Res & Env Sciences,94.0,48.0,46.0,83.0,46.0,37.0,0.48936170212765956,0.4457831325301205 +KL,Natural Resrcs & Environ Sci,196.0,122.0,74.0,235.0,124.0,111.0,0.37755102040816324,0.4723404255319149 +KL,Nutritional Sciences,53.0,10.0,43.0,45.0,13.0,32.0,0.8113207547169812,0.7111111111111111 +KL,Technical Systems Management,92.0,86.0,6.0,205.0,181.0,24.0,0.06521739130434782,0.11707317073170732 +KM,Accountancy,1261.0,687.0,572.0,1422.0,687.0,735.0,0.4536082474226804,0.5168776371308017 +KM,Business Administration,952.0,490.0,462.0,89.0,38.0,51.0,0.4852941176470588,0.5730337078651685 +KM,Business Administration (MBA),238.0,171.0,67.0,288.0,203.0,85.0,0.2815126050420168,0.2951388888888889 +KM,Curric Unassigned,363.0,220.0,142.0,1026.0,564.0,462.0,0.39118457300275483,0.4502923976608187 +KM,Finance,896.0,622.0,271.0,705.0,455.0,250.0,0.30245535714285715,0.3546099290780142 +KM,Nondegree,34.0,18.0,16.0,78.0,45.0,33.0,0.47058823529411764,0.4230769230769231 +KN,Early Childhood Education,60.0,2.0,58.0,62.0,2.0,60.0,0.9666666666666667,0.967741935483871 +KN,Ed Organization and Leadership,127.0,47.0,80.0,80.0,24.0,56.0,0.6299212598425197,0.7 +KN,Educational Policy Studies,135.0,41.0,94.0,126.0,48.0,78.0,0.6962962962962963,0.6190476190476191 +KN,Educational Psychology,124.0,34.0,90.0,51.0,15.0,36.0,0.7258064516129032,0.7058823529411765 +KN,Elementary Education,408.0,36.0,372.0,378.0,25.0,353.0,0.9117647058823529,0.9338624338624338 +KN,Special Education,157.0,15.0,142.0,172.0,17.0,155.0,0.9044585987261147,0.9011627906976745 +KP,Aerospace Engineering,381.0,326.0,55.0,657.0,588.0,69.0,0.14435695538057744,0.1050228310502283 +KP,Bioengineering,60.0,40.0,20.0,318.0,167.0,151.0,0.3333333333333333,0.4748427672955975 +KP,Civil Engineering,795.0,641.0,154.0,1319.0,976.0,343.0,0.19371069182389938,0.26004548900682334 +KP,Computer Engineering,563.0,520.0,42.0,1062.0,952.0,109.0,0.07460035523978685,0.10263653483992467 +KP,Computer Science,1064.0,943.0,119.0,1640.0,1310.0,330.0,0.1118421052631579,0.20121951219512196 +KP,Electrical Engineering,1406.0,1223.0,183.0,1146.0,1002.0,144.0,0.1301564722617354,0.1256544502617801 +KP,Engineering Mechanics,78.0,63.0,15.0,112.0,101.0,11.0,0.19230769230769232,0.09821428571428571 +KP,Engineering Physics,101.0,87.0,14.0,248.0,218.0,30.0,0.13861386138613863,0.12096774193548387 +KP,Environ Engr in Civil Engr,61.0,33.0,28.0,100.0,46.0,54.0,0.45901639344262296,0.54 +KP,General Engineering,624.0,509.0,115.0,230.0,172.0,58.0,0.1842948717948718,0.25217391304347825 +KP,Industrial Engineering,81.0,54.0,27.0,337.0,247.0,90.0,0.3333333333333333,0.26706231454005935 +KP,Materials Science & Engr,383.0,288.0,95.0,586.0,418.0,168.0,0.24804177545691905,0.28668941979522183 +KP,Mechanical Engineering,1055.0,931.0,121.0,1251.0,1069.0,182.0,0.11469194312796209,0.14548361310951238 +KP,Nondegree,83.0,65.0,18.0,218.0,172.0,46.0,0.21686746987951808,0.21100917431192662 +KP,Physics,296.0,258.0,38.0,261.0,203.0,58.0,0.12837837837837837,0.2222222222222222 +KP,Systems & Entrepreneurial Engr,27.0,24.0,3.0,28.0,21.0,7.0,0.1111111111111111,0.25 +KP,Theoretical & Applied Mechans,67.0,58.0,9.0,47.0,39.0,8.0,0.13432835820895522,0.1702127659574468 +KR,Architectural Studies,534.0,308.0,226.0,402.0,220.0,182.0,0.4232209737827715,0.4527363184079602 +KR,Architecture,203.0,114.0,88.0,172.0,105.0,67.0,0.43349753694581283,0.38953488372093026 +KR,Art Education,106.0,17.0,89.0,42.0,9.0,33.0,0.839622641509434,0.7857142857142857 +KR,Art History,31.0,3.0,28.0,21.0,1.0,20.0,0.9032258064516129,0.9523809523809523 +KR,Art and Design,48.0,25.0,23.0,42.0,13.0,29.0,0.4791666666666667,0.6904761904761905 +KR,Dance,66.0,8.0,58.0,70.0,13.0,57.0,0.8787878787878788,0.8142857142857143 +KR,Graphic Design,75.0,21.0,54.0,94.0,19.0,75.0,0.72,0.7978723404255319 +KR,Industrial Design,98.0,47.0,51.0,132.0,53.0,79.0,0.5204081632653061,0.5984848484848485 +KR,Instrumental Music,122.0,52.0,70.0,76.0,33.0,43.0,0.5737704918032787,0.5657894736842105 +KR,Landscape Architecture,158.0,93.0,65.0,127.0,41.0,86.0,0.41139240506329117,0.6771653543307087 +KR,Music,277.0,123.0,154.0,341.0,177.0,164.0,0.555956678700361,0.4809384164222874 +KR,Music Education,227.0,101.0,126.0,180.0,74.0,106.0,0.5550660792951542,0.5888888888888889 +KR,Nondegree,29.0,16.0,13.0,30.0,15.0,15.0,0.4482758620689655,0.5 +KR,Theatre,199.0,94.0,105.0,160.0,72.0,88.0,0.5276381909547738,0.55 +KR,Urban Planning,191.0,98.0,93.0,142.0,62.0,80.0,0.4869109947643979,0.5633802816901409 +KT,Advertising,263.0,67.0,196.0,589.0,186.0,403.0,0.7452471482889734,0.6842105263157895 +KT,Broadcast Journalism,79.0,30.0,49.0,100.0,35.0,65.0,0.620253164556962,0.65 +KT,Journalism,31.0,11.0,20.0,141.0,53.0,88.0,0.6451612903225806,0.624113475177305 +KT,News-Editorial,125.0,48.0,77.0,77.0,24.0,53.0,0.616,0.6883116883116883 +KU,Law,668.0,397.0,270.0,580.0,332.0,248.0,0.4041916167664671,0.42758620689655175 +KV,Actuarial Science,249.0,167.0,82.0,389.0,224.0,164.0,0.3293172690763052,0.42159383033419023 +KV,Anthropology,207.0,72.0,135.0,146.0,43.0,103.0,0.6521739130434783,0.7054794520547946 +KV,Applied Mathematics,35.0,15.0,20.0,36.0,20.0,16.0,0.5714285714285714,0.4444444444444444 +KV,Astronomy,72.0,43.0,29.0,82.0,47.0,35.0,0.4027777777777778,0.4268292682926829 +KV,Atmospheric Sciences,37.0,26.0,11.0,111.0,65.0,46.0,0.2972972972972973,0.4144144144144144 +KV,Biochemistry,377.0,202.0,174.0,234.0,127.0,107.0,0.46153846153846156,0.45726495726495725 +KV,Biology,1069.0,495.0,573.0,730.0,302.0,428.0,0.5360149672591207,0.5863013698630137 +KV,Biophysics & Computnl Biology,68.0,47.0,21.0,46.0,37.0,9.0,0.3088235294117647,0.1956521739130435 +KV,Chemical Engineering,394.0,255.0,138.0,768.0,549.0,219.0,0.350253807106599,0.28515625 +KV,Chemistry,760.0,449.0,311.0,881.0,527.0,354.0,0.40921052631578947,0.4018161180476731 +KV,Comparative Literature,64.0,15.0,49.0,22.0,6.0,16.0,0.765625,0.7272727272727273 +KV,E Asian Languages & Cultures,67.0,35.0,32.0,70.0,22.0,48.0,0.47761194029850745,0.6857142857142857 +KV,Economics,861.0,652.0,209.0,1141.0,804.0,337.0,0.24274099883855982,0.2953549517966696 +KV,English,1058.0,333.0,724.0,439.0,135.0,304.0,0.6843100189035917,0.6924829157175398 +KV,Entomology,33.0,16.0,17.0,42.0,23.0,19.0,0.5151515151515151,0.4523809523809524 +KV,French,102.0,29.0,73.0,42.0,14.0,28.0,0.7156862745098039,0.6666666666666666 +KV,General Curriculum,3775.0,1700.0,2070.0,155.0,102.0,53.0,0.5483443708609271,0.3419354838709677 +KV,Geography,82.0,57.0,25.0,39.0,23.0,16.0,0.3048780487804878,0.41025641025641024 +KV,Geology,93.0,59.0,34.0,112.0,85.0,27.0,0.3655913978494624,0.24107142857142858 +KV,History,693.0,417.0,275.0,301.0,173.0,128.0,0.3968253968253968,0.42524916943521596 +KV,Integrative Biology,251.0,113.0,138.0,402.0,153.0,249.0,0.549800796812749,0.6194029850746269 +KV,Linguistics,103.0,42.0,61.0,114.0,38.0,76.0,0.5922330097087378,0.6666666666666666 +KV,Math & Computer Science,128.0,117.0,10.0,263.0,216.0,47.0,0.078125,0.17870722433460076 +KV,Mathematics,613.0,394.0,219.0,759.0,465.0,294.0,0.3572593800978793,0.38735177865612647 +KV,Microbiology,86.0,37.0,49.0,55.0,22.0,33.0,0.5697674418604651,0.6 +KV,Molecular & Integrative Physi,37.0,21.0,16.0,25.0,12.0,13.0,0.43243243243243246,0.52 +KV,Molecular and Cellular Biology,794.0,324.0,469.0,1041.0,517.0,524.0,0.5906801007556675,0.5033621517771374 +KV,Neuroscience,59.0,26.0,33.0,67.0,32.0,35.0,0.559322033898305,0.5223880597014925 +KV,Nondegree,130.0,68.0,60.0,213.0,98.0,115.0,0.46153846153846156,0.539906103286385 +KV,Philosophy,137.0,105.0,32.0,79.0,58.0,21.0,0.23357664233576642,0.26582278481012656 +KV,Physics,187.0,145.0,42.0,386.0,332.0,54.0,0.22459893048128343,0.13989637305699482 +KV,Political Science,1064.0,642.0,419.0,628.0,370.0,258.0,0.39379699248120303,0.410828025477707 +KV,Psychology,1376.0,381.0,995.0,1480.0,436.0,1044.0,0.7231104651162791,0.7054054054054054 +KV,Sociology,472.0,156.0,316.0,241.0,107.0,134.0,0.6694915254237288,0.5560165975103735 +KV,Spanish,318.0,97.0,221.0,121.0,27.0,94.0,0.6949685534591195,0.7768595041322314 +KV,Statistics,77.0,44.0,33.0,336.0,193.0,143.0,0.42857142857142855,0.4255952380952381 +KV,Teaching of English Sec Lang,50.0,12.0,38.0,39.0,12.0,27.0,0.76,0.6923076923076923 +KY,Community Health,447.0,102.0,345.0,615.0,147.0,468.0,0.7718120805369127,0.7609756097560976 +KY,Kinesiology,658.0,261.0,397.0,621.0,265.0,356.0,0.6033434650455927,0.573268921095008 +KY,"Recreation, Sport, and Tourism",36.0,22.0,14.0,317.0,211.0,106.0,0.3888888888888889,0.334384858044164 +KY,Speech & Hearing Science,298.0,13.0,285.0,350.0,16.0,334.0,0.9563758389261745,0.9542857142857143 +LC,VMS-Veterinary Clinical Medcne,27.0,12.0,15.0,38.0,8.0,30.0,0.5555555555555556,0.7894736842105263 +LC,Veterinary Medicine,404.0,92.0,312.0,491.0,70.0,420.0,0.7722772277227723,0.8553971486761711 +LG,Human Res & Industrial Rels,141.0,51.0,90.0,186.0,58.0,128.0,0.6382978723404256,0.6881720430107527 +LL,Social Work,289.0,19.0,270.0,468.0,56.0,412.0,0.9342560553633218,0.8803418803418803 +LN,Nondegree-CE,86.0,29.0,57.0,52.0,16.0,36.0,0.6627906976744186,0.6923076923076923 +LP,Library & Information Science,247.0,68.0,179.0,268.0,73.0,195.0,0.7246963562753036,0.7276119402985075 diff --git a/demo_genderDiversityVis2/res/genderDiversity.csv b/demo_genderDiversityVis2/res/genderDiversity.csv new file mode 100644 index 0000000..32809c6 --- /dev/null +++ b/demo_genderDiversityVis2/res/genderDiversity.csv @@ -0,0 +1 @@ +College,Major Name,Total_2005,Male_2005,Female_2005,Total_2015,Male_2015,Female_2015,%Female_2005,%Female_2015 KL,Agr & Consumer Economics,83.0,49.0,34.0,670.0,445.0,225.0,0.40963855421686746,0.3358208955223881 KL,Animal Sciences,598.0,163.0,435.0,620.0,123.0,497.0,0.7274247491638796,0.8016129032258065 KL,Crop Sciences,149.0,97.0,51.0,264.0,152.0,112.0,0.3422818791946309,0.42424242424242425 KL,Food Science & Human Nutrition,440.0,109.0,331.0,493.0,119.0,374.0,0.7522727272727273,0.7586206896551724 KL,Horticulture,72.0,48.0,24.0,24.0,6.0,18.0,0.3333333333333333,0.75 KL,Human & Community Development,31.0,6.0,25.0,32.0,5.0,27.0,0.8064516129032258,0.84375 KL,Human Development & Family St,216.0,13.0,202.0,198.0,24.0,174.0,0.9351851851851852,0.8787878787878788 KL,Natural Res & Env Sciences,94.0,48.0,46.0,83.0,46.0,37.0,0.48936170212765956,0.4457831325301205 KL,Natural Resrcs & Environ Sci,196.0,122.0,74.0,235.0,124.0,111.0,0.37755102040816324,0.4723404255319149 KL,Nutritional Sciences,53.0,10.0,43.0,45.0,13.0,32.0,0.8113207547169812,0.7111111111111111 KL,Technical Systems Management,92.0,86.0,6.0,205.0,181.0,24.0,0.06521739130434782,0.11707317073170732 KM,Accountancy,1261.0,687.0,572.0,1422.0,687.0,735.0,0.4536082474226804,0.5168776371308017 KM,Business Administration,952.0,490.0,462.0,89.0,38.0,51.0,0.4852941176470588,0.5730337078651685 KM,Business Administration (MBA),238.0,171.0,67.0,288.0,203.0,85.0,0.2815126050420168,0.2951388888888889 KM,Curric Unassigned,363.0,220.0,142.0,1026.0,564.0,462.0,0.39118457300275483,0.4502923976608187 KM,Finance,896.0,622.0,271.0,705.0,455.0,250.0,0.30245535714285715,0.3546099290780142 KM,Nondegree,34.0,18.0,16.0,78.0,45.0,33.0,0.47058823529411764,0.4230769230769231 KN,Early Childhood Education,60.0,2.0,58.0,62.0,2.0,60.0,0.9666666666666667,0.967741935483871 KN,Ed Organization and Leadership,127.0,47.0,80.0,80.0,24.0,56.0,0.6299212598425197,0.7 KN,Educational Policy Studies,135.0,41.0,94.0,126.0,48.0,78.0,0.6962962962962963,0.6190476190476191 KN,Educational Psychology,124.0,34.0,90.0,51.0,15.0,36.0,0.7258064516129032,0.7058823529411765 KN,Elementary Education,408.0,36.0,372.0,378.0,25.0,353.0,0.9117647058823529,0.9338624338624338 KN,Special Education,157.0,15.0,142.0,172.0,17.0,155.0,0.9044585987261147,0.9011627906976745 KP,Aerospace Engineering,381.0,326.0,55.0,657.0,588.0,69.0,0.14435695538057744,0.1050228310502283 KP,Bioengineering,60.0,40.0,20.0,318.0,167.0,151.0,0.3333333333333333,0.4748427672955975 KP,Civil Engineering,795.0,641.0,154.0,1319.0,976.0,343.0,0.19371069182389938,0.26004548900682334 KP,Computer Engineering,563.0,520.0,42.0,1062.0,952.0,109.0,0.07460035523978685,0.10263653483992467 KP,Computer Science,1064.0,943.0,119.0,1640.0,1310.0,330.0,0.1118421052631579,0.20121951219512196 KP,Electrical Engineering,1406.0,1223.0,183.0,1146.0,1002.0,144.0,0.1301564722617354,0.1256544502617801 KP,Engineering Mechanics,78.0,63.0,15.0,112.0,101.0,11.0,0.19230769230769232,0.09821428571428571 KP,Engineering Physics,101.0,87.0,14.0,248.0,218.0,30.0,0.13861386138613863,0.12096774193548387 KP,Environ Engr in Civil Engr,61.0,33.0,28.0,100.0,46.0,54.0,0.45901639344262296,0.54 KP,General Engineering,624.0,509.0,115.0,230.0,172.0,58.0,0.1842948717948718,0.25217391304347825 KP,Industrial Engineering,81.0,54.0,27.0,337.0,247.0,90.0,0.3333333333333333,0.26706231454005935 KP,Materials Science & Engr,383.0,288.0,95.0,586.0,418.0,168.0,0.24804177545691905,0.28668941979522183 KP,Mechanical Engineering,1055.0,931.0,121.0,1251.0,1069.0,182.0,0.11469194312796209,0.14548361310951238 KP,Nondegree,83.0,65.0,18.0,218.0,172.0,46.0,0.21686746987951808,0.21100917431192662 KP,Physics,296.0,258.0,38.0,261.0,203.0,58.0,0.12837837837837837,0.2222222222222222 KP,Systems & Entrepreneurial Engr,27.0,24.0,3.0,28.0,21.0,7.0,0.1111111111111111,0.25 KP,Theoretical & Applied Mechans,67.0,58.0,9.0,47.0,39.0,8.0,0.13432835820895522,0.1702127659574468 KR,Architectural Studies,534.0,308.0,226.0,402.0,220.0,182.0,0.4232209737827715,0.4527363184079602 KR,Architecture,203.0,114.0,88.0,172.0,105.0,67.0,0.43349753694581283,0.38953488372093026 KR,Art Education,106.0,17.0,89.0,42.0,9.0,33.0,0.839622641509434,0.7857142857142857 KR,Art History,31.0,3.0,28.0,21.0,1.0,20.0,0.9032258064516129,0.9523809523809523 KR,Art and Design,48.0,25.0,23.0,42.0,13.0,29.0,0.4791666666666667,0.6904761904761905 KR,Dance,66.0,8.0,58.0,70.0,13.0,57.0,0.8787878787878788,0.8142857142857143 KR,Graphic Design,75.0,21.0,54.0,94.0,19.0,75.0,0.72,0.7978723404255319 KR,Industrial Design,98.0,47.0,51.0,132.0,53.0,79.0,0.5204081632653061,0.5984848484848485 KR,Instrumental Music,122.0,52.0,70.0,76.0,33.0,43.0,0.5737704918032787,0.5657894736842105 KR,Landscape Architecture,158.0,93.0,65.0,127.0,41.0,86.0,0.41139240506329117,0.6771653543307087 KR,Music,277.0,123.0,154.0,341.0,177.0,164.0,0.555956678700361,0.4809384164222874 KR,Music Education,227.0,101.0,126.0,180.0,74.0,106.0,0.5550660792951542,0.5888888888888889 KR,Nondegree,29.0,16.0,13.0,30.0,15.0,15.0,0.4482758620689655,0.5 KR,Theatre,199.0,94.0,105.0,160.0,72.0,88.0,0.5276381909547738,0.55 KR,Urban Planning,191.0,98.0,93.0,142.0,62.0,80.0,0.4869109947643979,0.5633802816901409 KT,Advertising,263.0,67.0,196.0,589.0,186.0,403.0,0.7452471482889734,0.6842105263157895 KT,Broadcast Journalism,79.0,30.0,49.0,100.0,35.0,65.0,0.620253164556962,0.65 KT,Journalism,31.0,11.0,20.0,141.0,53.0,88.0,0.6451612903225806,0.624113475177305 KT,News-Editorial,125.0,48.0,77.0,77.0,24.0,53.0,0.616,0.6883116883116883 KU,Law,668.0,397.0,270.0,580.0,332.0,248.0,0.4041916167664671,0.42758620689655175 KV,Actuarial Science,249.0,167.0,82.0,389.0,224.0,164.0,0.3293172690763052,0.42159383033419023 KV,Anthropology,207.0,72.0,135.0,146.0,43.0,103.0,0.6521739130434783,0.7054794520547946 KV,Applied Mathematics,35.0,15.0,20.0,36.0,20.0,16.0,0.5714285714285714,0.4444444444444444 KV,Astronomy,72.0,43.0,29.0,82.0,47.0,35.0,0.4027777777777778,0.4268292682926829 KV,Atmospheric Sciences,37.0,26.0,11.0,111.0,65.0,46.0,0.2972972972972973,0.4144144144144144 KV,Biochemistry,377.0,202.0,174.0,234.0,127.0,107.0,0.46153846153846156,0.45726495726495725 KV,Biology,1069.0,495.0,573.0,730.0,302.0,428.0,0.5360149672591207,0.5863013698630137 KV,Biophysics & Computnl Biology,68.0,47.0,21.0,46.0,37.0,9.0,0.3088235294117647,0.1956521739130435 KV,Chemical Engineering,394.0,255.0,138.0,768.0,549.0,219.0,0.350253807106599,0.28515625 KV,Chemistry,760.0,449.0,311.0,881.0,527.0,354.0,0.40921052631578947,0.4018161180476731 KV,Comparative Literature,64.0,15.0,49.0,22.0,6.0,16.0,0.765625,0.7272727272727273 KV,E Asian Languages & Cultures,67.0,35.0,32.0,70.0,22.0,48.0,0.47761194029850745,0.6857142857142857 KV,Economics,861.0,652.0,209.0,1141.0,804.0,337.0,0.24274099883855982,0.2953549517966696 KV,English,1058.0,333.0,724.0,439.0,135.0,304.0,0.6843100189035917,0.6924829157175398 KV,Entomology,33.0,16.0,17.0,42.0,23.0,19.0,0.5151515151515151,0.4523809523809524 KV,French,102.0,29.0,73.0,42.0,14.0,28.0,0.7156862745098039,0.6666666666666666 KV,General Curriculum,3775.0,1700.0,2070.0,155.0,102.0,53.0,0.5483443708609271,0.3419354838709677 KV,Geography,82.0,57.0,25.0,39.0,23.0,16.0,0.3048780487804878,0.41025641025641024 KV,Geology,93.0,59.0,34.0,112.0,85.0,27.0,0.3655913978494624,0.24107142857142858 KV,History,693.0,417.0,275.0,301.0,173.0,128.0,0.3968253968253968,0.42524916943521596 KV,Integrative Biology,251.0,113.0,138.0,402.0,153.0,249.0,0.549800796812749,0.6194029850746269 KV,Linguistics,103.0,42.0,61.0,114.0,38.0,76.0,0.5922330097087378,0.6666666666666666 KV,Math & Computer Science,128.0,117.0,10.0,263.0,216.0,47.0,0.078125,0.17870722433460076 KV,Mathematics,613.0,394.0,219.0,759.0,465.0,294.0,0.3572593800978793,0.38735177865612647 KV,Microbiology,86.0,37.0,49.0,55.0,22.0,33.0,0.5697674418604651,0.6 KV,Molecular & Integrative Physi,37.0,21.0,16.0,25.0,12.0,13.0,0.43243243243243246,0.52 KV,Molecular and Cellular Biology,794.0,324.0,469.0,1041.0,517.0,524.0,0.5906801007556675,0.5033621517771374 KV,Neuroscience,59.0,26.0,33.0,67.0,32.0,35.0,0.559322033898305,0.5223880597014925 KV,Nondegree,130.0,68.0,60.0,213.0,98.0,115.0,0.46153846153846156,0.539906103286385 KV,Philosophy,137.0,105.0,32.0,79.0,58.0,21.0,0.23357664233576642,0.26582278481012656 KV,Physics,187.0,145.0,42.0,386.0,332.0,54.0,0.22459893048128343,0.13989637305699482 KV,Political Science,1064.0,642.0,419.0,628.0,370.0,258.0,0.39379699248120303,0.410828025477707 KV,Psychology,1376.0,381.0,995.0,1480.0,436.0,1044.0,0.7231104651162791,0.7054054054054054 KV,Sociology,472.0,156.0,316.0,241.0,107.0,134.0,0.6694915254237288,0.5560165975103735 KV,Spanish,318.0,97.0,221.0,121.0,27.0,94.0,0.6949685534591195,0.7768595041322314 KV,Statistics,77.0,44.0,33.0,336.0,193.0,143.0,0.42857142857142855,0.4255952380952381 KV,Teaching of English Sec Lang,50.0,12.0,38.0,39.0,12.0,27.0,0.76,0.6923076923076923 KY,Community Health,447.0,102.0,345.0,615.0,147.0,468.0,0.7718120805369127,0.7609756097560976 KY,Kinesiology,658.0,261.0,397.0,621.0,265.0,356.0,0.6033434650455927,0.573268921095008 KY,"Recreation, Sport, and Tourism",36.0,22.0,14.0,317.0,211.0,106.0,0.3888888888888889,0.334384858044164 KY,Speech & Hearing Science,298.0,13.0,285.0,350.0,16.0,334.0,0.9563758389261745,0.9542857142857143 LC,VMS-Veterinary Clinical Medcne,27.0,12.0,15.0,38.0,8.0,30.0,0.5555555555555556,0.7894736842105263 LC,Veterinary Medicine,404.0,92.0,312.0,491.0,70.0,420.0,0.7722772277227723,0.8553971486761711 LG,Human Res & Industrial Rels,141.0,51.0,90.0,186.0,58.0,128.0,0.6382978723404256,0.6881720430107527 LL,Social Work,289.0,19.0,270.0,468.0,56.0,412.0,0.9342560553633218,0.8803418803418803 LN,Nondegree-CE,86.0,29.0,57.0,52.0,16.0,36.0,0.6627906976744186,0.6923076923076923 LP,Library & Information Science,247.0,68.0,179.0,268.0,73.0,195.0,0.7246963562753036,0.7276119402985075 \ No newline at end of file diff --git a/demo_genderDiversityVis2/web/index.html b/demo_genderDiversityVis2/web/index.html new file mode 100644 index 0000000..a8408b6 --- /dev/null +++ b/demo_genderDiversityVis2/web/index.html @@ -0,0 +1,9 @@ +{% extends "static/templates/projectBase.html" %} +{% block projectContent %} + +<h2>Gender Diversity at Illinois</h2> +<div id="chart"></div> + +<script src="web/vis.js"></script> + +{% endblock %} diff --git a/demo_genderDiversityVis2/web/vis.js b/demo_genderDiversityVis2/web/vis.js new file mode 100644 index 0000000..d7818c8 --- /dev/null +++ b/demo_genderDiversityVis2/web/vis.js @@ -0,0 +1,120 @@ +"use strict"; + +/* Boilerplate jQuery */ +$(function() { + d3.csv("res/genderDiversity.csv", function (data) { + visualize(data); + }); +}); + +/* Visualize the data in the visualize function */ +var visualize = function(data) { + console.log(data); + + // == BOILERPLATE == + var margin = { top: 50, right: 50, bottom: 50, left: 50 }, + width = 800 - margin.left - margin.right, + height = 400 - margin.top - margin.left; + + var svg = d3.select("#chart") + .append("svg") + .attr("width", width + margin.left + margin.right) + .attr("height", height + margin.top + margin.bottom) + .style("width", width + margin.left + margin.right) + .style("height", height + margin.top + margin.bottom) + .append("g") + .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); + + + // == Your code! :) == + var pctFemaleScale = d3.scaleLinear() + .domain( [0, 1] ) + .range( [0, height] ); + + var pctFemaleAxis = d3.axisLeft() + .scale(pctFemaleScale); + + svg.append("g") + .call(pctFemaleAxis); + + + var yearScale = d3.scalePoint() + .domain( [2005, 2015] ) + .range( [0, width] ); + + var yearAxis = d3.axisTop() + .scale(yearScale); + + svg.append("g") + .call(yearAxis); + + + var tip = d3.tip() + .attr("class", "d3-tip") + .html(function (d) { + return d["Major Name"]; + }); + + svg.call(tip); + + + + svg + .selectAll("s") + .data(data) + .enter() + .append("line") + .on("mouseover", tip.show) + .on("mouseout", tip.hide) + .attr("x1", function (d) { + return yearScale(2005); + }) + .attr("y1", function (d) { + console.log(d); + return pctFemaleScale( d["%Female_2005"] ); + }) + .attr("x2", function (d) { + return yearScale(2015); + }) + .attr("y2", function (d) { + return pctFemaleScale( d["%Female_2015"] ); + }) + .attr("stroke", "black") + .attr("stroke-width", 3); + + +/* + + svg.selectAll("lines") + .data(data) + .enter() + .append("line") + .on("mouseover", tip.show) + .on("mouseout", tip.hide) + .attr("x1", function (d) { + return yearScale(2005); + }) + .attr("y1", function (d) { + return pctFemaleScale( d["%Female_2005"] ); + }) + .attr("x2", function (d) { + return yearScale(2015); + }) + .attr("y2", function (d) { + return pctFemaleScale( d["%Female_2015"] ); + }) + .attr("stroke", "black") + .attr("stroke-width", 3) + + +*/ + + + + + + + + + +}; -- GitLab