Plotting Group Lab

Moodle (everyone must turn in everything)

Due: Dec 5

Moodle (Each student must turn in the groups work.)



To give practice in creating useful graphs from data. Your goal is to make a useful graph for several data files. You will be using Anaconda. You can use the lab systems, or install it using these instructions: Anaconda and Spyder


CollegeInSight - a source of data about colleges and universities

matplotlib - Documentation and example code for making graphs

Activity 1 - Making appropriate graphs from data

Step 1

Consider the following csv data files:

Kenyon Student Economic Diversity

Name Year Aid applicants below $30,000 Aid applicants $30,000-$59,999 Aid applicants $60,000 and over Enrollment
Kenyon College 2015-16 65 100 735 1,711
Kenyon College 2014-15 67 109 658 1,662
Kenyon College 2013-14 84 97 669 1,705
Kenyon College 2012-13 92 101 638 1,667
Kenyon College 2011-12 86 106 661 1,658

Open Anaconda, and create a new program. You should create a Python folder in your network drive, and save the new program to there, and name it FinancialAid.csv. You can download the file "FinancialAid.csv" by clicking on the link above, and then saving it to a folder. Use the csv reader learned earlier ( CVS Read) to bring the data into your program.

Discuss the meaning of the data. Look at the plot examples in matplotlib and discuss possible ways to display this data that effectively communicates some aspect of this data. Your group should consider several options, and decide (and record) what your goal is for this this chart, and pick that chart. Then implement your design, including correct scaling, data labels, and axis labels.

You will demonstrate your solution in class, and turn in code on moodle (each student).

Step 2

You will do the same exercise again with new data. This should be a different type of graph, and be prepared to justify your choice, and present in lab.

Kenyon Student Debt

Name Year Percent of graduates with debt Average debt of graduates
Kenyon College 2016-17 0.38 21404
Kenyon College 2015-16 0.36 27000
Kenyon College 2014-15 0.36 27000
Kenyon College 2013-14 0.46 20323
Kenyon College 2012-13 0.5 18902
Step 3

Yet another bit of date.

Name Year Tuition and fees (in-district/in-state) Completers within 150% of normal time Fall enrollment - Full-time freshmen (#)
Kenyon College 2015-16 49140 437 492
Kenyon College 2014-15 47330 409 446
Kenyon College 2013-14 45640 406 480
Kenyon College 2012-13 44420 408 446
Ohio State University-Main Campus 2015-16 10037 5565 7023
Ohio State University-Main Campus 2014-15 10037 5592 7070
Ohio State University-Main Campus 2013-14 10037 5136 7121
Ohio State University-Main Campus 2012-13 10037 5123 7204
Mount Vernon Nazarene University 2015-16 25748 225 356
Mount Vernon Nazarene University 2014-15 24650 180 311
Mount Vernon Nazarene University 2013-14 23690 215 301
Mount Vernon Nazarene University 2012-13 22890 213 290
Oberlin College 2015-16 50582 660 775
Oberlin College 2014-15 48682 696 797
Oberlin College 2013-14 46870 663 780
Oberlin College 2012-13 44905 651 759
Ohio Wesleyan University 2015-16 43230 372 431
Ohio Wesleyan University 2014-15 41920 354 458
Ohio Wesleyan University 2013-14 40510 373 536
Ohio Wesleyan University 2012-13 39150 364 537

Here the data is a bit more complicated. Consider a simple graph that you can make a point with for this data. Preprocess the data into a simplified form (programmatically, not by hand). Your goal is to distill the data down to a simple graph that meets the goal for your graph. Then make a graph that makes an impact, that get the viewer thinking about some relationship in the graph.

For example you could try to show the how the different schools rate of graduation differs, and perhaps coorelate that with cost.

Step 4

Go to CollegeInSight. Select the "Explore all data" option. Then explore the options. You can pick one or more schools, one or more data variables. You should find some interesting data selctions, and produce two more (based on different data) graphs. For each have a goal in mind, which you should state in the write up.

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatcsv FinancialAid.csv r1 manage 0.4 K 2019-04-23 - 15:50 JimSkon  
PNGpng Screenshot_20181203_160227.png r1 manage 35.4 K 2018-12-03 - 21:04 JimSkon  
Unknown file formatwebp sphx_glr_bar_stacked_001.webp r1 manage 4.6 K 2018-12-03 - 21:01 JimSkon  

This topic: Main > WebHome > IntroToCSF2018 > PlottingGroupLab
Topic revision: r9 - 2019-10-14 - JimSkon
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback