-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8aa86e
commit d6c7d67
Showing
5 changed files
with
367 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,9 @@ | |
}, | ||
"source": [ | ||
"show_input: hide\n", | ||
"github: \n", | ||
"featured_image: 189\n", | ||
"github: https://github.com/CivicKnowledge/insights.civicknowledge.com/blob/master/education/SchoolVsEnrollmentDemo.ipynb\n", | ||
"featured_image: 186\n", | ||
"identifier: 95089b65-d12e-491e-96f8-3f71b85bf967\n", | ||
"authors:\n", | ||
"- email: [email protected]\n", | ||
" name: Eric Busboom\n", | ||
|
@@ -41,12 +42,33 @@ | |
] | ||
}, | ||
"source": [ | ||
"Description\n" | ||
"A descriptive analysis of the differences between the demographics of schools versus the schools' enrollment areas, for schools in the San Diego Unified district. \n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Since [at least the early 1980's](https://www.csmonitor.com/1981/0330/033025.html), San Diego unified has pursued a voluntary busing policy for desegregating neighborhood schools. The core of that policy is Magnet Schools, high-quality schools oriented around specific topics or educational goals, which were preferentially situated in lower-income and minority neighborhoods. Along with a generous city-wide busing program, the magnet schools would encourage higher-income families to voluntarily send their children to schools in lower income areas. The District also made it easier for lower-income parents to send their children to schools in higher-income neighborhoods. \n", | ||
"\n", | ||
"The result of these policies should be a general disparity between the demographics of school enrollment areas and the schools in the areas. This analysis demonstrates several of the datasets in the [Data Library's education collection](https://data.sandiegodata.org/collections/california-department-of-education/) with maps of the demographics of San Diego Unified schools and the school enrollment zones. \n", | ||
"\n", | ||
"The main datasets we'll be using are: \n", | ||
"\n", | ||
"* [San Diego Unified School Enrollment Boundaries](https://data.sandiegodata.org/dataset/sandiegounified-org-enrollment-zones-2014/). Geographic boundaries for schools in the San Diego Unified school district\n", | ||
"* [Enrollment by School](https://data.sandiegodata.org/dataset/cde-ca-gov-enrollment/). School-level enrollment by racial/ethnic designation, gender, and grade for California schools\n", | ||
"* [San Diego Planning Database](https://data.sandiegodata.org/dataset/sandiegodata-org-planning/). A selection of Census and ACS demographics for San Diego county tracts. \n", | ||
"\n", | ||
"An important component of the analysis to a school enrollment zone to tract crosswalk in the [San Diego Unified School Enrollment Boundaries](https://data.sandiegodata.org/dataset/sandiegounified-org-enrollment-zones-2014/) dataset. This crosswalk has, for each tract in San Diego, the portion of the tract that is in each school enrollment zone that the tract overlaps. These proportions can be multiplied by demographic counts and summed to generate census statistics for the school enrollment zone. \n", | ||
"\n", | ||
"( Caveat: we'll be using demographic values from the American Community Survey, which have a sampling error. We're ignoring that error, because it is hard to include in vizualizations, but if we were doing ranking or numerical comparisons, it would be important to include these errors. ) \n", | ||
"\n", | ||
"If you'd like to see how the whole process works, see the [Jupyter notebook available at the link above](https://github.com/CivicKnowledge/insights.civicknowledge.com/blob/master/education/SchoolVsEnrollmentDemo.ipynb). \n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"execution_count": 12, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -76,7 +98,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 12, | ||
"execution_count": 13, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -101,7 +123,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -138,7 +160,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 13, | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -163,215 +185,9 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 14, | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>0</th>\n", | ||
" <th>1</th>\n", | ||
" <th>2</th>\n", | ||
" <th>3</th>\n", | ||
" <th>4</th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>cdscode</th>\n", | ||
" <td>37683386039101</td>\n", | ||
" <td>37683386039119</td>\n", | ||
" <td>37683386039135</td>\n", | ||
" <td>37683386039143</td>\n", | ||
" <td>37683386039150</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>school</th>\n", | ||
" <td>Adams Elementary</td>\n", | ||
" <td>Alcott Elementary</td>\n", | ||
" <td>Angier Elementary</td>\n", | ||
" <td>Audubon K-8</td>\n", | ||
" <td>Baker Elementary</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>group</th>\n", | ||
" <td>ELEM</td>\n", | ||
" <td>ELEM</td>\n", | ||
" <td>ELEM</td>\n", | ||
" <td>ELEM</td>\n", | ||
" <td>ELEM</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>geometry</th>\n", | ||
" <td>POLYGON ((-117.112769590475 32.76521105221657,...</td>\n", | ||
" <td>POLYGON ((-117.2058996539639 32.8308577600889,...</td>\n", | ||
" <td>POLYGON ((-117.1401186688951 32.8082601889782,...</td>\n", | ||
" <td>POLYGON ((-117.0223109888198 32.70982950149916...</td>\n", | ||
" <td>POLYGON ((-117.1023867589912 32.69688673491444...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>zone_white</th>\n", | ||
" <td>0.501588</td>\n", | ||
" <td>0.708643</td>\n", | ||
" <td>0.413658</td>\n", | ||
" <td>0.0979887</td>\n", | ||
" <td>0.0345033</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>zone_asian</th>\n", | ||
" <td>0.0450396</td>\n", | ||
" <td>0.0428193</td>\n", | ||
" <td>0.142196</td>\n", | ||
" <td>0.116245</td>\n", | ||
" <td>0.0177938</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>zone_hisp</th>\n", | ||
" <td>0.316608</td>\n", | ||
" <td>0.191585</td>\n", | ||
" <td>0.227588</td>\n", | ||
" <td>0.535897</td>\n", | ||
" <td>0.78799</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>zone_population</th>\n", | ||
" <td>10632.8</td>\n", | ||
" <td>6041.83</td>\n", | ||
" <td>3554.03</td>\n", | ||
" <td>7581.99</td>\n", | ||
" <td>4260.03</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>school_white</th>\n", | ||
" <td>0.0742049</td>\n", | ||
" <td>0.41206</td>\n", | ||
" <td>0.210721</td>\n", | ||
" <td>0.0282609</td>\n", | ||
" <td>0.0366133</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>school_asian</th>\n", | ||
" <td>0.0141343</td>\n", | ||
" <td>0.0150754</td>\n", | ||
" <td>0.0499076</td>\n", | ||
" <td>0.0195652</td>\n", | ||
" <td>0.00686499</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>school_hisp</th>\n", | ||
" <td>0.763251</td>\n", | ||
" <td>0.437186</td>\n", | ||
" <td>0.247689</td>\n", | ||
" <td>0.758696</td>\n", | ||
" <td>0.842105</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>school_population</th>\n", | ||
" <td>283</td>\n", | ||
" <td>199</td>\n", | ||
" <td>541</td>\n", | ||
" <td>460</td>\n", | ||
" <td>437</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" 0 \\\n", | ||
"cdscode 37683386039101 \n", | ||
"school Adams Elementary \n", | ||
"group ELEM \n", | ||
"geometry POLYGON ((-117.112769590475 32.76521105221657,... \n", | ||
"zone_white 0.501588 \n", | ||
"zone_asian 0.0450396 \n", | ||
"zone_hisp 0.316608 \n", | ||
"zone_population 10632.8 \n", | ||
"school_white 0.0742049 \n", | ||
"school_asian 0.0141343 \n", | ||
"school_hisp 0.763251 \n", | ||
"school_population 283 \n", | ||
"\n", | ||
" 1 \\\n", | ||
"cdscode 37683386039119 \n", | ||
"school Alcott Elementary \n", | ||
"group ELEM \n", | ||
"geometry POLYGON ((-117.2058996539639 32.8308577600889,... \n", | ||
"zone_white 0.708643 \n", | ||
"zone_asian 0.0428193 \n", | ||
"zone_hisp 0.191585 \n", | ||
"zone_population 6041.83 \n", | ||
"school_white 0.41206 \n", | ||
"school_asian 0.0150754 \n", | ||
"school_hisp 0.437186 \n", | ||
"school_population 199 \n", | ||
"\n", | ||
" 2 \\\n", | ||
"cdscode 37683386039135 \n", | ||
"school Angier Elementary \n", | ||
"group ELEM \n", | ||
"geometry POLYGON ((-117.1401186688951 32.8082601889782,... \n", | ||
"zone_white 0.413658 \n", | ||
"zone_asian 0.142196 \n", | ||
"zone_hisp 0.227588 \n", | ||
"zone_population 3554.03 \n", | ||
"school_white 0.210721 \n", | ||
"school_asian 0.0499076 \n", | ||
"school_hisp 0.247689 \n", | ||
"school_population 541 \n", | ||
"\n", | ||
" 3 \\\n", | ||
"cdscode 37683386039143 \n", | ||
"school Audubon K-8 \n", | ||
"group ELEM \n", | ||
"geometry POLYGON ((-117.0223109888198 32.70982950149916... \n", | ||
"zone_white 0.0979887 \n", | ||
"zone_asian 0.116245 \n", | ||
"zone_hisp 0.535897 \n", | ||
"zone_population 7581.99 \n", | ||
"school_white 0.0282609 \n", | ||
"school_asian 0.0195652 \n", | ||
"school_hisp 0.758696 \n", | ||
"school_population 460 \n", | ||
"\n", | ||
" 4 \n", | ||
"cdscode 37683386039150 \n", | ||
"school Baker Elementary \n", | ||
"group ELEM \n", | ||
"geometry POLYGON ((-117.1023867589912 32.69688673491444... \n", | ||
"zone_white 0.0345033 \n", | ||
"zone_asian 0.0177938 \n", | ||
"zone_hisp 0.78799 \n", | ||
"zone_population 4260.03 \n", | ||
"school_white 0.0366133 \n", | ||
"school_asian 0.00686499 \n", | ||
"school_hisp 0.842105 \n", | ||
"school_population 437 " | ||
] | ||
}, | ||
"execution_count": 14, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"outputs": [], | ||
"source": [ | ||
"##\n", | ||
"## Merge into one dataframe\n", | ||
|
@@ -381,7 +197,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 15, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -393,7 +209,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"execution_count": 7, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -408,7 +224,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"execution_count": 8, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -456,9 +272,23 @@ | |
" f.tight_layout()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Results\n", | ||
"\n", | ||
"The results of the analysis are shown in groups of three maps, one set for each race/ethnicity of non-hispanic white, non-hispanic asian, and hispanics. The first map in each group is the portion ( from 0 to 1 ) of the total population of the given race/ethnicity. The second is that portion of the school population for that race/ethnicity. The third map is of the absolute difference between the values of the first two maps. \n", | ||
"\n", | ||
"More caveats:\n", | ||
"* The populations in the first maps are for the total population in the enrollment zone, not the population of school-aged children. \n", | ||
"* Each of the three maps map have a different scale. The values associated with a color in the first two maps will be close, but not the same. \n", | ||
"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 18, | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
|
@@ -481,7 +311,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 19, | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
|
@@ -503,7 +333,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 20, | ||
"execution_count": 11, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
|
@@ -548,9 +378,9 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.3" | ||
"version": "3.6.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
"nbformat_minor": 4 | ||
} |
Oops, something went wrong.