The National Alliance of Concurrent Enrollment Partnerships

2015-16 Civil Rights Data Collection (CRDC)

Advanced Placement (AP) v. Dual Enrollment (DE)

Responses to the question: "How many Students are taking AP/DE Courses in the School?" (Only Looking at Schools that Offer AP/DE, respectively)

Alijah O'Connor - 2018



In the 2015-2016 CRDC Survey, schools were required to report how many students were enrolled in at least one Dual Enrollment course (in addition to reporting the number of students enrolled in at least one AP Course). This new inclusion allows for the study of gross participation in these programs. Looking at the 18,667 high schools from the filtered CRDC dataset (for more details, see the intital filtration methodology), the results are reported below in the follow ways:

- Nationally
- By School 9-12th Grade Enrollment
- By School Locale
- By School Non-White Student Percentage
- By Student Gender
- By Student Race
- By Limited English Proficiency (LEP) / Individuals with Disabilities Education Act (IDEA) Students
- By State
- By Region (Accreditation)
- By Region (Census)
- By Region (NACEP)


In [1]:
from IPython.display import HTML

HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
Out[1]:
In [2]:
from IPython.display import HTML

HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
Out[2]:
In [3]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt

import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import init_notebook_mode,iplot
init_notebook_mode(connected = True)

%matplotlib inline
sns.set_style('whitegrid')
plt.rc('axes', titlesize = 14, titleweight = 'bold', labelweight = 'bold')
In [4]:
crdc_1516 = pd.read_csv('../filtered_data/04_filter_final.csv', dtype = {'LEAID':np.object})

Clean Missing Values / Add Enrollment columns

Cleaning Specificially those for int-columns -- these are recorded as negative numbers that interfere with the enrollment calculations.

This section sets up most of the calculations needed for the analyses in the report.

In [5]:
crdc_1516_cleaned = crdc_1516.copy()
In [6]:
from my_functions.extra_functions import missing_value_mapper
crdc_1516_cleaned = crdc_1516_cleaned.applymap(missing_value_mapper)
In [7]:
"""Total Enrollments"""
crdc_1516_cleaned['total_enrollment'] = crdc_1516_cleaned['TOT_ENR_M'] + crdc_1516_cleaned['TOT_ENR_F']

crdc_1516_cleaned['total_white_enrollment'] = crdc_1516_cleaned['SCH_ENR_WH_M'] + crdc_1516_cleaned['SCH_ENR_WH_F']
crdc_1516_cleaned['total_nonwhite_enrollment'] = crdc_1516_cleaned['total_enrollment'] - crdc_1516_cleaned['total_white_enrollment']

crdc_1516_cleaned['total_hi_enrollment'] = crdc_1516_cleaned['SCH_ENR_HI_M'] + crdc_1516_cleaned['SCH_ENR_HI_F']
crdc_1516_cleaned['total_am_enrollment'] = crdc_1516_cleaned['SCH_ENR_AM_M'] + crdc_1516_cleaned['SCH_ENR_AM_F']
crdc_1516_cleaned['total_as_enrollment'] = crdc_1516_cleaned['SCH_ENR_AS_M'] + crdc_1516_cleaned['SCH_ENR_AS_F']
crdc_1516_cleaned['total_bl_enrollment'] = crdc_1516_cleaned['SCH_ENR_BL_M'] + crdc_1516_cleaned['SCH_ENR_BL_F']
crdc_1516_cleaned['total_hp_enrollment'] = crdc_1516_cleaned['SCH_ENR_HP_M'] + crdc_1516_cleaned['SCH_ENR_HP_F']
crdc_1516_cleaned['total_tr_enrollment'] = crdc_1516_cleaned['SCH_ENR_TR_M'] + crdc_1516_cleaned['SCH_ENR_TR_F']

crdc_1516_cleaned['total_lep_enrollment'] = crdc_1516_cleaned['SCH_ENR_LEP_M'] + crdc_1516_cleaned['SCH_ENR_LEP_F']
crdc_1516_cleaned['total_idea_enrollment'] = crdc_1516_cleaned['SCH_ENR_IDEA_M'] + crdc_1516_cleaned['SCH_ENR_IDEA_F']
In [8]:
"""DE Columns"""
crdc_1516_cleaned['de_total_enrollment'] = crdc_1516_cleaned['TOT_DUALENR_M'] + crdc_1516_cleaned['TOT_DUALENR_F']

crdc_1516_cleaned['de_white_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_WH_F'] +  crdc_1516_cleaned['SCH_DUALENR_WH_M']
crdc_1516_cleaned['de_nonwhite_enrollment'] = crdc_1516_cleaned['de_total_enrollment'] - crdc_1516_cleaned['de_white_enrollment']

crdc_1516_cleaned['de_hi_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_HI_M'] + crdc_1516_cleaned['SCH_DUALENR_HI_F']
crdc_1516_cleaned['de_am_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_AM_M'] + crdc_1516_cleaned['SCH_DUALENR_AM_F']
crdc_1516_cleaned['de_as_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_AS_M'] + crdc_1516_cleaned['SCH_DUALENR_AS_F']
crdc_1516_cleaned['de_bl_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_BL_M'] + crdc_1516_cleaned['SCH_DUALENR_BL_F']
crdc_1516_cleaned['de_hp_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_HP_M'] + crdc_1516_cleaned['SCH_DUALENR_HP_F']
crdc_1516_cleaned['de_tr_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_TR_M'] + crdc_1516_cleaned['SCH_DUALENR_TR_F']

crdc_1516_cleaned['de_lep_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_LEP_M'] + crdc_1516_cleaned['SCH_DUALENR_LEP_F']
crdc_1516_cleaned['de_idea_enrollment'] = crdc_1516_cleaned['SCH_DUALENR_IDEA_M'] + crdc_1516_cleaned['SCH_DUALENR_IDEA_F']
In [9]:
"""AP Columns"""
crdc_1516_cleaned['ap_total_enrollment'] = crdc_1516_cleaned['TOT_APENR_M'] + crdc_1516_cleaned['TOT_APENR_F']

crdc_1516_cleaned['ap_white_enrollment'] = crdc_1516_cleaned['SCH_APENR_WH_F'] +  crdc_1516_cleaned['SCH_APENR_WH_M']
crdc_1516_cleaned['ap_nonwhite_enrollment'] = crdc_1516_cleaned['ap_total_enrollment'] - crdc_1516_cleaned['ap_white_enrollment']

crdc_1516_cleaned['ap_hi_enrollment'] = crdc_1516_cleaned['SCH_APENR_HI_M'] + crdc_1516_cleaned['SCH_APENR_HI_F']
crdc_1516_cleaned['ap_am_enrollment'] = crdc_1516_cleaned['SCH_APENR_AM_M'] + crdc_1516_cleaned['SCH_APENR_AM_F']
crdc_1516_cleaned['ap_as_enrollment'] = crdc_1516_cleaned['SCH_APENR_AS_M'] + crdc_1516_cleaned['SCH_APENR_AS_F']
crdc_1516_cleaned['ap_bl_enrollment'] = crdc_1516_cleaned['SCH_APENR_BL_M'] + crdc_1516_cleaned['SCH_APENR_BL_F']
crdc_1516_cleaned['ap_hp_enrollment'] = crdc_1516_cleaned['SCH_APENR_HP_M'] + crdc_1516_cleaned['SCH_APENR_HP_F']
crdc_1516_cleaned['ap_tr_enrollment'] = crdc_1516_cleaned['SCH_APENR_TR_M'] + crdc_1516_cleaned['SCH_APENR_TR_F']

crdc_1516_cleaned['ap_lep_enrollment'] = crdc_1516_cleaned['SCH_APENR_LEP_M'] + crdc_1516_cleaned['SCH_APENR_LEP_F']
crdc_1516_cleaned['ap_idea_enrollment'] = crdc_1516_cleaned['SCH_APENR_IDEA_M'] + crdc_1516_cleaned['SCH_APENR_IDEA_F']

In [10]:
"""Helper Functions"""
from my_functions.extra_functions import (hs_enrollment_averager, school_sizer, 
                                          region_mapper, eth_grouper, locale_map, region_mapper_nacep, 
                                          region_mapper_census)
