{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "\n", "# Let's read in the data file\n", "df = pd.read_excel('../data/mdcps/DADE_SchoolGrades17.xls', header = None)\n", "# df.set_index(df.iloc[3])\n", "df = df[4:]\n", "df.columns = df.iloc[0]\n", "df = df[1:]\n", "# df.columns" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df2 = pd.DataFrame(df, columns = ['District Number', 'District Name', 'School Number', 'School Name',\n", " 'English Language Arts Achievement',\n", " 'English Language Arts Learning Gains',\n", " 'English Language Arts Learning Gains of the Lowest 25%',\n", " 'Mathematics Achievement', 'Mathematics Learning Gains',\n", " 'Mathematics Learning Gains of the Lowest 25%', 'Science Achievement',\n", " 'Social Studies Achievement', 'Middle School Acceleration',\n", " 'Graduation Rate 2015-16', 'College and Career Acceleration 2015-16',\n", " 'Total Points Earned', 'Total Components',\n", " 'Percent of Total Possible Points', 'Percent Tested', 'Grade 2017',\n", " 'Grade 2016', 'Informational Baseline Grade 2015', 'Grade 2014',\n", " 'Grade 2013', 'Grade 2012', 'Grade 2011', 'Grade 2010', 'Grade 2009',\n", " 'Grade 2008', 'Grade 2007', 'Grade 2006', 'Grade 2005', 'Grade 2004',\n", " 'Grade 2003', 'Grade 2002', 'Grade 2001', 'Grade 2000', 'Grade 1999',\n", " 'Was the collocated rule used?', 'Collocated Number', 'Charter School',\n", " 'Title I', 'Alternative/ESE Center School', 'School Type',\n", " 'Percent of Minority Students',\n", " 'Percent of Economically Disadvantaged Students', 'Region'])\n", "# df2.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x = np.array(df2['English Language Arts Achievement'])\n", "y = np.array(df2['Social Studies Achievement'])\n", "z = np.array(df2['Mathematics Achievement'])\n", "w= np.array(df2['Science Achievement'])\n", "colors = ['green']*(len(x)-1)\n", "# colors.append('red')\n", "\n", "plt.figure()\n", "plt.scatter(z, w, s=100, c=colors) # Math & Science" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.scatter(x, y, s=100, c=colors) # English & Social Studies" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.scatter(x, z, s=100, c=colors) # English & Math" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.scatter(y, w, s=100, c=colors) # Science & Social Studies" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 2 }