Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Amtrak Delays.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/IreneCrisologo/1f263419263d905e763c029df26ad2ef/amtrak-delays.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"id": "69f8137d",
"metadata": {
"id": "69f8137d"
},
"source": [
"# Are Amtrak trains always late?\n",
"\n",
"Short answer: no!\n",
"\n",
"I took the train from Chicago going to and from New Orleans to attend AGU 2021, and experienced a 6-hour and a 3-hour delay, respectively. Given that there was a tornado that ploughed through the train route, I wasn't too bothered about it. But I've heard several complaints about Amtrak being always late, so I wanted to check the data and see for myself. This analysis is also inspired by a tweet from @douglas_rao https://twitter.com/douglas_rao/status/1469863061494272001\n",
"\n",
"Data from https://juckins.net/amtrak_status/archive/html/home.php\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ccbeab73",
"metadata": {
"id": "ccbeab73"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import os\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"id": "d5afa0f9",
"metadata": {
"id": "d5afa0f9"
},
"source": [
"## Part 1: Chicago to New Orleans"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9e06d0be",
"metadata": {
"id": "9e06d0be"
},
"outputs": [],
"source": [
"df = pd.read_excel('AmtrakDelays_CHI_NOL.xlsx')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "55f5ceb1",
"metadata": {
"id": "55f5ceb1",
"outputId": "6742dbf2-bea4-4580-fa1b-b4cae3714db1"
},
"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>Origin Date</th>\n",
" <th>Station</th>\n",
" <th>Sch Ar</th>\n",
" <th>Act Ar</th>\n",
" <th>Comments</th>\n",
" <th>Ar Delay (mins)</th>\n",
" <th>Service Disruption</th>\n",
" <th>Cancellations</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>06/27/2015 (Sa)</td>\n",
" <td>NOL</td>\n",
" <td>06/28/2015 3:32 PM (Su)</td>\n",
" <td>3:12AM</td>\n",
" <td>Ar: 11 hr, 40 min late.</td>\n",
" <td>700</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>06/27/2015 (Sa)</td>\n",
" <td>GWD</td>\n",
" <td>06/28/2015 9:00 AM (Su)</td>\n",
" <td>7:10PM</td>\n",
" <td>Ar: 10 hr, 10 min late | Dp: 10 hr, 17 min late.</td>\n",
" <td>610</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>06/27/2015 (Sa)</td>\n",
" <td>JAN</td>\n",
" <td>06/28/2015 11:12 AM (Su)</td>\n",
" <td>9:11PM</td>\n",
" <td>Ar: 9 hr, 59 min late. | Dp: 10 hr, 41 min late.</td>\n",
" <td>599</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>04/29/2017 (Sa)</td>\n",
" <td>NOL</td>\n",
" <td>04/30/2017 3:32 PM (Su)</td>\n",
" <td>1:19AM</td>\n",
" <td>Ar: 9 hr, 47 min late.</td>\n",
" <td>587</td>\n",
" <td>SD</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>06/27/2015 (Sa)</td>\n",
" <td>MEM</td>\n",
" <td>06/28/2015 6:27 AM (Su)</td>\n",
" <td>4:05PM</td>\n",
" <td>Ar: 9 hr, 38 min late. | Dp: 9 hr, 48 min late.</td>\n",
" <td>578</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Origin Date Station Sch Ar Act Ar \\\n",
"0 06/27/2015 (Sa) NOL 06/28/2015 3:32 PM (Su) 3:12AM \n",
"1 06/27/2015 (Sa) GWD 06/28/2015 9:00 AM (Su) 7:10PM \n",
"2 06/27/2015 (Sa) JAN 06/28/2015 11:12 AM (Su) 9:11PM \n",
"3 04/29/2017 (Sa) NOL 04/30/2017 3:32 PM (Su) 1:19AM \n",
"4 06/27/2015 (Sa) MEM 06/28/2015 6:27 AM (Su) 4:05PM \n",
"\n",
" Comments Ar Delay (mins) \\\n",
"0 Ar: 11 hr, 40 min late. 700 \n",
"1 Ar: 10 hr, 10 min late | Dp: 10 hr, 17 min late. 610 \n",
"2 Ar: 9 hr, 59 min late. | Dp: 10 hr, 41 min late. 599 \n",
"3 Ar: 9 hr, 47 min late. 587 \n",
"4 Ar: 9 hr, 38 min late. | Dp: 9 hr, 48 min late. 578 \n",
"\n",
" Service Disruption Cancellations \n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"2 NaN NaN \n",
"3 SD NaN \n",
"4 NaN NaN "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "markdown",
"id": "cc29268c",
"metadata": {
"id": "cc29268c"
},
"source": [
"Rename column for easier referencing."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ac198ddb",
"metadata": {
"id": "ac198ddb"
},
"outputs": [],
"source": [
"df = df.rename(columns={'Ar Delay (mins)':'Ar_Delay_mins'})"
]
},
{
"cell_type": "markdown",
"id": "4f917269",
"metadata": {
"id": "4f917269"
},
"source": [
"Checking for NaN values."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "93a4272c",
"metadata": {
"id": "93a4272c",
"outputId": "38bf64bb-ddb9-4115-df2f-2a550deb3bc0"
},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Ar_Delay_mins'].isna().sum()"
]
},
{
"cell_type": "markdown",
"id": "f3f9c05c",
"metadata": {
"id": "f3f9c05c"
},
"source": [
"Counting how many datapoints are recorded for each station."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bd5d3dc7",
"metadata": {
"id": "bd5d3dc7",
"outputId": "9e5b7c13-2959-413a-a630-c952ab3df124"
},
"outputs": [
{
"data": {
"text/plain": [
"NOL 3533\n",
"CDL 2207\n",
"GWD 2195\n",
"MEM 2188\n",
"JAN 2171\n",
"MCB 367\n",
"HAZ 76\n",
"CEN 64\n",
"YAZ 34\n",
"NBN 31\n",
"HMW 30\n",
"BRH 27\n",
"MKS 25\n",
"FTN 25\n",
"EFG 24\n",
"MAT 22\n",
"KKI 21\n",
"CHM 20\n",
"HMD 12\n",
"Name: Station, dtype: int64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Station'].value_counts()"
]
},
{
"cell_type": "markdown",
"id": "f9c480ef",
"metadata": {
"id": "f9c480ef"
},
"source": [
"Looks like most of the reports come from 5 stations (New Orleans LA, Carbondale IL, Greenwood MI, Memphis TN, Jackson MI) so i'm only going to process those."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3c816ddc",
"metadata": {
"id": "3c816ddc"
},
"outputs": [],
"source": [
"df = df[df['Station'].isin(['NOL','CDL','MEM','GWD','JAN'])]"
]
},
{
"cell_type": "markdown",
"id": "cbf96d04",
"metadata": {
"id": "cbf96d04"
},
"source": [
"Let's look at the histogram of delays, converting minutes to hours."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4d411fbe",
"metadata": {
"id": "4d411fbe",
"outputId": "8043a1b2-b249-4ed7-e0b9-f70247937197"
},
"outputs": [
{
"data": {
"text/plain": [
"Text(0.0, 1.0, 'Amtrak City of New Orleans (Southbound) is not always late')"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAFPCAYAAADjktLUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAsYUlEQVR4nO3debgkVX3w8e8PUBEVBBkIAXTQAAIJDDgQl1dFROVVI25EjAsYlWiQSDRPBPRVNJLo6yuGBFEQcXBBxAUhEVkE0RhlE5F9C4wyzMggiyzisP3eP85ppujpvrf7zu1bd/l+nuc+t+vUqapTp6uqf33OqerITCRJktSeNdougCRJ0lxnQCZJktQyAzJJkqSWGZBJkiS1zIBMkiSpZQZkkiRJLZtVAVlEHBsRGRGHj2j9h0bEbiNad0bEx1dj+edExEkRsTQi7o+I2yLirIjYJyLWrHn2rduZ31huZPs0YJnPj4h7a7kW9MnXKfedEbF+17y16rxDp6LMY4mIrSPi+Ii4ub4HN0fEVyJi6yHXMy32Z3VExLMi4vcRsWkjbd2I+GhEXFnf8zsi4rKIODoiNhphWQ6MiNf2SD+01vVa4yy/a823+6jKOCrdx1JE/H1EXBoR4177I2J+XX7fUZZxWBGxoL53G0zyemf8eQcQEYsiYvEElhtJvWpwsyYgi4jHA3vVyTeNd5GdoI8ArQQvY4mIA4H/BjYAPgDsDvw1cC3wOeCVNev3gOcAyxqLt7lPXwTWAv6CUq5rx8m/HmX/pp36YX0xsANwCOU9OBjYDrh4Jn6Yr6ZPAcdl5s0A9UvBD4B3U973VwH7AF8Hngv88QjLciCwSkA2R30e2IhS9+NZRjkvvzfSEg1vAeW6ZeAwuRZgvbZqFEFL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874CvInyw9R/DZCZJ0TE+cArgDMi4h2Zec4YRVrReP0QsEqXZVe+h7uWeZje19N+632QlT0Ua49RrgBel5nXdKVfNeT+SZrm7LKUNKUiYh7weeDILD+mewbw7oh4TJ2/Ve2Wa1oPWJaZD1N+7HzNxrxFwIFQfgy4ruPpwA2Z+W/AqcD2I9uhiVkMPKu+fn0j/W7gSY3pM4ADov6CdETsWP9P9/2TNCQDMklT4fGdx14APwDOBD5a5x0LXAlcXB9zcTSrtjYdBewTEedRuivv7czIzFuAq4AvNfK/Abg8Ii4Bngl8edL3aPX8P0oQ+lNgw0b6D4FtO4P6gX+idNdeWuvmn2q+6b5/koYU5QuqJM1MEbEOcBmwU2b+ru3ySNJE2EImacaKiN2Bq4F/NxiTNJPZQiZJktQyW8gkSZJaZkAmSZLUMgMySZKklhmQSZIktcyATJIkqWUGZJIkSS37/yC3WN9AJMNUAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"counts, labels = np.histogram(df['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"fig = plt.figure(figsize=(10,5))\n",
"plt.bar(labels[1:], counts, align='center',width=1)\n",
"plt.xlabel('Delays in minutes')\n",
"plt.ylabel('Frequency')\n",
"plt.title('Amtrak City of New Orleans (Southbound) is not always late',loc='left',fontsize=16)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "57dc400e",
"metadata": {
"id": "57dc400e",
"outputId": "2a6ee686-cb05-468b-f4c5-7eb7a4ff1c85"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Median delay in minutes: 2.0\n",
"Mean delay in minutes: 10.485846754514398\n"
]
}
],
"source": [
"print('Median delay in minutes: ', np.median(df['Ar_Delay_mins']))\n",
"print('Mean delay in minutes: ', np.mean(df['Ar_Delay_mins']))"
]
},
{
"cell_type": "markdown",
"id": "09531ff9",
"metadata": {
"id": "09531ff9"
},
"source": [
"Delays reaching the destination of Union Passenger Terminal, New Orleans"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "204dff7c",
"metadata": {
"id": "204dff7c"
},
"outputs": [],
"source": [
"df_dest = df.loc[df['Station']=='NOL']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "92731edf",
"metadata": {
"id": "92731edf",
"outputId": "75c57f6d-95f2-4985-ecf5-8994fc5733a6"
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x2729b9c8970>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAE9CAYAAACleH4eAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgqUlEQVR4nO3de5SddX3v8feXhDLcREMCBwiS4ApIgBgwoZwCiqiBCge08RLlCKtq00qwYnHZYGub1tLFWqVikYJFQ0UqQQpyabXKRSkXtRggCiHcFo5hgAMhLQSQW8L3/LGfiTvDnpm9Z/aeZ1/er7Wy5nl++7l89y9h1off77lEZiJJkqTybFV2AZIkSb3OQCZJklQyA5kkSVLJDGSSJEklM5BJkiSVzEAmSZJUssllFzAeU6dOzRkzZpRdhiRJ0qjuuOOOpzJzWq3POjqQzZgxg5UrV5ZdhiRJ0qgi4lfDfeaUpSRJUskMZJIkSSUzkEmSJJWso68hkyRJv/HKK68wMDDAiy++WHYpPa2vr4/p06ez9dZb172PgUySpC4xMDDAjjvuyIwZM4iIssvpSZnJ+vXrGRgYYObMmXXv55SlJEld4sUXX2TnnXc2jJUoIth5550bHqU0kEmS1EUMY+Uby9+BgUySJDXVVVddRURw3333AdDf388BBxwAwE033cRxxx1XZnltyWvIJEnqUjOWfrepx+s/69i6tluxYgWHH344l112GcuWLWtqDd3KETJJktQ0zz33HLfddhvLly/nsssuK7ucjmEgkyRJTXP11VdzzDHHsM8++zBlyhTuvPPOskvqCAayLtbsoWpJkkazYsUKFi1aBMCiRYtYsWJFyRV1Bq8hkyRJTbF+/Xp++MMfcs899xARbNq0iYjglFNOKbu0tucImSRJaoorrriCk046iV/96lf09/fzyCOPMHPmTAYGBsoure0ZyCRJUlOsWLGC973vfVu0LVy4kL/9278tqaLOEZlZdg1jNm/evFy5cmXZZbStGUu/W/ctypKkzrdmzRr222+/sssQtf8uIuKOzJxXa3tHyCRJkkpmIJMkSSqZgUySJKlkBjJJkqSSGcgkSZJKZiCTJEkqmYFMkiQ1TURw+umnb14/++yzWbZsWVPPsXr1ao466ij22WcfZs2axRe/+EWGe4zXTTfdxHHHHdfU87eCr06SJKlbLdupycd7ZtRNttlmG77zne9wxhlnMHXq1OaeH3jhhRc4/vjjueCCC1iwYAG//vWvWbhwIeeffz5LlizZYtuNGzc2/fyt4giZJElqmsmTJ7N48WLOOeec13y2bt06Fi5cyPz585k/fz633XYbAAceeCBPP/00mcnOO+/MN7/5TQA++tGPcsMNN2xxjEsvvZTDDjuMBQsWALDddttx3nnncdZZZwGwbNkyFi9ezIIFCzjppJO22Pf555/nYx/7GPPnz+eggw7immuuAaC/v58jjjiCgw8+mIMPPpgf//jHQGV07cgjj+T9738/b37zmznxxBM3j8QtXbqU2bNnM2fOHD772c+Ov9/GfQRJkqQqS5YsYc6cOXzuc5/bov3Tn/40n/nMZzj88MNZu3YtRx99NGvWrOGwww7jtttuY6+99mLvvffmlltu4aSTTuKnP/0pF1xwwRbHWL16NW9961u3aHvTm97Ec889x4YNGwC44447uPXWW9l222256aabNm935plnctRRR3HRRRfx9NNPc8ghh/Cud72LXXbZheuvv56+vj4efPBBPvzhDzP4JqC77rqL1atXs/vuu2+uc/bs2Vx11VXcd999RARPP/30uPvMQCZJkprqda97HSeddBLnnnsu22677eb2G264gXvvvXfz+oYNG3j22Wc54ogjuPnmm9lrr7345Cc/yYUXXsijjz7KlClT2GGHHbY4dmYSETXPO9h+/PHHb3HeQddddx3XXnstZ599NgAvvvgia9euZffdd+fUU09l1apVTJo0iQceeGDzPocccgjTp08HYO7cufT393PooYfS19fHJz7xCY499timXKPWsinLiNgzIn4UEWsiYnVEfLponxIR10fEg8XPN1Ttc0ZEPBQR90fE0a2qTZIktdZpp53G8uXLef755ze3vfrqq/zkJz9h1apVrFq1ikcffZQdd9yRt73tbdxyyy3ccsstHHnkkUybNo0rrriCI4444jXH3X///Rn6HuuHH36YHXbYgR133BGA7bffvmZNmcmVV165+fxr165lv/3245xzzmHXXXfl5z//OStXruTll1/evM8222yzeXnSpEls3LiRyZMnc/vtt7Nw4UKuvvpqjjnmmHH1FbT2GrKNwOmZuR9wKLAkImYDS4EbM3MWcGOxTvHZImB/4Bjg/IiY1ML6JElSi0yZMoUPfvCDLF++fHPbggULOO+88zavr1q1CoA999yTp556igcffJC9996bww8/nLPPPrtmIDvxxBO59dZbN19b9sILL/DHf/zHr5kereXoo4/mK1/5yubrwO666y4AnnnmGXbbbTe22morLrnkEjZt2jTicZ577jmeeeYZ3vOe9/DlL3958/cYj5YFssx8PDPvLJafBdYAewAnABcXm10MvLdYPgG4LDNfysxfAg8Bh7Sqvm42Y+l3yy5BkiROP/10nnrqqc3r5557LitXrmTOnDnMnj2br371q5s/++3f/m322WcfAI444ggeffRRDj/88Nccc9ttt+Waa67hb/7mb9h333058MADmT9/Pqeeeuqo9XzhC1/glVdeYc6cORxwwAF84QtfAOCUU07h4osv5tBDD+WBBx4YdoRt0LPPPstxxx3HnDlzePvb317zBoZGxXDP7WimiJgB3AwcAKzNzNdXffY/mfmGiDgP+Glm/kvRvhz4j8y8Yrjjzps3L4cOW6oSyPrPOnbzT0lSb1izZg377bdf2WWI2n8XEXFHZs6rtX3LH3sRETsAVwKnZeaGkTat0faatBgRiyNiZUSsXLduXbPKlCRJKk1LA1lEbE0ljH0rM79TND8REbsVn+8GPFm0DwB7Vu0+HXhs6DEz88LMnJeZ86ZNm9a64iVJkiZIK++yDGA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7AwdGxNxxHJfMfBn4C+DbmTk3M78N/BmVVwnNB94B/F3xmpxGv5+kNueUpaSyRPFzATAnIt5frO9EJcg8ULXt1sB5RejZBOwDkJn/GRH/WEyD/h5wZfH6sJ8AfxYR04HvZOaDo9Tyy8xcVSzfAcwYZrt/y8yMiLuBJzLzboCIWF3ss2rI9vUedzgLqLx4+7PFeh/wRqDR7yepzRnIJE24iNibSrB6kkow+1Rm/mDINjOqVj8DPAG8hcrI2otVn10CnEjlxdQfA8jMSyPiv4BjgR9ExCcy84cjlPRS1fIm4DVTlkO2e3XIPq9S+/fpcMfdyG9mKPpGqCuAhZl5/5D2NQ1+P0ltzilLSRMqIqYBXwXOy8rLdH8AfDIiti4+36eYlqu2E/B4Zr5K5WXnk6o++wZwGlReBlwcY2/g4cw8F7gWmNOyLzQ2/cBbi+X3V7U/C+xYtf4D4FNRvEE6Ig4qfrb795PUIAOZpImw7eBjL4AbgOuAvyo++zpwL3Bn8ZiLf+K1o03nAydHxE+pTFc+P/hBZj4BrAH+uWr7DwH3RMQq4M3AN5v+jcbnbCoh9MfA1Kr2HwGzBy/qB75IZbr2F0XffLHYrt2/n6QGReV/UCWpM0XEdsDdwMGZ+UzZ9UjSWDhCJqljRcS7gPuArxjGJHUyR8gkSZJK5giZJElSyQxkkiRJJTOQSZIklcxAJkmSVDIDmSRJUskMZJIkSSX7//wBzAllMJiSAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"counts, labels = np.histogram(df['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"fig = plt.figure(figsize=(10,5))\n",
"plt.bar(labels[1:], counts, align='center',width=1,label='All')\n",
"\n",
"counts_dest, labels_dest = np.histogram(df_dest['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"plt.bar(labels_dest[1:], counts_dest, align='center',width=1,label='New Orleans')\n",
"plt.xlabel('Delays in minutes')\n",
"plt.ylabel('Frequency')\n",
"plt.legend()\n",
"#plt.suptitle('You are more likely to arrive in New Orleans on-time or earlier via Amtrak',fontsize=14,ha='left',x=1)\n",
"#plt.title('The train successfully makes up for time despite delays in other stations',loc='left')"
]
},
{
"cell_type": "markdown",
"id": "4d772e7b",
"metadata": {
"id": "4d772e7b"
},
"source": [
"The histogram shows that despite delays arriving at the other stations along the route, the train is almost always able to make up for lost time and arrive in New Orleans on-time or earlier than scheduled."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c4c0b8d3",
"metadata": {
"id": "c4c0b8d3",
"outputId": "26ad9cf2-3005-4552-9cad-78d3f97ead38"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Median delay in minutes: -25.0\n",
"Mean delay in minutes: -7.866685536371356\n"
]
}
],
"source": [
"print('Median delay in minutes: ', np.median(df_dest['Ar_Delay_mins']))\n",
"print('Mean delay in minutes: ', np.mean(df_dest['Ar_Delay_mins']))"
]
},
{
"cell_type": "markdown",
"id": "4ce60ba4",
"metadata": {
"id": "4ce60ba4"
},
"source": [
"Earliest arrival"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1439a469",
"metadata": {
"id": "1439a469",
"outputId": "b1377aa5-7f87-4f5a-fc36-a35bb9ab0649"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-107 minutes\n"
]
}
],
"source": [
"print(str(np.min(df_dest['Ar_Delay_mins'])) + ' minutes')"
]
},
{
"cell_type": "markdown",
"id": "fdf77824",
"metadata": {
"id": "fdf77824"
},
"source": [
"Latest arrival"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e80a19c2",
"metadata": {
"id": "e80a19c2",
"outputId": "4100d97d-835e-4b01-95bc-208a3cb65b97"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"700 minutes\n"
]
}
],
"source": [
"print(str(np.max(df_dest['Ar_Delay_mins'])) + ' minutes')"
]
},
{
"cell_type": "markdown",
"id": "984131bc",
"metadata": {
"id": "984131bc"
},
"source": [
"Percentage arrives on time"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d093b607",
"metadata": {
"id": "d093b607"
},
"outputs": [],
"source": [
"df_ontime30 = df.loc[(df['Ar_Delay_mins']<=30)]\n",
"df_ontime60 = df.loc[(df['Ar_Delay_mins']<=60)]\n",
"df_ontime = df.loc[(df['Ar_Delay_mins']<=0)]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4a9f17ae",
"metadata": {
"id": "4a9f17ae",
"outputId": "65500e6a-0001-4fc6-db02-4e8776f76677"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"88.86% of the time the train arrives within 60 mins of schedule\n",
"78.14% of the time the train arrives within 30 mins of schedule\n",
"47.36% of the time the train arrives on time or earlier\n"
]
}
],
"source": [
"print(str(np.round(len(df_ontime60)*100./len(df),2))+'% of the time the train arrives within 60 mins of schedule')\n",
"print(str(np.round(len(df_ontime30)*100./len(df),2))+'% of the time the train arrives within 30 mins of schedule')\n",
"print(str(np.round(len(df_ontime)*100./len(df),2))+'% of the time the train arrives on time or earlier')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4f46835b",
"metadata": {
"id": "4f46835b",
"outputId": "20ca0cc5-e8ec-499d-be73-9c84e5a63978"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"90.01% of the time the train arrives within 60 mins of schedule\n",
"83.78% of the time the train arrives within 30 mins of schedule\n",
"72.43% of the time the train arrives on time or earlier\n"
]
}
],
"source": [
"df_dest_ontime30 = df_dest.loc[(df_dest['Ar_Delay_mins']<=30)]\n",
"df_dest_ontime60 = df_dest.loc[(df_dest['Ar_Delay_mins']<=60)]\n",
"df_dest_ontime = df_dest.loc[(df_dest['Ar_Delay_mins']<=0)]\n",
"\n",
"print(str(np.round(len(df_dest_ontime60)*100./len(df_dest),2))+'% of the time the train arrives within 60 mins of schedule')\n",
"print(str(np.round(len(df_dest_ontime30)*100./len(df_dest),2))+'% of the time the train arrives within 30 mins of schedule')\n",
"print(str(np.round(len(df_dest_ontime)*100./len(df_dest),2))+'% of the time the train arrives on time or earlier')"
]
},
{
"cell_type": "markdown",
"id": "5a60d3de",
"metadata": {
"id": "5a60d3de"
},
"source": [
"## Part 2: New Orleans to Chicago"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6c9824de",
"metadata": {
"id": "6c9824de",
"outputId": "b802faa8-2869-4291-b97b-3af741cc09b1"
},
"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>Origin_date</th>\n",
" <th>Station</th>\n",
" <th>Sch_Ar</th>\n",
" <th>Act_Ar</th>\n",
" <th>Comments</th>\n",
" <th>Ar_Delay_mins</th>\n",
" <th>ServiceDisruption</th>\n",
" <th>Cancellations</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>05/27/2017 (Sa)</td>\n",
" <td>CHI</td>\n",
" <td>05/28/2017 9:00 AM (Su)</td>\n",
" <td>10:39PM</td>\n",
" <td>Ar: 13 hr, 39 min late.</td>\n",
" <td>819</td>\n",
" <td>SD</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>06/23/2009 (Tu)</td>\n",
" <td>CHI</td>\n",
" <td>06/24/2009 9:00 AM (We)</td>\n",
" <td>10:28PM</td>\n",
" <td>Ar: 13 hr and 28 min late.</td>\n",
" <td>808</td>\n",
" <td>SD</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>05/27/2017 (Sa)</td>\n",
" <td>CDL</td>\n",
" <td>05/28/2017 3:11 AM (Su)</td>\n",
" <td>4:27PM</td>\n",
" <td>Ar: 13 hr, 16 min late | Dp: 13 hr, 34 min late.</td>\n",
" <td>796</td>\n",
" <td>SD</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>03/30/2015 (Mo)</td>\n",
" <td>CHI</td>\n",
" <td>03/31/2015 9:00 AM (Tu)</td>\n",
" <td>7:30PM</td>\n",
" <td>Ar: 10 hr, 30 min late.</td>\n",
" <td>630</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>11/20/2020 (Fr)</td>\n",
" <td>CHI</td>\n",
" <td>11/21/2020 9:15 AM (Sa)</td>\n",
" <td>7:17PM</td>\n",
" <td>Ar: 10 hr, 2 min late.</td>\n",
" <td>602</td>\n",
" <td>SD</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Origin_date Station Sch_Ar Act_Ar \\\n",
"0 05/27/2017 (Sa) CHI 05/28/2017 9:00 AM (Su) 10:39PM \n",
"1 06/23/2009 (Tu) CHI 06/24/2009 9:00 AM (We) 10:28PM \n",
"2 05/27/2017 (Sa) CDL 05/28/2017 3:11 AM (Su) 4:27PM \n",
"3 03/30/2015 (Mo) CHI 03/31/2015 9:00 AM (Tu) 7:30PM \n",
"4 11/20/2020 (Fr) CHI 11/21/2020 9:15 AM (Sa) 7:17PM \n",
"\n",
" Comments Ar_Delay_mins \\\n",
"0 Ar: 13 hr, 39 min late. 819 \n",
"1 Ar: 13 hr and 28 min late. 808 \n",
"2 Ar: 13 hr, 16 min late | Dp: 13 hr, 34 min late. 796 \n",
"3 Ar: 10 hr, 30 min late. 630 \n",
"4 Ar: 10 hr, 2 min late. 602 \n",
"\n",
" ServiceDisruption Cancellations \n",
"0 SD NaN \n",
"1 SD NaN \n",
"2 SD NaN \n",
"3 NaN NaN \n",
"4 SD NaN "
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_excel('AmtrakDelays_NOL_CHI.xlsx')\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"id": "8e85dd6a",
"metadata": {
"id": "8e85dd6a"
},
"source": [
"Rename column for easier referencing."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "68695463",
"metadata": {
"id": "68695463"
},
"outputs": [],
"source": [
"df = df.rename(columns={'Ar Delay (mins)':'Ar_Delay_mins'})"
]
},
{
"cell_type": "markdown",
"id": "ba297f76",
"metadata": {
"id": "ba297f76"
},
"source": [
"Checking for NaN values."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3aaf54b5",
"metadata": {
"id": "3aaf54b5",
"outputId": "f631fff1-8ebf-476c-e3d3-54b684762a80"
},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Ar_Delay_mins'].isna().sum()"
]
},
{
"cell_type": "markdown",
"id": "3b433479",
"metadata": {
"id": "3b433479"
},
"source": [
"Counting how many datapoints are recorded for each station."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "adfb7f08",
"metadata": {
"id": "adfb7f08",
"outputId": "c2457b8a-a74d-4049-b98a-cf129df4a89b"
},
"outputs": [
{
"data": {
"text/plain": [
"CHI 4534\n",
"CDL 2265\n",
"MEM 2229\n",
"JAN 2079\n",
"GWD 181\n",
"HMW 58\n",
"MAT 52\n",
"KKI 49\n",
"FTN 46\n",
"CEN 43\n",
"EFG 43\n",
"NBN 42\n",
"CHM 21\n",
"YAZ 17\n",
"MKS 15\n",
"MCB 11\n",
"BRH 10\n",
"HMD 9\n",
"HAZ 9\n",
"NYP 7\n",
"PHL 4\n",
"BAL 1\n",
"NCR 1\n",
"Name: Station, dtype: int64"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Station'].value_counts()"
]
},
{
"cell_type": "markdown",
"id": "fa8193d4",
"metadata": {
"id": "fa8193d4"
},
"source": [
"Looks like most of the reports come from 4 stations (Chicago IL, Carbondale IL, Memphis TN, Jackson MI) so i'm only going to process those."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f8e9d51f",
"metadata": {
"id": "f8e9d51f"
},
"outputs": [],
"source": [
"df = df[df['Station'].isin(['CHI','CDL','MEM','JAN'])]"
]
},
{
"cell_type": "markdown",
"id": "a045dc54",
"metadata": {
"id": "a045dc54"
},
"source": [
"Let's look at the histogram of delays, converting minutes to hours."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9cd60d52",
"metadata": {
"id": "9cd60d52",
"outputId": "216d3aa0-1c83-414a-c1e2-a4e4b2eab0c9"
},
"outputs": [
{
"data": {
"text/plain": [
"Text(0.0, 1.0, 'Amtrak City of New Orleans (Northbound) is not always late')"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAFPCAYAAADjktLUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAtDUlEQVR4nO3debwkVX3H/c8XUMEdZDCI6KjBBRNZBOIu7sQNjTFiEkUjkhg0ouZJ0EQlC0afGI15FHcFF0SMEokaERFcooiIKJsIkVE2mXHFdRD8PX/UudDT07dv35nbt+6d+3m/Xv3qrlOnqk6drq7+9TmnqlNVSJIkqT9b9V0ASZKklc6ATJIkqWcGZJIkST0zIJMkSeqZAZkkSVLPDMgkSZJ6tkUFZEnekaSSvG5K6z8yycOntO5K8s+bsfz9k5yQ5Mok1yb5QZJTkhycZOuW51ltO6sHlpvaPk1Y5i8n+Xkr156z5Jsp94+TbD80b5s278jFKPM4Se6R5NgkV7T34Iok701yj3muZ0nsz+ZIct8kv0iy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RU5ErkJggg==\n",
"text/plain": [
"<Figure size 720x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"counts, labels = np.histogram(df['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"fig = plt.figure(figsize=(10,5))\n",
"plt.bar(labels[1:], counts, align='center',width=1)\n",
"plt.xlabel('Delays in minutes')\n",
"plt.ylabel('Frequency')\n",
"plt.title('Amtrak City of New Orleans (Northbound) is not always late',loc='left',fontsize=16)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e56d899b",
"metadata": {
"id": "e56d899b",
"outputId": "b888cc1e-0d9f-4baf-81e5-0d7e70aa5260"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Median delay in minutes: 0.0\n",
"Mean delay in minutes: 12.635004951832178\n"
]
}
],
"source": [
"print('Median delay in minutes: ', np.median(df['Ar_Delay_mins']))\n",
"print('Mean delay in minutes: ', np.mean(df['Ar_Delay_mins']))"
]
},
{
"cell_type": "markdown",
"id": "b2174f32",
"metadata": {
"id": "b2174f32"
},
"source": [
"Delays reaching the destination of Union Station, Chicago"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "94a4dc76",
"metadata": {
"id": "94a4dc76"
},
"outputs": [],
"source": [
"df_dest = df.loc[df['Station']=='CHI']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a0da9c2",
"metadata": {
"id": "0a0da9c2",
"outputId": "728a8094-1f57-44e9-8bbf-0a924eecddfb"
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x2729eb6fa60>"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAE9CAYAAACleH4eAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTA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Wcd955LF68eJN1169f3/Tjt0rLRsgiYteI+ElErI6IVRFxStG+NCKeiIiVxa8jqrY5PSIeiYgHI+KwVtUmSZJaY/z48SxatIizzz77TZ+tXbuWBQsWMHfuXObOncsdd9wBwL777stzzz1HZrL99tvzve99D4Djjz+em266aZN9XHrppRx44IHMnz8fgK233ppzzz2XM888E4ClS5eyaNEi5s+fzwknnLDJti+//DKf/OQnmTt3Lvvttx/XXnstAL29vRx88MHsv//+7L///vz0pz8FKqNrhxxyCB/5yEfYc889Oe644zaOxC1ZsoSZM2cya9YsPv/5z29+v232Hga3HjgtM++OiInAioi4sfjs7Mw8q3rliJgJLAT2BnYGboqIPTJzQwtrlCRJTbZ48WJmzZrFF77whU3aTznlFD73uc9x0EEHsWbNGg477DBWr17NgQceyB133MFuu+3G7rvvzm233cYJJ5zAz372M84///xN9rFq1Sre/e53b9L2jne8g5deeokXXngBgBUrVnD77bczYcIEbrnllo3rnXHGGRx66KFcdNFFPPfcc8ybN48PfvCD7LDDDtx444309PTw8MMPc+yxx9L/JKB77rmHVatWsfPOO2+sc+bMmVx99dU88MADRATPPffcZvdZywJZZj4FPFW8fzEiVgO71NnkGOCyzHwNeCwiHgHmAXe2qkZJktR8b3nLWzjhhBM455xzmDBhwsb2m266ifvvv3/j8gsvvMCLL77IwQcfzK233spuu+3GZz7zGS644AKeeOIJJk2axLbbbrvJvjOTiKh53P72o48+epPj9rvhhhu47rrrOOusypjQq6++ypo1a9h55505+eSTWblyJePGjeOhhx7auM28efOYOnUqALNnz6a3t5cDDjiAnp4ePv3pT3PkkUc25Ry1tpzUHxHTgP2AnxdNJ0fEryLiooh4W9G2C/B41WZ91AhwEbEoIpZHxPK1a9e2smxJkjRCp556KhdeeCEvv/zyxrY33niDO++8k5UrV7Jy5UqeeOIJJk6cyHvf+15uu+02brvtNg455BCmTJnCFVdcwcEHH/ym/e69994MfI71o48+yrbbbsvEiRMB2GabbWrWlJlceeWVG4+/Zs0a9tprL84++2x23HFHfvnLX7J8+X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mQF8MzP3Bp4DFgyy3tuAQ4HPAf8OnA3sDewbEbM3Y79k5uvA3wI/yMzZmfkD4K+pPEpoLvB+4B+Lx+QM9/tJ6nBOWUoqSxSv84FZEfGRYnk7KkHmoap1twTOLULPBmAPgMz8r4j4ZjEN+sfAlcXjw+4E/joipgJXZebDQ9TyWGauLN6vAKYNst6/Z2ZGxL3A05l5L0BErCq2WTlg/Ub3O5j5VB68/fliuQd4OzDc7yepwxnIJLVdROxOJVg9QyWYfTYzfzRgnWlVi58DngbeRWVk7dWqzy4BjqPyYOpPAmTmpRHxc+BI4EcR8enM/HGdkl6rer8BeNOU5YD13hiwzRvU/vt0sP2u53czFD116gpgQWY+OKB99TC/n6QO55SlpLaKiCnAt4Bzs/Iw3R8Bn4mILYvP9yim5aptBzyVmW9Qedj5uKrPvgucCpWHARf72B14NDPPAa4DZrXsC41ML/Du4v1HqtpfBCZWLf8I+GwUT5COiP2K107/fpKGyUAmqR0m9N/2ArgJuAH4u+Kz7wD3A3cXt7n4Z9482nQecGJE/IzKdOXL/R9k5tPAauBfqtb/OHBfRKwE9gS+1/RvtHnOohJCfwpMrmr/CTCz/6R+4CtUpmt/VfTNV4r1Ov37SRqmqPwHVZJGp4jYGrgX2D8zny+7HkkaCUfIJI1aEfFB4AHgG4YxSaOZI2SSJEklc4RMkiSpZAYySZKkkhnIJEmSSmYgkyRJKpmBTJIkqWQGMkmSpJL9fwIrFcdevMc6AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"counts, labels = np.histogram(df['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"fig = plt.figure(figsize=(10,5))\n",
"plt.bar(labels[1:], counts, align='center',width=1,label='All')\n",
"\n",
"counts_dest, labels_dest = np.histogram(df_dest['Ar_Delay_mins'],bins=np.arange(-60,600,1))\n",
"plt.bar(labels_dest[1:], counts_dest, align='center',width=1,label='New Orleans')\n",
"plt.xlabel('Delays in minutes')\n",
"plt.ylabel('Frequency')\n",
"plt.legend()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a560d894",
"metadata": {
"id": "a560d894",
"outputId": "d83a999c-4074-4916-f2e2-9d965fe99e94"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Median delay in minutes: -3.0\n",
"Mean delay in minutes: 12.15968239964711\n"
]
}
],
"source": [
"print('Median delay in minutes: ', np.median(df_dest['Ar_Delay_mins']))\n",
"print('Mean delay in minutes: ', np.mean(df_dest['Ar_Delay_mins']))"
]
},
{
"cell_type": "markdown",
"id": "908c61d7",
"metadata": {
"id": "908c61d7"
},
"source": [
"Earliest arrival"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b281bed3",
"metadata": {
"id": "b281bed3",
"outputId": "fbd33296-5126-460e-a3e5-bbb97e83bfde"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-61 minutes\n"
]
}
],
"source": [
"print(str(np.min(df_dest['Ar_Delay_mins'])) + ' minutes')"
]
},
{
"cell_type": "markdown",
"id": "f09838ff",
"metadata": {
"id": "f09838ff"
},
"source": [
"Latest arrival"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "67bf5a95",
"metadata": {
"id": "67bf5a95",
"outputId": "b769aaf1-6c6c-4367-9717-c6137d82bf5f"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"819 minutes\n"
]
}
],
"source": [
"print(str(np.max(df_dest['Ar_Delay_mins'])) + ' minutes')"
]
},
{
"cell_type": "markdown",
"id": "7697a5d0",
"metadata": {
"id": "7697a5d0"
},
"source": [
"Percentage arrives on time"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aef9ad03",
"metadata": {
"id": "aef9ad03"
},
"outputs": [],
"source": [
"df_ontime30 = df.loc[(df['Ar_Delay_mins']<=30)]\n",
"df_ontime60 = df.loc[(df['Ar_Delay_mins']<=60)]\n",
"df_ontime = df.loc[(df['Ar_Delay_mins']<=0)]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "45a64dd4",
"metadata": {
"id": "45a64dd4",
"outputId": "b4d9784f-c4c1-47c3-8e75-225520a7f6a1"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"90.51% of the time the train arrives within 60 mins of schedule\n",
"81.4% of the time the train arrives within 30 mins of schedule\n",
"51.12% of the time the train arrives on time or earlier\n"
]
}
],
"source": [
"print(str(np.round(len(df_ontime60)*100./len(df),2))+'% of the time the train arrives within 60 mins of schedule')\n",
"print(str(np.round(len(df_ontime30)*100./len(df),2))+'% of the time the train arrives within 30 mins of schedule')\n",
"print(str(np.round(len(df_ontime)*100./len(df),2))+'% of the time the train arrives on time or earlier')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0e5f4e15",
"metadata": {
"id": "0e5f4e15",
"outputId": "e4cdb45b-98b7-43d3-f4cf-4038c69a57c4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"88.8% of the time the train arrives within 60 mins of schedule\n",
"80.88% of the time the train arrives within 30 mins of schedule\n",
"54.34% of the time the train arrives on time or earlier\n"
]
}
],
"source": [
"df_dest_ontime30 = df_dest.loc[(df_dest['Ar_Delay_mins']<=30)]\n",
"df_dest_ontime60 = df_dest.loc[(df_dest['Ar_Delay_mins']<=60)]\n",
"df_dest_ontime = df_dest.loc[(df_dest['Ar_Delay_mins']<=0)]\n",
"\n",
"print(str(np.round(len(df_dest_ontime60)*100./len(df_dest),2))+'% of the time the train arrives within 60 mins of schedule')\n",
"print(str(np.round(len(df_dest_ontime30)*100./len(df_dest),2))+'% of the time the train arrives within 30 mins of schedule')\n",
"print(str(np.round(len(df_dest_ontime)*100./len(df_dest),2))+'% of the time the train arrives on time or earlier')"
]
},
{
"cell_type": "markdown",
"id": "ff1cba0f",
"metadata": {
"id": "ff1cba0f"
},
"source": [
"# Conclusion\n",
"\n",
"My experience of 6-hour and 3-hour delays are not the norm. Based on 10 years of data from the most reported stations along the City of New Orleans route, the trains are actually within 30 minutes of schedule most of the time. Half the time it arrives on-time or even earlier at the end stations. "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.7"
},
"colab": {
"name": "Amtrak Delays.ipynb",
"provenance": [],
"include_colab_link": true
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment