4

How do degree classes vary by graduates' gender?

 3 years ago
source link: https://datacrayon.com/posts/plotapi/showcase/how_do_degree_classes_vary_by_gender/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Preamble

from plotapi import Terminus
import json

Terminus.set_license("your username", "your license key")

Introduction

In this notebook we're going to use Plotapi Terminus to visualise how degree classes vary by graduates' gender. We"ll use Python, but Plotapi can be used from any programming language.

In the Terminus diagram (a type of flow diagram), we can watch the journey of something or someone from some starting category to some ending category. In this case, we'll be watching each unit travel from a graduate's gender to their awarded degree classification.

Dataset

We're going to use data that has been published by the Higher Education Statistics Agency (HESA) in the UK. The data table is titled "UK domiciled first degree qualifiers by classification of first degree, religious belief, sex, age group, disability marker, ethnicity marker, mode of study and academic year" and it can be found at this link.

We will use data from all countries, all modes of study, and from the academic year 2019/20. "Other" was not included due to a small sample size..

The degree class is the result achieved by a student UK, similar to a Grade Point Average (GPA). You can find a mapping between UK degree classifications and GPA here

data = [
    {"source": "Female", "target": "First class", "value": 68190},
    {"source": "Female", "target": "Second class (upper)", "value": 90935},
    {"source": "Female", "target": "Second class (lower)", "value": 25700},
    {"source": "Female", "target": "Third class", "value": 4940},
    {"source": "Female", "target": "Unclassified", "value": 10660},
    
    {"source": "Male", "target": "First class", "value": 47175},
    {"source": "Male", "target": "Second class (upper)", "value": 63870},
    {"source": "Male", "target": "Second class (lower)", "value": 21455},
    {"source": "Male", "target": "Third class", "value": 4350},
    {"source": "Male", "target": "Unclassified", "value": 6860}
]

Visualisation

Let's use Plotapi Terminus for this visualisation, you can see more examples in the Gallery.

We're going to adjust some layout and template parameters. We're setting pixels_per_unit=40 to represent 404040 graduates with a single pixel. This effects the length of the animation, making it shorter than the default of setting.

Terminus(data, bundled=True, pipe_alignment="middle", pixel_size=4, pixels_per_unit=40,
         title="Watch <plotapi_count> graduate's collect their degree").show()

Plotapi - Terminus Diagram

FemaleMaleFirst classSecond class (upper)Second class (lower)Third classUnclassified00%00%00%00%00%Female00%00%00%00%00%MaleWatch 18,000 graduate's collect their degreeProduced with Plotapi

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK