Follow along @:
FRA 6180.71: U.S. DOT-AAR Crossing Inventory Form
Has existed since 1974, was voluntary prior to 2015
Maintained in the National Inventory File database since 1975
safetydata.dot.fra.gov/Gcis/
Grade Crossing Inventory System
Web form, Spreadsheet upload, API
Must know the DOT# you want to edit
Single crossing, enter data, recieve errors, repeat
Ok for simple edits, not well suited to large updates
Not easy to auto-populate
Seems to be designed for manual data entry
Upload data, wait for processing, recieve errors, repeat
Application Programming Interface
Google Maps, NOAA weather service, your bank data
Not for you, for your developers/IT department
Extensive query capabilites
Current and historical records
Transmit crossing data individually or in bulk
Recieve success receipts and/or error messages
Used for integrating your in-house system with GCIS
Annual Total Submissions to the National Database
Southeastern Region Annual Total Submissions
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
Monthly totals of RR sourced updates
Rolling Average
Monthly totals of RR sourced updates
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import seaborn as sns
# Load the data into a frame
df = pd.read_csv('inventory_submission_data_monthly.csv')
df['Date'] = pd.to_datetime(df['Date'])
df['date_ordinal'] = pd.to_datetime(
df['Date']).apply(lambda date: date.toordinal()
)
yearly_df = pd.read_csv('inventory_submission_data_yearly.csv')
def get_railroad_submission_chart(state, start_date, y_limit):
"""
Plots the monthly railroad submission data of a given state.
"""
# Plot size
sns.set(rc={'figure.figsize':(11.7,8.27)})
# Get state data
state_df = df[df['State'] == state]
# Only get railroad data?
state_df = state_df[state_df['Updating Agency'] == 'Railroad']
state_df = state_df[state_df['Date'] > pd.Timestamp(start_date)]
# Plot the data
sns.lineplot(x='Date', y='Count', data=state_df)
# Plot title
title = state_df['State'].iloc[0] + ' Submissions'
plt.title(title)
plt.xlim(pd.Timestamp(start_date), pd.Timestamp('2018-12-01'))
def get_railroad_regression_chart(state, start_date, y_limit):
"""
Plots the monthly railroad submission data of a given state
using a linear regression.
"""
# Plot size
sns.set()
# Get state data
state_df = df[df['State'] == state]
# Only get railroad data?
state_df = state_df[state_df['Updating Agency'] == 'Railroad']
state_df = state_df[state_df['Date'] > pd.Timestamp(start_date)]
# Plot the data
sns.regplot(x='date_ordinal', y='Count', data=state_df)
# Plot title
title = state_df['State'].iloc[0] + ' Submissions'
plt.title(title)
plt.xlabel('Date')
plt.xlim(pd.Timestamp(start_date), pd.Timestamp('2018-12-01'))
plt.ylim(-1, y_limit)
def get_moving_average(state, start_date):
"""
Smooths out short-term fluctuations and
highlights longer-term trends
"""
state_df = df[df['State'] == state]
rr_df = state_df[state_df['Updating Agency'] == 'Railroad']
rr_df = rr_df[rr_df['Date'] > pd.Timestamp(start_date)]
rr_df = rr_df.drop(
columns=['State', 'Updating Agency', 'date_ordinal']
)
rr_df = rr_df.set_index('Date')
ax = rr_df.rolling(12, win_type='triang').mean().plot(
title = state + ' Rolling Average',
legend = False
)
ax.set_ylabel("Count")
Contact us for more information.
Automate, automate, automate
Monitor for changes in FRA, update your in-house system
Eliminate redundant data entry!
User edits your system, automate submission to FRA
Google has eliminated their free use policy, so note that a credit card is now required to use their services in your app or website!
Crowd sourced imagery, using computer vision to ID signs
openstreetcam.orgOpen source, crowd sourced imagery
Guess what!? They both have APIs!
Interactive web map displaying all crossings
Summary info for all crossings in view
Real-time crossing data from the API tells the app which icons to display
Selecting a crossing brings up a detail page with summary info, location map...
...Google Street View, and all the crossing data from GCIS
The Street View can be maximized to see crossing appurtenance details
Data used in many prioritization models has been updated and is within the FRA 3 year update timeframe
See this presentation and more at slides.tavlasolutions.com
Try the Crossing Trek technology demonstrator at map.tavlasolutions.com