Guided Project: Visualizing Earnings Based On College Majors We'll be working with a dataset on the job outcomes of students who graduated from college between 2010 and 2012. Using visualizations, we can start to explore questions from the dataset like:

Do students in more popular majors make more money? Using scatter plots How many majors are predominantly male? Predominantly female? Using histograms Which category of majors have the most students? Using bar plots

In [1]:
import pandas as pd 
import matplotlib.pyplot as plt 
%matplotlib inline

recent_grads = pd.read_csv("recent-grads.csv")
#recent_grads.iloc[0]
recent_grads
Out[1]:
Rank Major_code Major Total Men Women Major_category ShareWomen Sample_size Employed ... Part_time Full_time_year_round Unemployed Unemployment_rate Median P25th P75th College_jobs Non_college_jobs Low_wage_jobs
0 1 2419 PETROLEUM ENGINEERING 2339.0 2057.0 282.0 Engineering 0.120564 36 1976 ... 270 1207 37 0.018381 110000 95000 125000 1534 364 193
1 2 2416 MINING AND MINERAL ENGINEERING 756.0 679.0 77.0 Engineering 0.101852 7 640 ... 170 388 85 0.117241 75000 55000 90000 350 257 50
2 3 2415 METALLURGICAL ENGINEERING 856.0 725.0 131.0 Engineering 0.153037 3 648 ... 133 340 16 0.024096 73000 50000 105000 456 176 0
3 4 2417 NAVAL ARCHITECTURE AND MARINE ENGINEERING 1258.0 1123.0 135.0 Engineering 0.107313 16 758 ... 150 692 40 0.050125 70000 43000 80000 529 102 0
4 5 2405 CHEMICAL ENGINEERING 32260.0 21239.0 11021.0 Engineering 0.341631 289 25694 ... 5180 16697 1672 0.061098 65000 50000 75000 18314 4440 972
5 6 2418 NUCLEAR ENGINEERING 2573.0 2200.0 373.0 Engineering 0.144967 17 1857 ... 264 1449 400 0.177226 65000 50000 102000 1142 657 244
6 7 6202 ACTUARIAL SCIENCE 3777.0 2110.0 1667.0 Business 0.441356 51 2912 ... 296 2482 308 0.095652 62000 53000 72000 1768 314 259
7 8 5001 ASTRONOMY AND ASTROPHYSICS 1792.0 832.0 960.0 Physical Sciences 0.535714 10 1526 ... 553 827 33 0.021167 62000 31500 109000 972 500 220
8 9 2414 MECHANICAL ENGINEERING 91227.0 80320.0 10907.0 Engineering 0.119559 1029 76442 ... 13101 54639 4650 0.057342 60000 48000 70000 52844 16384 3253
9 10 2408 ELECTRICAL ENGINEERING 81527.0 65511.0 16016.0 Engineering 0.196450 631 61928 ... 12695 41413 3895 0.059174 60000 45000 72000 45829 10874 3170
10 11 2407 COMPUTER ENGINEERING 41542.0 33258.0 8284.0 Engineering 0.199413 399 32506 ... 5146 23621 2275 0.065409 60000 45000 75000 23694 5721 980
11 12 2401 AEROSPACE ENGINEERING 15058.0 12953.0 2105.0 Engineering 0.139793 147 11391 ... 2724 8790 794 0.065162 60000 42000 70000 8184 2425 372
12 13 2404 BIOMEDICAL ENGINEERING 14955.0 8407.0 6548.0 Engineering 0.437847 79 10047 ... 2694 5986 1019 0.092084 60000 36000 70000 6439 2471 789
13 14 5008 MATERIALS SCIENCE 4279.0 2949.0 1330.0 Engineering 0.310820 22 3307 ... 878 1967 78 0.023043 60000 39000 65000 2626 391 81
14 15 2409 ENGINEERING MECHANICS PHYSICS AND SCIENCE 4321.0 3526.0 795.0 Engineering 0.183985 30 3608 ... 811 2004 23 0.006334 58000 25000 74000 2439 947 263
15 16 2402 BIOLOGICAL ENGINEERING 8925.0 6062.0 2863.0 Engineering 0.320784 55 6170 ... 1983 3413 589 0.087143 57100 40000 76000 3603 1595 524
16 17 2412 INDUSTRIAL AND MANUFACTURING ENGINEERING 18968.0 12453.0 6515.0 Engineering 0.343473 183 15604 ... 2243 11326 699 0.042876 57000 37900 67000 8306 3235 640
17 18 2400 GENERAL ENGINEERING 61152.0 45683.0 15469.0 Engineering 0.252960 425 44931 ... 7199 33540 2859 0.059824 56000 36000 69000 26898 11734 3192
18 19 2403 ARCHITECTURAL ENGINEERING 2825.0 1835.0 990.0 Engineering 0.350442 26 2575 ... 343 1848 170 0.061931 54000 38000 65000 1665 649 137
19 20 3201 COURT REPORTING 1148.0 877.0 271.0 Law & Public Policy 0.236063 14 930 ... 223 808 11 0.011690 54000 50000 54000 402 528 144
20 21 2102 COMPUTER SCIENCE 128319.0 99743.0 28576.0 Computers & Mathematics 0.222695 1196 102087 ... 18726 70932 6884 0.063173 53000 39000 70000 68622 25667 5144
21 22 1104 FOOD SCIENCE NaN NaN NaN Agriculture & Natural Resources NaN 36 3149 ... 1121 1735 338 0.096931 53000 32000 70000 1183 1274 485
22 23 2502 ELECTRICAL ENGINEERING TECHNOLOGY 11565.0 8181.0 3384.0 Engineering 0.292607 97 8587 ... 1873 5681 824 0.087557 52000 35000 60000 5126 2686 696
23 24 2413 MATERIALS ENGINEERING AND MATERIALS SCIENCE 2993.0 2020.0 973.0 Engineering 0.325092 22 2449 ... 1040 1151 70 0.027789 52000 35000 62000 1911 305 70
24 25 6212 MANAGEMENT INFORMATION SYSTEMS AND STATISTICS 18713.0 13496.0 5217.0 Business 0.278790 278 16413 ... 2420 13017 1015 0.058240 51000 38000 60000 6342 5741 708
25 26 2406 CIVIL ENGINEERING 53153.0 41081.0 12072.0 Engineering 0.227118 565 43041 ... 10080 29196 3270 0.070610 50000 40000 60000 28526 9356 2899
26 27 5601 CONSTRUCTION SERVICES 18498.0 16820.0 1678.0 Industrial Arts & Consumer Services 0.090713 295 16318 ... 1751 12313 1042 0.060023 50000 36000 60000 3275 5351 703
27 28 6204 OPERATIONS LOGISTICS AND E-COMMERCE 11732.0 7921.0 3811.0 Business 0.324838 156 10027 ... 1183 7724 504 0.047859 50000 40000 60000 1466 3629 285
28 29 2499 MISCELLANEOUS ENGINEERING 9133.0 7398.0 1735.0 Engineering 0.189970 118 7428 ... 1662 5476 597 0.074393 50000 39000 65000 3445 2426 365
29 30 5402 PUBLIC POLICY 5978.0 2639.0 3339.0 Law & Public Policy 0.558548 55 4547 ... 1306 2776 670 0.128426 50000 35000 70000 1550 1871 340
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
143 144 1105 PLANT SCIENCE AND AGRONOMY 7416.0 4897.0 2519.0 Agriculture & Natural Resources 0.339671 110 6594 ... 1246 4522 314 0.045455 32000 22900 40000 2089 3545 1231
144 145 2308 SCIENCE AND COMPUTER TEACHER EDUCATION 6483.0 2049.0 4434.0 Education 0.683943 59 5362 ... 1227 3247 266 0.047264 32000 28000 39000 4214 1106 591
145 146 5200 PSYCHOLOGY 393735.0 86648.0 307087.0 Psychology & Social Work 0.779933 2584 307933 ... 115172 174438 28169 0.083811 31500 24000 41000 125148 141860 48207
146 147 6002 MUSIC 60633.0 29909.0 30724.0 Arts 0.506721 419 47662 ... 24943 21425 3918 0.075960 31000 22300 42000 13752 28786 9286
147 148 2306 PHYSICAL AND HEALTH EDUCATION TEACHING 28213.0 15670.0 12543.0 Education 0.444582 259 23794 ... 7230 13651 1920 0.074667 31000 24000 40000 12777 9328 2042
148 149 6006 ART HISTORY AND CRITICISM 21030.0 3240.0 17790.0 Humanities & Liberal Arts 0.845934 204 17579 ... 6140 9965 1128 0.060298 31000 23000 40000 5139 9738 3426
149 150 6000 FINE ARTS 74440.0 24786.0 49654.0 Arts 0.667034 623 59679 ... 23656 31877 5486 0.084186 30500 21000 41000 20792 32725 11880
150 151 2901 FAMILY AND CONSUMER SCIENCES 58001.0 5166.0 52835.0 Industrial Arts & Consumer Services 0.910933 518 46624 ... 15872 26906 3355 0.067128 30000 22900 40000 20985 20133 5248
151 152 5404 SOCIAL WORK 53552.0 5137.0 48415.0 Psychology & Social Work 0.904075 374 45038 ... 13481 27588 3329 0.068828 30000 25000 35000 27449 14416 4344
152 153 1103 ANIMAL SCIENCES 21573.0 5347.0 16226.0 Agriculture & Natural Resources 0.752144 255 17112 ... 5353 10824 917 0.050862 30000 22000 40000 5443 9571 2125
153 154 6003 VISUAL AND PERFORMING ARTS 16250.0 4133.0 12117.0 Arts 0.745662 132 12870 ... 6253 6322 1465 0.102197 30000 22000 40000 3849 7635 2840
154 155 2312 TEACHER EDUCATION: MULTIPLE LEVELS 14443.0 2734.0 11709.0 Education 0.810704 142 13076 ... 2214 8457 496 0.036546 30000 24000 37000 10766 1949 722
155 156 5299 MISCELLANEOUS PSYCHOLOGY 9628.0 1936.0 7692.0 Psychology & Social Work 0.798920 60 7653 ... 3221 3838 419 0.051908 30000 20800 40000 2960 3948 1650
156 157 5403 HUMAN SERVICES AND COMMUNITY ORGANIZATION 9374.0 885.0 8489.0 Psychology & Social Work 0.905590 89 8294 ... 2405 5061 326 0.037819 30000 24000 35000 2878 4595 724
157 158 3402 HUMANITIES 6652.0 2013.0 4639.0 Humanities & Liberal Arts 0.697384 49 5052 ... 2225 2661 372 0.068584 30000 20000 49000 1168 3354 1141
158 159 4901 THEOLOGY AND RELIGIOUS VOCATIONS 30207.0 18616.0 11591.0 Humanities & Liberal Arts 0.383719 310 24202 ... 8767 13944 1617 0.062628 29000 22000 38000 9927 12037 3304
159 160 6007 STUDIO ARTS 16977.0 4754.0 12223.0 Arts 0.719974 182 13908 ... 5673 7413 1368 0.089552 29000 19200 38300 3948 8707 3586
160 161 2201 COSMETOLOGY SERVICES AND CULINARY ARTS 10510.0 4364.0 6146.0 Industrial Arts & Consumer Services 0.584776 117 8650 ... 2064 5949 510 0.055677 29000 20000 36000 563 7384 3163
161 162 1199 MISCELLANEOUS AGRICULTURE 1488.0 404.0 1084.0 Agriculture & Natural Resources 0.728495 24 1290 ... 335 936 82 0.059767 29000 23000 42100 483 626 31
162 163 5502 ANTHROPOLOGY AND ARCHEOLOGY 38844.0 11376.0 27468.0 Humanities & Liberal Arts 0.707136 247 29633 ... 14515 13232 3395 0.102792 28000 20000 38000 9805 16693 6866
163 164 6102 COMMUNICATION DISORDERS SCIENCES AND SERVICES 38279.0 1225.0 37054.0 Health 0.967998 95 29763 ... 13862 14460 1487 0.047584 28000 20000 40000 19957 9404 5125
164 165 2307 EARLY CHILDHOOD EDUCATION 37589.0 1167.0 36422.0 Education 0.968954 342 32551 ... 7001 20748 1360 0.040105 28000 21000 35000 23515 7705 2868
165 166 2603 OTHER FOREIGN LANGUAGES 11204.0 3472.0 7732.0 Humanities & Liberal Arts 0.690111 56 7052 ... 3685 3214 846 0.107116 27500 22900 38000 2326 3703 1115
166 167 6001 DRAMA AND THEATER ARTS 43249.0 14440.0 28809.0 Arts 0.666119 357 36165 ... 15994 16891 3040 0.077541 27000 19200 35000 6994 25313 11068
167 168 3302 COMPOSITION AND RHETORIC 18953.0 7022.0 11931.0 Humanities & Liberal Arts 0.629505 151 15053 ... 6612 7832 1340 0.081742 27000 20000 35000 4855 8100 3466
168 169 3609 ZOOLOGY 8409.0 3050.0 5359.0 Biology & Life Science 0.637293 47 6259 ... 2190 3602 304 0.046320 26000 20000 39000 2771 2947 743
169 170 5201 EDUCATIONAL PSYCHOLOGY 2854.0 522.0 2332.0 Psychology & Social Work 0.817099 7 2125 ... 572 1211 148 0.065112 25000 24000 34000 1488 615 82
170 171 5202 CLINICAL PSYCHOLOGY 2838.0 568.0 2270.0 Psychology & Social Work 0.799859 13 2101 ... 648 1293 368 0.149048 25000 25000 40000 986 870 622
171 172 5203 COUNSELING PSYCHOLOGY 4626.0 931.0 3695.0 Psychology & Social Work 0.798746 21 3777 ... 965 2738 214 0.053621 23400 19200 26000 2403 1245 308
172 173 3501 LIBRARY SCIENCE 1098.0 134.0 964.0 Education 0.877960 2 742 ... 237 410 87 0.104946 22000 20000 22000 288 338 192

