Queer European MD passionate about IT
Browse Source

Add titles

Vik Paruchuri 8 years ago
parent
commit
21b88534a7
2 changed files with 130 additions and 10 deletions
  1. 65 5
      Mission218Solutions.ipynb
  2. 65 5
      Mission219Solution.ipynb

+ 65 - 5
Mission218Solutions.ipynb

@@ -7,6 +7,13 @@
     "# US Gun Deaths Guided Project Solutions"
     "# US Gun Deaths Guided Project Solutions"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Introducing US Gun Deaths Data"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 30,
    "execution_count": 30,
@@ -41,6 +48,13 @@
     "print(data[:5])"
     "print(data[:5])"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Removing Headers From A List Of Lists"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 32,
    "execution_count": 32,
@@ -64,6 +78,13 @@
     "print(data[:5])"
     "print(data[:5])"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Counting Gun Deaths By Year"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 33,
    "execution_count": 33,
@@ -94,6 +115,13 @@
     "year_counts   "
     "year_counts   "
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Exploring Gun Deaths By Month And Year"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 34,
    "execution_count": 34,
@@ -187,6 +215,13 @@
     "date_counts"
     "date_counts"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Exploring Gun Deaths By Race And Sex"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 54,
    "execution_count": 54,
@@ -258,6 +293,13 @@
     "There appears to be a minor seasonal correlation, with gun deaths peaking in the summer and declining in the winter.  It might be useful to filter by intent, to see if different categories of intent have different correlations with season, race, or gender."
     "There appears to be a minor seasonal correlation, with gun deaths peaking in the summer and declining in the winter.  It might be useful to filter by intent, to see if different categories of intent have different correlations with season, race, or gender."
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Reading In A Second Dataset"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 57,
    "execution_count": 57,
@@ -319,6 +361,13 @@
     "census"
     "census"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Computing Rates Of Gun Deaths Per Race"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 40,
    "execution_count": 40,
@@ -357,6 +406,13 @@
     "race_per_hundredk"
     "race_per_hundredk"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Filtering By Intent"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 41,
    "execution_count": 41,
@@ -414,21 +470,25 @@
  ],
  ],
  "metadata": {
  "metadata": {
   "kernelspec": {
   "kernelspec": {
-   "display_name": "Python 3",
+   "display_name": "Python 2",
    "language": "python",
    "language": "python",
-   "name": "python3"
+   "name": "python2"
   },
   },
   "language_info": {
   "language_info": {
    "codemirror_mode": {
    "codemirror_mode": {
     "name": "ipython",
     "name": "ipython",
-    "version": 3
+    "version": 2
    },
    },
    "file_extension": ".py",
    "file_extension": ".py",
    "mimetype": "text/x-python",
    "mimetype": "text/x-python",
    "name": "python",
    "name": "python",
    "nbconvert_exporter": "python",
    "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.4.2"
+   "pygments_lexer": "ipython2",
+   "version": "2.7.9"
+  },
+  "widgets": {
+   "state": {},
+   "version": "1.1.1"
   }
   }
  },
  },
  "nbformat": 4,
  "nbformat": 4,

+ 65 - 5
Mission219Solution.ipynb

@@ -1,5 +1,12 @@
 {
 {
  "cells": [
  "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Introducing Thanksgiving Dinner Data"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 39,
    "execution_count": 39,
@@ -383,6 +390,13 @@
     "data.columns"
     "data.columns"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Filtering Out Rows From A DataFrame"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 41,
    "execution_count": 41,
@@ -418,6 +432,13 @@
     "data = data[data[\"Do you celebrate Thanksgiving?\"] == \"Yes\"]"
     "data = data[data[\"Do you celebrate Thanksgiving?\"] == \"Yes\"]"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Using value_counts To Explore Main Dishes"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 43,
    "execution_count": 43,
@@ -490,6 +511,13 @@
     "data[data[\"What is typically the main dish at your Thanksgiving dinner?\"] == \"Tofurkey\"][\"Do you typically have gravy?\"]"
     "data[data[\"What is typically the main dish at your Thanksgiving dinner?\"] == \"Tofurkey\"][\"Do you typically have gravy?\"]"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Figuring Out What Pies People Eat"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 51,
    "execution_count": 51,
@@ -544,6 +572,13 @@
     "ate_pies.value_counts()"
     "ate_pies.value_counts()"
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Converting Age To Numeric"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 45,
    "execution_count": 45,
@@ -625,6 +660,13 @@
     "Although we only have a rough approximation of age, and it skews downward because we took the first value in each string (the lower bound), we can see that that age groups of respondents are fairly evenly distributed."
     "Although we only have a rough approximation of age, and it skews downward because we took the first value in each string (the lower bound), we can see that that age groups of respondents are fairly evenly distributed."
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Converting Income To Numeric"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 47,
    "execution_count": 47,
@@ -716,6 +758,13 @@
     "Although we only have a rough approximation of income, and it skews downward because we took the first value in each string (the lower bound), the average income seems to be fairly high, although there is also a large standard deviation."
     "Although we only have a rough approximation of income, and it skews downward because we took the first value in each string (the lower bound), the average income seems to be fairly high, although there is also a large standard deviation."
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Correlating Travel Distance And Income"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 49,
    "execution_count": 49,
@@ -777,6 +826,13 @@
     "It appears that more people with high income have Thanksgiving at home than people with low income.  This may be because younger students, who don't have a high income, tend to go home, whereas parents, who have higher incomes, don't."
     "It appears that more people with high income have Thanksgiving at home than people with low income.  This may be because younger students, who don't have a high income, tend to go home, whereas parents, who have higher incomes, don't."
    ]
    ]
   },
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Linking Friendship And Age"
+   ]
+  },
   {
   {
    "cell_type": "code",
    "cell_type": "code",
    "execution_count": 53,
    "execution_count": 53,
@@ -907,21 +963,25 @@
  ],
  ],
  "metadata": {
  "metadata": {
   "kernelspec": {
   "kernelspec": {
-   "display_name": "Python 3",
+   "display_name": "Python 2",
    "language": "python",
    "language": "python",
-   "name": "python3"
+   "name": "python2"
   },
   },
   "language_info": {
   "language_info": {
    "codemirror_mode": {
    "codemirror_mode": {
     "name": "ipython",
     "name": "ipython",
-    "version": 3
+    "version": 2
    },
    },
    "file_extension": ".py",
    "file_extension": ".py",
    "mimetype": "text/x-python",
    "mimetype": "text/x-python",
    "name": "python",
    "name": "python",
    "nbconvert_exporter": "python",
    "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.4.2"
+   "pygments_lexer": "ipython2",
+   "version": "2.7.9"
+  },
+  "widgets": {
+   "state": {},
+   "version": "1.1.1"
   }
   }
  },
  },
  "nbformat": 4,
  "nbformat": 4,