In [11]:
"""HS-Averaged Column"""
crdc_1516_cleaned['hs_total_enrollment'] = hs_enrollment_averager(crdc_1516_cleaned) 
In [12]:
"""HS Category Breakdown"""
crdc_1516_cleaned['hs_male'] = round((crdc_1516_cleaned['TOT_ENR_M'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_female'] = round((crdc_1516_cleaned['TOT_ENR_F'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)

crdc_1516_cleaned['hs_white'] = round((crdc_1516_cleaned['total_white_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_nonwhite'] = round((crdc_1516_cleaned['total_nonwhite_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)

crdc_1516_cleaned['hs_hi'] = round((crdc_1516_cleaned['total_hi_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_am'] = round((crdc_1516_cleaned['total_am_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_as'] = round((crdc_1516_cleaned['total_as_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_bl'] = round((crdc_1516_cleaned['total_bl_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_hp'] = round((crdc_1516_cleaned['total_hp_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_tr'] = round((crdc_1516_cleaned['total_tr_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)

crdc_1516_cleaned['hs_idea'] = round((crdc_1516_cleaned['total_idea_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
crdc_1516_cleaned['hs_lep'] = round((crdc_1516_cleaned['total_lep_enrollment'] / crdc_1516_cleaned['total_enrollment']) * crdc_1516_cleaned['hs_total_enrollment'],0)
In [13]:
"""Add HS Enrollment-Grouped Column"""
crdc_1516_cleaned['size_group'] = crdc_1516_cleaned['hs_total_enrollment'].apply(lambda x: school_sizer(x))
In [14]:
"""Add Region Columns"""
crdc_1516_cleaned['region_accred'] = crdc_1516_cleaned['LEA_STATE'].apply(lambda x: region_mapper(x))
crdc_1516_cleaned['region_census'] = crdc_1516_cleaned['LEA_STATE'].apply(lambda x: region_mapper_census(x))
crdc_1516_cleaned['region_nacep'] = crdc_1516_cleaned['LEA_STATE'].apply(lambda x: region_mapper_nacep(x))
In [15]:
"""Add Ethnicity Percentage/Quintile"""
crdc_1516_cleaned['pct_eth'] = crdc_1516_cleaned['total_nonwhite_enrollment'] / crdc_1516_cleaned['total_enrollment']
crdc_1516_cleaned['eth_quintile'] = crdc_1516_cleaned['pct_eth'].apply(lambda pct: eth_grouper(pct))
In [16]:
"""Add Locale Column"""
crdc_1516_cleaned['locale_group'] = crdc_1516_cleaned['LOCALE15'].map(locale_map)

Filter non-Yes Schools and Examine Characteristics

In [17]:
from my_functions.extra_functions import school_grade_range, have_gr9_or_younger

DE

In [18]:
crdc_1516_deYes = crdc_1516_cleaned[crdc_1516_cleaned.SCH_DUAL_IND == 'Yes']
In [19]:
"""Number of schools which responded 'Yes' to the DE_Flag """
print(len(crdc_1516_deYes), 'Schools reported "Yes" to Dual Enrollment Flag Question')
13338 Schools reported "Yes" to Dual Enrollment Flag Question
In [20]:
"""Grade Ranges for Schools with DE Students"""
deYes_grade_range_list = school_grade_range(crdc_1516_deYes).join(crdc_1516_deYes[['total_enrollment', 'de_total_enrollment']].reset_index(drop = True), how = 'outer')

deYes_grade_range_dist = deYes_grade_range_list['grade_range'].value_counts().reset_index().sort_values('index').set_index('index')
deYes_grade_range_dist['pct_of_schools'] = round(deYes_grade_range_dist['grade_range'] / len(deYes_grade_range_list), 3)

deYes_grade_range_enrollments = pd.DataFrame(deYes_grade_range_list.groupby('grade_range')['total_enrollment'].sum())
deYes_grade_range_enrollments['pct_of_total_enrollment'] = round(deYes_grade_range_enrollments['total_enrollment'] / crdc_1516_deYes['total_enrollment'].sum(), 3)

deYes_grade_range_de_enrollments = pd.DataFrame(deYes_grade_range_list.groupby('grade_range')['de_total_enrollment'].sum())
deYes_grade_range_de_enrollments['pct_of_total_de_enrollment'] = round(deYes_grade_range_de_enrollments['de_total_enrollment'] / crdc_1516_deYes['de_total_enrollment'].sum(), 3)

deYes_grade_range_dist.index.names = ['Grade Ranges']
deYes_grade_range_dist.join(deYes_grade_range_enrollments).join(deYes_grade_range_de_enrollments).rename({'grade_range': '# schools'}, axis = 1)
Out[20]:
# schools pct_of_schools total_enrollment pct_of_total_enrollment de_total_enrollment pct_of_total_de_enrollment
Grade Ranges
05-12 28 0.002 15233 0.001 1261 0.001
06-12 608 0.046 296730 0.026 24342 0.021
07-12 1659 0.124 574941 0.051 58581 0.051
08-12 195 0.015 156724 0.014 16287 0.014
09-11 28 0.002 11536 0.001 1425 0.001
09-12 9486 0.711 9299949 0.824 953205 0.828
10-12 232 0.017 263635 0.023 50881 0.044
11-12 79 0.006 31357 0.003 9095 0.008
11-only 1 0.000 32 0.000 32 0.000
12-only 3 0.000 495 0.000 104 0.000
kg-12 340 0.025 219076 0.019 8225 0.007
other 243 0.018 245034 0.022 20686 0.018
pk-12 436 0.033 173724 0.015 7711 0.007

AP

In [21]:
crdc_1516_apYes = crdc_1516_cleaned[crdc_1516_cleaned.SCH_APENR_IND == 'Yes']
In [22]:
"""Number of schools which responded 'Yes' to the AP_Flag """
len(crdc_1516_apYes)
Out[22]:
12764
In [23]:
"""Grade Ranges for Schools with AP Students"""
apYes_grade_range_list = school_grade_range(crdc_1516_apYes).join(crdc_1516_apYes[['total_enrollment', 'ap_total_enrollment']].reset_index(drop = True), how = 'outer')

apYes_grade_range_dist = apYes_grade_range_list['grade_range'].value_counts().reset_index().sort_values('index').set_index('index')
apYes_grade_range_dist['pct_of_schools'] = round(apYes_grade_range_dist['grade_range'] / len(apYes_grade_range_list), 3)

apYes_grade_range_enrollments = pd.DataFrame(apYes_grade_range_list.groupby('grade_range')['total_enrollment'].sum())
apYes_grade_range_enrollments['pct_of_total_enrollment'] = round(apYes_grade_range_enrollments['total_enrollment'] / crdc_1516_apYes['total_enrollment'].sum(), 3)

apYes_grade_range_ap_enrollments = pd.DataFrame(apYes_grade_range_list.groupby('grade_range')['ap_total_enrollment'].sum())
apYes_grade_range_ap_enrollments['pct_of_total_ap_enrollment'] = round(apYes_grade_range_ap_enrollments['ap_total_enrollment'] / crdc_1516_apYes['ap_total_enrollment'].sum(), 3)

apYes_grade_range_dist.index.names = ['Grade Ranges']
apYes_grade_range_dist.join(apYes_grade_range_enrollments).join(apYes_grade_range_ap_enrollments).rename({'grade_range': '# schools'}, axis = 1)
Out[23]:
# schools pct_of_schools total_enrollment pct_of_total_enrollment ap_total_enrollment pct_of_total_ap_enrollment
Grade Ranges
05-12 41 0.003 28091 0.002 4272 0.002
06-12 545 0.043 336590 0.025 48708 0.018
07-12 978 0.077 509683 0.038 67422 0.024
08-12 198 0.016 190004 0.014 29903 0.011
09-11 40 0.003 17514 0.001 4402 0.002
09-12 10093 0.791 11377353 0.851 2451415 0.888
10-12 230 0.018 297603 0.022 78824 0.029
11-12 33 0.003 17628 0.001 7692 0.003
12-only 1 0.000 391 0.000 36 0.000
kg-12 225 0.018 229713 0.017 14722 0.005
other 227 0.018 281418 0.021 48235 0.017
pk-12 153 0.012 80207 0.006 4179 0.002

Analysis


In [24]:
"""Helper Functions"""
from my_functions.extra_functions import by_offering_enrollment_compiler, by_offering_enrollment_compiler_layerer

National

In [25]:
deYes_enrollment = crdc_1516_deYes['hs_total_enrollment'].sum() # Based on the Averager Function
de_total_enrollment = crdc_1516_cleaned['de_total_enrollment'].sum()
de_participation_rate = round(de_total_enrollment / deYes_enrollment * 100, 1)

apYes_enrollment = crdc_1516_apYes['hs_total_enrollment'].sum() # Based on the Averager Function
ap_total_enrollment = crdc_1516_cleaned['ap_total_enrollment'].sum()
ap_participation_rate = round(ap_total_enrollment / apYes_enrollment * 100, 1)

national_order = ['Total HS in DE Offering', 'Total DE Students', 'DE Participation Rate',
                  'Total HS in AP Offering', 'Total AP Students', 'AP Participation Rate']
national_frame = pd.DataFrame({'Total HS in DE Offering': [deYes_enrollment],
              'Total DE Students': [de_total_enrollment],
              'DE Participation Rate': [de_participation_rate],
              'Total HS in AP Offering': [apYes_enrollment],     
              'Total AP Students': [ap_total_enrollment],
              'AP Participation Rate': [ap_participation_rate]}, 
            index = ['National'])[national_order]
national_frame
Out[25]:
Total HS in DE Offering Total DE Students DE Participation Rate Total HS in AP Offering Total AP Students AP Participation Rate
National 10585484 1151835 10.9 12699439 2759810 21.7

By School 9-12th Grade Enrollment

- Schools were grouped into four categories based on how many students were enrolled in grades 9-12 in each one:
    - <100
    - 100 - 499
    - 500 - 1199
    - 1200+
In [26]:
size_enrollments = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'size_group')
size_enrollments = size_enrollments.rename({1: '<100', 2: '100-499', 3:'500-1199', 4:'1200+'})
size_enrollments.index.name = 'HS Student Enrollment'
size_enrollments
Out[26]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
HS Student Enrollment
<100 83006 0.8 15915 1.4 0.6 19.2 22180 0.2 3543 0.1 -0.1 16.0
100-499 1433434 13.5 248251 21.6 8.1 17.3 1260523 9.9 209151 7.6 -2.3 16.6
500-1199 2750780 26.0 322759 28.0 2.0 11.7 3290338 25.9 607656 22.0 -3.9 18.5
1200+ 6318264 59.7 564910 49.0 -10.7 8.9 8126398 64.0 1939460 70.3 6.3 23.9
In [27]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = size_enrollments.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -90, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = size_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Size Groups',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by School Size Groups')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = size_enrollments.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -28, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = size_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Size Groups',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by School Size Groups')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By School Locale

- Schools were grouped into four categories based on their locale (as defined by the NCES):
    - City: "Territory inside an Urbanized Area and inside a Principal City" 
    - Rural: "Census-defined rural territory"
    - Suburban: "Territory outside a Principal City and inside an Urbanized Area"
    - Town: "Territory inside an Urban Cluster"
In [28]:
locale_enrollments = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'locale_group')
locale_enrollments.index.name = 'Locale'
locale_enrollments
Out[28]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Locale
City 2741207 25.9 258026 22.4 -3.5 9.4 3737519 29.4 869156 31.5 2.1 23.3
Rural 2341176 22.1 299789 26.0 3.9 12.8 2194301 17.3 386316 14.0 -3.3 17.6
Suburban 4201082 39.7 414856 36.0 -3.7 9.9 5440900 42.8 1303792 47.2 4.4 24.0
Town 1302019 12.3 179164 15.6 3.3 13.8 1326719 10.4 200546 7.3 -3.1 15.1
In [29]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = locale_enrollments.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -90, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = locale_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Locales',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by School Locale')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = locale_enrollments.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -100, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = locale_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Locales',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by School Locale')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By School Non-White Student Percentage

In [30]:
eth_enrollments = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'eth_quintile')
eth_enrollments = eth_enrollments.rename({1:'0-20%', 2:'21-40%', 3:'41-60%', 4:'61-80%', 5:'81-100%'})
eth_enrollments.index.name = 'Non-White %'
eth_enrollments
Out[30]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Non-White %
0-20% 2858385 27.0 409635 35.6 8.6 14.3 2923042 23.0 561661 20.4 -2.6 19.2
21-40% 2407867 22.7 283517 24.6 1.9 11.8 2721823 21.4 645492 23.4 2.0 23.7
41-60% 1890544 17.9 175106 15.2 -2.7 9.3 2296483 18.1 558645 20.2 2.1 24.3
61-80% 1346098 12.7 127096 11.0 -1.7 9.4 1785505 14.1 407209 14.8 0.7 22.8
81-100% 2082590 19.7 156481 13.6 -6.1 7.5 2972586 23.4 586803 21.3 -2.1 19.7
In [31]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = eth_enrollments.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -29, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = ['0-20%', '21-40%', '41-60%', '61-80%', '81-100%'],
           bbox_to_anchor = (1,0.71), title = 'Percentage Non-White Groups',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by School Ethnicity Groups')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = eth_enrollments.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = 11, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = ['0-20%', '21-40%', '41-60%', '61-80%', '81-100%'],
           bbox_to_anchor = (1,0.71), title = 'Percentage Non-White Groups',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by School Ethnicity Groups')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By Student Gender

In [32]:
male_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_male', 'TOT_DUALENR_M', 'TOT_APENR_M', 'Male')
female_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_female', 'TOT_DUALENR_F', 'TOT_APENR_F', 'Female')
gender_enrollments = pd.concat([male_enroll, female_enroll])
gender_enrollments.index.name = 'Gender'
gender_enrollments
Out[32]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Gender
Male 5401367.0 51.0 523627 45.5 -5.5 9.7 6474580.0 51.0 1208082 43.8 -7.2 18.7
Female 5184122.0 49.0 628208 54.5 5.5 12.1 6224860.0 49.0 1551728 56.2 7.2 24.9
In [33]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = gender_enrollments.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = 90, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = gender_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Genders',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by Genders')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = gender_enrollments.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = 90, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = gender_enrollments.index,
           bbox_to_anchor = (1,0.71), title = 'Genders',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by Genders')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By Student Race

In [34]:
hi_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_hi', 'de_hi_enrollment', 'ap_hi_enrollment', 'Hispanic')
am_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_am', 'de_am_enrollment', 'ap_am_enrollment', 'American Indian / Native Alaskan')
as_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_as', 'de_as_enrollment', 'ap_as_enrollment', 'Asian')
bl_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_bl', 'de_bl_enrollment', 'ap_bl_enrollment', 'Black')
hp_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_hp', 'de_hp_enrollment', 'ap_hp_enrollment', 'Native Hawaiian / Pacific Islander')
tr_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_tr', 'de_tr_enrollment', 'ap_tr_enrollment', 'Two or More Races')
wh_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_white', 'de_white_enrollment', 'ap_white_enrollment', 'White')

race_enrollment = pd.concat([hi_enroll, am_enroll, as_enroll, bl_enroll, hp_enroll, tr_enroll, wh_enroll])
race_enrollment.index.name = 'Race'
race_enrollment
Out[34]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Race
Hispanic 2265580.0 21.4 192107 16.7 -4.7 8.5 3123686.0 24.6 587911 21.3 -3.3 18.8
American Indian / Native Alaskan 104534.0 1.0 10988 1.0 0.0 10.5 111153.0 0.9 17210 0.6 -0.3 15.5
Asian 486492.0 4.6 58506 5.1 0.5 12.0 702570.0 5.5 293893 10.6 5.1 41.8
Black 1615783.0 15.3 101766 8.8 -6.5 6.3 1924311.0 15.2 260378 9.4 -5.8 13.5
Native Hawaiian / Pacific Islander 43195.0 0.4 4084 0.4 0.0 9.5 54350.0 0.4 9870 0.4 0.0 18.2
Two or More Races 298339.0 2.8 30885 2.7 -0.1 10.4 361544.0 2.8 80514 2.9 0.1 22.3
White 5772308.0 54.5 753499 65.4 10.9 13.1 6422430.0 50.6 1510034 54.7 4.1 23.5
In [35]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = race_enrollment.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(race_enrollment))],
                        startangle = -70, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = race_enrollment.index,
           bbox_to_anchor = (.82,0.71), title = 'Races',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by Race')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = race_enrollment.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(race_enrollment))],
                        startangle = -110, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = race_enrollment.index,
           bbox_to_anchor = (.82,0.71), title = 'Races',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by Race')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By Limited English Proficiency (LEP) / Individuals with Disabilities Education Act (IDEA) Students

In [36]:
lep_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_lep', 'de_lep_enrollment', 'ap_lep_enrollment', 'LEP')
idea_enroll = by_offering_enrollment_compiler_layerer(crdc_1516_deYes, crdc_1516_apYes, 'hs_idea', 'de_idea_enrollment', 'ap_idea_enrollment', 'IDEA')
lep_idea_enrollments = pd.concat([lep_enroll, idea_enroll])
lep_idea_enrollments
Out[36]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
LEP 517973.0 4.9 21231 1.8 -3.1 4.1 713060.0 5.6 52405 1.9 -3.7 7.3
IDEA 1210759.0 11.4 43107 3.7 -7.7 3.6 1461855.0 11.5 42576 1.5 -10.0 2.9

By State

- Sorted by DE Participation Rate in Descending Order
In [37]:
state_enrollments = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'LEA_STATE')
state_enrollments.index.name = 'State'
state_enrollments.sort_values('DE Participation Rate', ascending=False)
Out[37]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
State
IN 266292 2.5 69580 6.0 3.5 26.1 277252 2.2 53667 1.9 -0.3 19.4
ID 67506 0.6 15712 1.4 0.8 23.3 52354 0.4 10204 0.4 0.0 19.5
IA 135538 1.3 31135 2.7 1.4 23.0 102270 0.8 15546 0.6 -0.2 15.2
WA 225895 2.1 51780 4.5 2.4 22.9 267367 2.1 61535 2.2 0.1 23.0
WI 212661 2.0 45113 3.9 1.9 21.2 234459 1.8 53847 2.0 0.2 23.0
KS 117418 1.1 24312 2.1 1.0 20.7 94364 0.7 17425 0.6 -0.1 18.5
WY 23255 0.2 4802 0.4 0.2 20.6 18630 0.1 2743 0.1 0.0 14.7
OR 131047 1.2 26742 2.3 1.1 20.4 127050 1.0 26304 1.0 0.0 20.7
NY 435678 4.1 79598 6.9 2.8 18.3 710925 5.6 150860 5.5 -0.1 21.2
UT 130739 1.2 22975 2.0 0.8 17.6 140823 1.1 32401 1.2 0.1 23.0
MO 232892 2.2 38345 3.3 1.1 16.5 191769 1.5 33269 1.2 -0.3 17.3
ND 28171 0.3 4298 0.4 0.1 15.3 19346 0.2 2734 0.1 -0.1 14.1
NE 85211 0.8 12905 1.1 0.3 15.1 64306 0.5 12897 0.5 0.0 20.1
AZ 211305 2.0 30977 2.7 0.7 14.7 269768 2.1 51077 1.9 -0.2 18.9
NM 70763 0.7 10195 0.9 0.2 14.4 74090 0.6 17051 0.6 0.0 23.0
CT 107333 1.0 15172 1.3 0.3 14.1 148462 1.2 32900 1.2 0.0 22.2
MN 180327 1.7 24455 2.1 0.4 13.6 182382 1.4 46014 1.7 0.3 25.2
AR 98125 0.9 13370 1.2 0.3 13.6 124418 1.0 29848 1.1 0.1 24.0
NJ 272840 2.6 35284 3.1 0.5 12.9 389093 3.1 75597 2.7 -0.4 19.4
OH 437424 4.1 49797 4.3 0.2 11.4 388220 3.1 59095 2.1 -1.0 15.2
KY 164257 1.6 17809 1.5 -0.1 10.8 182152 1.4 44403 1.6 0.2 24.4
LA 164409 1.6 17661 1.5 -0.1 10.7 148822 1.2 22894 0.8 -0.4 15.4
IL 475560 4.5 49930 4.3 -0.2 10.5 527630 4.2 124664 4.5 0.3 23.6
TX 1295968 12.2 130712 11.3 -0.9 10.1 1333152 10.5 340779 12.3 1.8 25.6
VA 325520 3.1 31525 2.7 -0.4 9.7 366337 2.9 88228 3.2 0.3 24.1
NC 320548 3.0 29755 2.6 -0.4 9.3 422820 3.3 73641 2.7 -0.6 17.4
SD 34571 0.3 3207 0.3 0.0 9.3 28921 0.2 3545 0.1 -0.1 12.3
AK 21932 0.2 2029 0.2 0.0 9.3 26522 0.2 4302 0.2 0.0 16.2
NH 34618 0.3 3074 0.3 0.0 8.9 55619 0.4 7736 0.3 -0.1 13.9
CO 208049 2.0 18016 1.6 -0.4 8.7 216449 1.7 53358 1.9 0.2 24.7
MT 34206 0.3 2925 0.3 0.0 8.6 32714 0.3 4662 0.2 -0.1 14.3
VT 21979 0.2 1845 0.2 0.0 8.4 21734 0.2 3816 0.1 -0.1 17.6
TN 255093 2.4 21080 1.8 -0.6 8.3 221938 1.7 33889 1.2 -0.5 15.3
PA 316561 3.0 25135 2.2 -0.8 7.9 470746 3.7 83452 3.0 -0.7 17.7
MS 116270 1.1 9101 0.8 -0.3 7.8 110739 0.9 13511 0.5 -0.4 12.2
FL 732661 6.9 54541 4.7 -2.2 7.4 741244 5.8 193899 7.0 1.2 26.2
WV 63055 0.6 4684 0.4 -0.2 7.4 77165 0.6 10655 0.4 -0.2 13.8
RI 20526 0.2 1394 0.1 -0.1 6.8 37527 0.3 5808 0.2 -0.1 15.5
SC 206360 1.9 13352 1.2 -0.7 6.5 196829 1.5 29180 1.1 -0.4 14.8
ME 34159 0.3 2168 0.2 -0.1 6.3 49107 0.4 8415 0.3 -0.1 17.1
AL 180635 1.7 10815 0.9 -0.8 6.0 168859 1.3 29486 1.1 -0.2 17.5
OK 140905 1.3 7891 0.7 -0.6 5.6 146710 1.2 26871 1.0 -0.2 18.3
NV 41211 0.4 2325 0.2 -0.2 5.6 129272 1.0 24043 0.9 -0.1 18.6
HI 50158 0.5 2745 0.2 -0.3 5.5 47983 0.4 6682 0.2 -0.2 13.9
DE 27634 0.3 1526 0.1 -0.2 5.5 32750 0.3 6370 0.2 -0.1 19.5
MI 366885 3.5 19588 1.7 -1.8 5.3 360887 2.8 71143 2.6 -0.2 19.7
CA 628042 5.9 31127 2.7 -3.2 5.0 1671322 13.2 414824 15.0 1.8 24.8
GA 470508 4.4 19664 1.7 -2.7 4.2 479569 3.8 114489 4.1 0.3 23.9
MD 230390 2.2 6550 0.6 -1.6 2.8 245917 1.9 71071 2.6 0.7 28.9
MA 129971 1.2 3077 0.3 -0.9 2.4 256278 2.0 54873 2.0 0.0 21.4
DC 2423 0.0 37 0.0 0.0 1.5 14377 0.1 4107 0.1 0.0 28.6

Visualizing AP and DE Participation Rates by State

In [38]:
plt.figure(figsize=(6,6))
plt.scatter(x=state_enrollments['DE Participation Rate'], y=state_enrollments['AP Participation Rate'])
plt.ylim([0,30])
plt.xlim([0,30])
plt.ylabel('%High School Students in State Taking AP')
plt.xlabel('%High School Students in State Taking DE')
plt.yticks(np.arange(0,35,5))
plt.xticks(np.arange(0,35,5))
plt.title('States: AP v DE Participation Rates')
plt.show()

By Region (Accreditation)

- Regions are broken down according to the regional accreditation guidelines.

    - Higher Learning Commission (HLC): Arkansas, Arizona, Colorado, Iowa, Illinois, Indiana, Kansas, Michigan,
      Minnesota, Missouri, North Dakota, Nebraska, New Mexico, Ohio, Oklahoma, South Dakota, Wisconsin, 
      West Virginia, and Wyoming. 

    - Middle States Commission on Higher Education (MSCHE): New York, New Jersey, Pennsylvania, Delaware, 
      Maryland, the District of Columbia.

    - New England Association of Schools and Colleges (NEASC): Connecticut, Maine, Massachusetts, New Hampshire,
      Rhode Island, and Vermont.

    - Northwest Commission on Colleges and Universities (NWCCU): Alaska, Idaho, Montana, Nevada, Oregon, 
      Utah, and Washington. 

    - Southern Association of Colleges and Schools (SACS): Alabama, Florida, Georgia, Kentucky, 
      Louisiana, Mississippi, North Carolina, South Carolina, Tennessee, Texas and Virginia.

    - Western Association of Schools and Colleges (WASC): Hawaii, California 
In [39]:
region_enrollment = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'region_accred')
region_enrollment.index.name = 'Region'
region_enrollment
Out[39]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Region
HLC 3388407 32.0 462600 40.2 8.2 13.7 3399036 26.8 685449 24.8 -2.0 20.2
MSCHE 1285526 12.1 148130 12.9 0.8 11.5 1863808 14.7 391457 14.2 -0.5 21.0
NEASC 348586 3.3 26730 2.3 -1.0 7.7 568727 4.5 113548 4.1 -0.4 20.0
NWCCU 652536 6.2 124488 10.8 4.6 19.1 776102 6.1 163451 5.9 -0.2 21.1
SACS 4232229 40.0 356015 30.9 -9.1 8.4 4372461 34.4 984399 35.7 1.3 22.5
WASC 678200 6.4 33872 2.9 -3.5 5.0 1719305 13.5 421506 15.3 1.8 24.5
In [40]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = region_enrollment.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -29, pctdistance=1.25, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = region_enrollment.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by Region (Accreditation)')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = region_enrollment.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = 11, pctdistance=1.25, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = region_enrollment.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by Region (Accreditation)')
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.show()

By Region (Census)

- Regions are broken down according to the regional accreditation guidelines.

    - New England - Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont
    - Mid-Atlantic - New Jersey, New York, and Pennsylvania
    - East North Central - Illinois, Indiana, Michigan, Ohio, and Wisconsin
    - West North Central - Iowa, Kansas, Minnesota, Missouri, Nebraska, North Dakota, and South Dakota
    - South Atlantic - Delaware, Florida, Georgia, Maryland, North Carolina, South Carolina, 
      Virginia, District of Columbia, and West Virginia
    - East South Central - Alabama, Kentucky, Mississippi, and Tennessee
    - West South Central - Arkansas, Louisiana, Oklahoma, and Texas
    - Mountain - Arizona, Colorado, Idaho, Montana, Nevada, New Mexico, Utah, and Wyoming
    - Pacific - Alaska, California, Hawaii, Oregon, and Washington
In [41]:
region_enrollment_census = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'region_census')
region_enrollment_census.index.name = 'Region'
region_enrollment_census
Out[41]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Region
East North Central 1758822 16.6 234008 20.3 3.7 13.3 1788448 14.1 362416 13.1 -1.0 20.3
East South Central 716255 6.8 58805 5.1 -1.7 8.2 683688 5.4 121289 4.4 -1.0 17.7
Middle Atlantic 1025079 9.7 140017 12.2 2.5 13.7 1570764 12.4 309909 11.2 -1.2 19.7
Mountain 787034 7.4 107927 9.4 2.0 13.7 934100 7.4 195539 7.1 -0.3 20.9
New England 348586 3.3 26730 2.3 -1.0 7.7 568727 4.5 113548 4.1 -0.4 20.0
Pacific 1057074 10.0 114423 9.9 -0.1 10.8 2140244 16.9 513647 18.6 1.7 24.0
South Atlantic 2379099 22.5 161634 14.0 -8.5 6.8 2577008 20.3 591640 21.4 1.1 23.0
West North Central 814128 7.7 138657 12.0 4.3 17.0 683358 5.4 131430 4.8 -0.6 19.2
West South Central 1699407 16.1 169634 14.7 -1.4 10.0 1753102 13.8 420392 15.2 1.4 24.0
In [42]:
f, (ax1,ax2) = plt.subplots(2, 1, figsize = (10,10))

plt.sca(ax1)
a1 = region_enrollment_census.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -29, pctdistance=1.2, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = region_enrollment_census.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by Region (Census)', y = 1.1)
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = region_enrollment_census.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = 0, pctdistance=1.2, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = region_enrollment_census.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by Region (Census)', y = 1.1)
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.tight_layout(pad= 1.5, h_pad = 5)
plt.show()

By Region (NACEP)

- Regions are broken down according to the regional accreditation guidelines.
    - 1 - New York, New Jersey, Pennslyvania, Delware, Maryland, Washington DC, Connecticut, Maine,
          Massachusettes, New Hampshire, Rhode Island, Vermont, Virginia
    - 2 - Michigan, Indiana, Ohio, West Virigina, Kentukcy, Tennessee, North Carolina, South Carolina,
          Alabama, Mississippi, Georgia, Florida
    - 3 - Illinois, Missouri, Arkansas, Louisiana, Oklahoma, Kansas, Texas
    - 4 - Montana, Idaho, Wyoming, North Dakota, South Dakota, Nebraska, Iowa, Minnesota, Wisconsin
    - 5 - Oregan, Washington, California, Nevada, Utah, Arizona, Colorado, New Mexico, Alaska, Hawaii
In [43]:
region_enrollment_nacep = by_offering_enrollment_compiler(crdc_1516_deYes, crdc_1516_apYes, 'region_nacep')
region_enrollment_nacep.index.name = 'Region'
region_enrollment_nacep
Out[43]:
HS Students in DE Offering %HS Students in DE Offering DE Students %Total DE Students DE Gap DE Participation Rate HS Students in AP Offering %HS Students in AP Offering AP Students %Total AP Students AP Gap AP Participation Rate
Region
1 1959632 18.5 206385 17.9 -0.6 10.5 2798872 22.0 593233 21.5 -0.5 21.2
2 3579988 33.8 319766 27.8 -6.0 8.9 3627674 28.6 727058 26.3 -2.3 20.0
3 2525277 23.9 282221 24.5 0.6 11.2 2566865 20.2 595750 21.6 1.4 23.2
4 801446 7.6 144552 12.5 4.9 18.0 735382 5.8 152192 5.5 -0.3 20.7
5 1719141 16.2 198911 17.3 1.1 11.6 2970646 23.4 691577 25.1 1.7 23.3
In [44]:
f, (ax1,ax2) = plt.subplots(2,1, figsize = (10,10))

plt.sca(ax1)
a1 = region_enrollment_nacep.plot.pie(y = 'DE Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -29, pctdistance=1.2, labels = None, fontsize = 13, ax=ax1)
plt.legend(labels = region_enrollment_nacep.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total DE Enrollment by Region (NACEP)', y=1.1)
centre_circle = plt.Circle((0,0),0.6,fc='white')
a1.add_artist(centre_circle)
a1.axis('equal')

plt.sca(ax2)
a2 = region_enrollment_nacep.plot.pie(y = 'AP Students',
                        autopct='%1.1f%%', #explode = [.05 for i in range(len(eth_enrollments))],
                        startangle = -29, pctdistance=1.2, labels = None, fontsize = 13, ax=ax2)
plt.legend(labels = region_enrollment_nacep.index,
           bbox_to_anchor = (1,0.71), title = 'Regions',
          frameon=True)
plt.ylabel('')
plt.title('Percentage of Total AP Enrollment by Region (NACEP)', y=1.1)
centre_circle = plt.Circle((0,0),0.6,fc='white')
a2.add_artist(centre_circle)
a2.axis('equal')
plt.tight_layout(h_pad=5)
plt.show()