173 rows × 21 columns

In [2]:
recent_grads.describe()
recent_grads = recent_grads.dropna()
#drop rows containing missing values
recent_grads

#only one row contained missing values and was dropped.
Out[2]:
Rank Major_code Major Total Men Women Major_category ShareWomen Sample_size Employed ... Part_time Full_time_year_round Unemployed Unemployment_rate Median P25th P75th College_jobs Non_college_jobs Low_wage_jobs
0 1 2419 PETROLEUM ENGINEERING 2339.0 2057.0 282.0 Engineering 0.120564 36 1976 ... 270 1207 37 0.018381 110000 95000 125000 1534 364 193
1 2 2416 MINING AND MINERAL ENGINEERING 756.0 679.0 77.0 Engineering 0.101852 7 640 ... 170 388 85 0.117241 75000 55000 90000 350 257 50
2 3 2415 METALLURGICAL ENGINEERING 856.0 725.0 131.0 Engineering 0.153037 3 648 ... 133 340 16 0.024096 73000 50000 105000 456 176 0
3 4 2417 NAVAL ARCHITECTURE AND MARINE ENGINEERING 1258.0 1123.0 135.0 Engineering 0.107313 16 758 ... 150 692 40 0.050125 70000 43000 80000 529 102 0
4 5 2405 CHEMICAL ENGINEERING 32260.0 21239.0 11021.0 Engineering 0.341631 289 25694 ... 5180 16697 1672 0.061098 65000 50000 75000 18314 4440 972
5 6 2418 NUCLEAR ENGINEERING 2573.0 2200.0 373.0 Engineering 0.144967 17 1857 ... 264 1449 400 0.177226 65000 50000 102000 1142 657 244
6 7 6202 ACTUARIAL SCIENCE 3777.0 2110.0 1667.0 Business 0.441356 51 2912 ... 296 2482 308 0.095652 62000 53000 72000 1768 314 259
7 8 5001 ASTRONOMY AND ASTROPHYSICS 1792.0 832.0 960.0 Physical Sciences 0.535714 10 1526 ... 553 827 33 0.021167 62000 31500 109000 972 500 220
8 9 2414 MECHANICAL ENGINEERING 91227.0 80320.0 10907.0 Engineering 0.119559 1029 76442 ... 13101 54639 4650 0.057342 60000 48000 70000 52844 16384 3253
9 10 2408 ELECTRICAL ENGINEERING 81527.0 65511.0 16016.0 Engineering 0.196450 631 61928 ... 12695 41413 3895 0.059174 60000 45000 72000 45829 10874 3170
10 11 2407 COMPUTER ENGINEERING 41542.0 33258.0 8284.0 Engineering 0.199413 399 32506 ... 5146 23621 2275 0.065409 60000 45000 75000 23694 5721 980
11 12 2401 AEROSPACE ENGINEERING 15058.0 12953.0 2105.0 Engineering 0.139793 147 11391 ... 2724 8790 794 0.065162 60000 42000 70000 8184 2425 372
12 13 2404 BIOMEDICAL ENGINEERING 14955.0 8407.0 6548.0 Engineering 0.437847 79 10047 ... 2694 5986 1019 0.092084 60000 36000 70000 6439 2471 789
13 14 5008 MATERIALS SCIENCE 4279.0 2949.0 1330.0 Engineering 0.310820 22 3307 ... 878 1967 78 0.023043 60000 39000 65000 2626 391 81
14 15 2409 ENGINEERING MECHANICS PHYSICS AND SCIENCE 4321.0 3526.0 795.0 Engineering 0.183985 30 3608 ... 811 2004 23 0.006334 58000 25000 74000 2439 947 263
15 16 2402 BIOLOGICAL ENGINEERING 8925.0 6062.0 2863.0 Engineering 0.320784 55 6170 ... 1983 3413 589 0.087143 57100 40000 76000 3603 1595 524
16 17 2412 INDUSTRIAL AND MANUFACTURING ENGINEERING 18968.0 12453.0 6515.0 Engineering 0.343473 183 15604 ... 2243 11326 699 0.042876 57000 37900 67000 8306 3235 640
17 18 2400 GENERAL ENGINEERING 61152.0 45683.0 15469.0 Engineering 0.252960 425 44931 ... 7199 33540 2859 0.059824 56000 36000 69000 26898 11734 3192
18 19 2403 ARCHITECTURAL ENGINEERING 2825.0 1835.0 990.0 Engineering 0.350442 26 2575 ... 343 1848 170 0.061931 54000 38000 65000 1665 649 137
19 20 3201 COURT REPORTING 1148.0 877.0 271.0 Law & Public Policy 0.236063 14 930 ... 223 808 11 0.011690 54000 50000 54000 402 528 144
20 21 2102 COMPUTER SCIENCE 128319.0 99743.0 28576.0 Computers & Mathematics 0.222695 1196 102087 ... 18726 70932 6884 0.063173 53000 39000 70000 68622 25667 5144
22 23 2502 ELECTRICAL ENGINEERING TECHNOLOGY 11565.0 8181.0 3384.0 Engineering 0.292607 97 8587 ... 1873 5681 824 0.087557 52000 35000 60000 5126 2686 696
23 24 2413 MATERIALS ENGINEERING AND MATERIALS SCIENCE 2993.0 2020.0 973.0 Engineering 0.325092 22 2449 ... 1040 1151 70 0.027789 52000 35000 62000 1911 305 70
24 25 6212 MANAGEMENT INFORMATION SYSTEMS AND STATISTICS 18713.0 13496.0 5217.0 Business 0.278790 278 16413 ... 2420 13017 1015 0.058240 51000 38000 60000 6342 5741 708
25 26 2406 CIVIL ENGINEERING 53153.0 41081.0 12072.0 Engineering 0.227118 565 43041 ... 10080 29196 3270 0.070610 50000 40000 60000 28526 9356 2899
26 27 5601 CONSTRUCTION SERVICES 18498.0 16820.0 1678.0 Industrial Arts & Consumer Services 0.090713 295 16318 ... 1751 12313 1042 0.060023 50000 36000 60000 3275 5351 703
27 28 6204 OPERATIONS LOGISTICS AND E-COMMERCE 11732.0 7921.0 3811.0 Business 0.324838 156 10027 ... 1183 7724 504 0.047859 50000 40000 60000 1466 3629 285
28 29 2499 MISCELLANEOUS ENGINEERING 9133.0 7398.0 1735.0 Engineering 0.189970 118 7428 ... 1662 5476 597 0.074393 50000 39000 65000 3445 2426 365
29 30 5402 PUBLIC POLICY 5978.0 2639.0 3339.0 Law & Public Policy 0.558548 55 4547 ... 1306 2776 670 0.128426 50000 35000 70000 1550 1871 340
30 31 2410 ENVIRONMENTAL ENGINEERING 4047.0 2662.0 1385.0 Engineering 0.342229 26 2983 ... 930 1951 308 0.093589 50000 42000 56000 2028 830 260
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
143 144 1105 PLANT SCIENCE AND AGRONOMY 7416.0 4897.0 2519.0 Agriculture & Natural Resources 0.339671 110 6594 ... 1246 4522 314 0.045455 32000 22900 40000 2089 3545 1231
144 145 2308 SCIENCE AND COMPUTER TEACHER EDUCATION 6483.0 2049.0 4434.0 Education 0.683943 59 5362 ... 1227 3247 266 0.047264 32000 28000 39000 4214 1106 591
145 146 5200 PSYCHOLOGY 393735.0 86648.0 307087.0 Psychology & Social Work 0.779933 2584 307933 ... 115172 174438 28169 0.083811 31500 24000 41000 125148 141860 48207
146 147 6002 MUSIC 60633.0 29909.0 30724.0 Arts 0.506721 419 47662 ... 24943 21425 3918 0.075960 31000 22300 42000 13752 28786 9286
147 148 2306 PHYSICAL AND HEALTH EDUCATION TEACHING 28213.0 15670.0 12543.0 Education 0.444582 259 23794 ... 7230 13651 1920 0.074667 31000 24000 40000 12777 9328 2042
148 149 6006 ART HISTORY AND CRITICISM 21030.0 3240.0 17790.0 Humanities & Liberal Arts 0.845934 204 17579 ... 6140 9965 1128 0.060298 31000 23000 40000 5139 9738 3426
149 150 6000 FINE ARTS 74440.0 24786.0 49654.0 Arts 0.667034 623 59679 ... 23656 31877 5486 0.084186 30500 21000 41000 20792 32725 11880
150 151 2901 FAMILY AND CONSUMER SCIENCES 58001.0 5166.0 52835.0 Industrial Arts & Consumer Services 0.910933 518 46624 ... 15872 26906 3355 0.067128 30000 22900 40000 20985 20133 5248
151 152 5404 SOCIAL WORK 53552.0 5137.0 48415.0 Psychology & Social Work 0.904075 374 45038 ... 13481 27588 3329 0.068828 30000 25000 35000 27449 14416 4344
152 153 1103 ANIMAL SCIENCES 21573.0 5347.0 16226.0 Agriculture & Natural Resources 0.752144 255 17112 ... 5353 10824 917 0.050862 30000 22000 40000 5443 9571 2125
153 154 6003 VISUAL AND PERFORMING ARTS 16250.0 4133.0 12117.0 Arts 0.745662 132 12870 ... 6253 6322 1465 0.102197 30000 22000 40000 3849 7635 2840
154 155 2312 TEACHER EDUCATION: MULTIPLE LEVELS 14443.0 2734.0 11709.0 Education 0.810704 142 13076 ... 2214 8457 496 0.036546 30000 24000 37000 10766 1949 722
155 156 5299 MISCELLANEOUS PSYCHOLOGY 9628.0 1936.0 7692.0 Psychology & Social Work 0.798920 60 7653 ... 3221 3838 419 0.051908 30000 20800 40000 2960 3948 1650
156 157 5403 HUMAN SERVICES AND COMMUNITY ORGANIZATION 9374.0 885.0 8489.0 Psychology & Social Work 0.905590 89 8294 ... 2405 5061 326 0.037819 30000 24000 35000 2878 4595 724
157 158 3402 HUMANITIES 6652.0 2013.0 4639.0 Humanities & Liberal Arts 0.697384 49 5052 ... 2225 2661 372 0.068584 30000 20000 49000 1168 3354 1141
158 159 4901 THEOLOGY AND RELIGIOUS VOCATIONS 30207.0 18616.0 11591.0 Humanities & Liberal Arts 0.383719 310 24202 ... 8767 13944 1617 0.062628 29000 22000 38000 9927 12037 3304
159 160 6007 STUDIO ARTS 16977.0 4754.0 12223.0 Arts 0.719974 182 13908 ... 5673 7413 1368 0.089552 29000 19200 38300 3948 8707 3586
160 161 2201 COSMETOLOGY SERVICES AND CULINARY ARTS 10510.0 4364.0 6146.0 Industrial Arts & Consumer Services 0.584776 117 8650 ... 2064 5949 510 0.055677 29000 20000 36000 563 7384 3163
161 162 1199 MISCELLANEOUS AGRICULTURE 1488.0 404.0 1084.0 Agriculture & Natural Resources 0.728495 24 1290 ... 335 936 82 0.059767 29000 23000 42100 483 626 31
162 163 5502 ANTHROPOLOGY AND ARCHEOLOGY 38844.0 11376.0 27468.0 Humanities & Liberal Arts 0.707136 247 29633 ... 14515 13232 3395 0.102792 28000 20000 38000 9805 16693 6866
163 164 6102 COMMUNICATION DISORDERS SCIENCES AND SERVICES 38279.0 1225.0 37054.0 Health 0.967998 95 29763 ... 13862 14460 1487 0.047584 28000 20000 40000 19957 9404 5125
164 165 2307 EARLY CHILDHOOD EDUCATION 37589.0 1167.0 36422.0 Education 0.968954 342 32551 ... 7001 20748 1360 0.040105 28000 21000 35000 23515 7705 2868
165 166 2603 OTHER FOREIGN LANGUAGES 11204.0 3472.0 7732.0 Humanities & Liberal Arts 0.690111 56 7052 ... 3685 3214 846 0.107116 27500 22900 38000 2326 3703 1115
166 167 6001 DRAMA AND THEATER ARTS 43249.0 14440.0 28809.0 Arts 0.666119 357 36165 ... 15994 16891 3040 0.077541 27000 19200 35000 6994 25313 11068
167 168 3302 COMPOSITION AND RHETORIC 18953.0 7022.0 11931.0 Humanities & Liberal Arts 0.629505 151 15053 ... 6612 7832 1340 0.081742 27000 20000 35000 4855 8100 3466
168 169 3609 ZOOLOGY 8409.0 3050.0 5359.0 Biology & Life Science 0.637293 47 6259 ... 2190 3602 304 0.046320 26000 20000 39000 2771 2947 743
169 170 5201 EDUCATIONAL PSYCHOLOGY 2854.0 522.0 2332.0 Psychology & Social Work 0.817099 7 2125 ... 572 1211 148 0.065112 25000 24000 34000 1488 615 82
170 171 5202 CLINICAL PSYCHOLOGY 2838.0 568.0 2270.0 Psychology & Social Work 0.799859 13 2101 ... 648 1293 368 0.149048 25000 25000 40000 986 870 622
171 172 5203 COUNSELING PSYCHOLOGY 4626.0 931.0 3695.0 Psychology & Social Work 0.798746 21 3777 ... 965 2738 214 0.053621 23400 19200 26000 2403 1245 308
172 173 3501 LIBRARY SCIENCE 1098.0 134.0 964.0 Education 0.877960 2 742 ... 237 410 87 0.104946 22000 20000 22000 288 338 192

172 rows × 21 columns

In [3]:
recent_grads.plot(x='Sample_size', y='Median', kind='scatter', title='Median vs. Sample_size')
Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f450b072cf8>
In [4]:
recent_grads.plot(x='Sample_size', y='Unemployment_rate', kind='scatter', title='Sample_Size vs. Unemployment_rate')
Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f450b15c748>
In [5]:
recent_grads.plot(x='Full_time', y='Median', kind='scatter', title='Full_time vs. Median')
Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f450b0c4be0>
In [6]:
recent_grads.plot(x='ShareWomen', y='Unemployment_rate', kind='scatter', title='ShareWomen vs. Unemployment_rate')
Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4509051898>
In [7]:
recent_grads.plot(x='Men', y='Median', kind='scatter', title='Men vs. Median')
Out[7]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4508fc55c0>
In [8]:
recent_grads.plot(x='Women', y='Median', kind='scatter', title='Women vs. Median')
Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4508f23c88>

Observation:

Use the plots to explore the following questions: -Do students in more popular majors make more money?

I do not know exact answer, but hope so we should look to sample_size and median plot:approx 1000 graduates have salary range from 20k to 60k and few have from 60k to approx 75k; also number of graduates from range 1000 and high has average 30k to 45k. also there positive trend in the main crowd of observations.

or Full_time and Median graph also tells approx the same thing.

-Do students that majored in subjects that were majority female make more money? idk. number of women more than number of men, yes, they make money also we can see from sharewomen and unemployemnet, they is null relationship

-Is there any link between the number of full-time employees and median salary? yes, it is, 1 question.positive trend in the main crowd of observations

In [9]:
#first four plots:
cols =  ["Sample_size", "Median", "Employed", "Full_time", 
         "ShareWomen", "Unemployment_rate", "Men", "Women"]
fig = plt.figure(figsize=(5, 12))
for plot in range(1, 5):
    ax = fig.add_subplot(4, 1, plot)
    ax = recent_grads[cols[plot]].plot(kind ='hist', rot =30)
In [10]:
#second four plots: 
cols =  ["Sample_size", "Median", "Employed", "Full_time", 
         "ShareWomen", "Unemployment_rate", "Men", "Women"]
fig = plt.figure(figsize=(5, 12))
for plot in range(4, 8):
    ax = fig.add_subplot(4, 1, plot-3)
    ax = recent_grads[cols[plot]].plot(kind ='hist', rot =30)
In [11]:
recent_grads['ShareWomen'].value_counts(bins=10).sort_index()
Out[11]:
(-0.0019690000000000003, 0.0969]     3
(0.0969, 0.194]                     14
(0.194, 0.291]                      16
(0.291, 0.388]                      22
(0.388, 0.484]                      19
(0.484, 0.581]                      21
(0.581, 0.678]                      25
(0.678, 0.775]                      29
(0.775, 0.872]                      11
(0.872, 0.969]                      12
Name: ShareWomen, dtype: int64
In [12]:
recent_grads['Median'].value_counts(bins=10).sort_index()
Out[12]:
(21911.999, 30800.0]    24
(30800.0, 39600.0]      75
(39600.0, 48400.0]      40
(48400.0, 57200.0]      18
(57200.0, 66000.0]      11
(66000.0, 74800.0]       2
(74800.0, 83600.0]       1
(83600.0, 92400.0]       0
(92400.0, 101200.0]      0
(101200.0, 110000.0]     1
Name: Median, dtype: int64

observation:

Use the plots to explore the following questions:

What percent of majors are predominantly male? Predominantly female?

about 25 of the 172 majors consist of 58-68% women from last sharewomen value

What's the most common median salary range? median salary is 35000-40000

From other comments: Hey there. On the histogram, if we want to know how many of the majors are predominately female, we’ll focus on just the x-values above 0.5 (50%). For the bar that represents 0.5-0.6, the frequency is about 24. That means that there were 24 majors where the percentage of women was between 50-60%. The next bar (0.6-0.7), there were about 28 majors where the percentage of women was between 60-70%. So if we add up all the frequencies of just these last 5 bars, we end up with 24+28+28+10+8 = 98, which is more than half of the number of majors listed (172). So we can infer from the histogram that more than half of the majors in the dataset are predominately female.

In [13]:
from pandas.plotting import scatter_matrix
scatter_matrix(recent_grads[['Sample_size', 'Median']], figsize=(10,10))
Out[13]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7f4508bea358>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f4508e39d68>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x7f4508cea048>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f4508d67dd8>]],
      dtype=object)
In [14]:
scatter_matrix(recent_grads[['Sample_size', 'Median', 'Unemployment_rate' ]], figsize=(10,10))
Out[14]:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7f4508aea320>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f4508ada470>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f4508a24e48>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x7f45089df940>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f45089a9b38>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f4508968fd0>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x7f4508937710>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f45088efe10>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7f45088c4198>]],
      dtype=object)
In [17]:
recent_grads[:10].plot.bar(x='Major', y='ShareWomen')
recent_grads[-10:].plot.bar(x='Major', y='ShareWomen')
Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f45085e3c18>
In [18]:
recent_grads[:10].plot.bar(x='Major', y='Unemployment_rate')
recent_grads[-10:].plot.bar(x='Major', y='Unemployment_rate')
Out[18]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f45086f15f8>

wow, in womenshare we see that women are good at starting astronomy major to second bar full majors, especially in early childcare and communication disorder science

regarding to unemployment rate, if we compare all majors 18% nuclear engineering do not get job

In [ ]: