Series: Understanding and Predicting Transit Metrics

Published on
Authors

Part One

Subway Image painted like Egon Schiele

Introduction

Welcome to the inaugural installment of our series dedicated to constructing an all-encompassing data solution.

In this series, we aim to lead you from raw data straight to a fully operational web API. Together, we'll manipulate a dataset for predictions, construct a machine-learning model, and leverage the projections alongside historical data to fashion a web API.

While the presented functionality only represents a fraction of what's available, GanzeKarte has integrated it into our transit data pipeline.

We'll kick things off by demystifying the solution data pipeline. From there, we'll delve into the Extract, Transform, and Load (ETL) process — a pivotal step that guarantees data accuracy, consistency, and utility.

Our journey will then take us through feature engineering. During this phase, we'll select and adjust data attributes to devise features for training a machine-learning model. It's a demanding process, yet it lays the foundation for a model that precisely forecasts desired outcomes.

Our culminating steps involve constructing a machine-learning model that capitalizes on the features we've devised for predictions. We'll then harness these projections and historical data to shape a web API, offering on-the-fly results.

Upon concluding this series, you'll possess a robust grasp of the intricacies of curating a data solution pipeline, priming you to either craft your solutions or join hands with Ganze Karte for joint solution development.

At Ganze Karte, we tailor software solutions for organizations spanning various scales.

Are you eager to dive deeper? Click here and discover more about us.

Datasets

The U.S. Congress established the National Transit Database (NTD) 1974 as the central repository for information and statistics about the U.S. transit systems. The Federal Transit Administration (FTA) oversees the NTD, and transit providers receiving federal funding must submit diverse data types.

For our purposes, we'll tap into the monthly ridership dataset, a crucial component of the NTD. This dataset offers a deep dive into transit ridership, spanning multiple transportation modes like buses, subways, and commuter rails, and covers an array of transit agencies.

You can explore more here:.

You'll find a readme tab in the dataset that deciphers each term, provides a list of acronyms (and many), and sheds light on anomalies and other data-related disruptions.

Screenshot of NTD Readme Tab

The dataset contains other tabs that break down metrics on a time series basis.

  1. Unlinked Passenger Trips
  2. Vehicle Revenue Miles
  3. Vehicle Revenue Hours
  4. Vehicles Operated in Maximum Service (Peak Vehicles)

Each one of these tabs has a common set of fields, and time series data, which is a bit awkward for most users, and for those who like excel, one can use a pivot table and some magic to make it work.

Screenshot of UPT Tab example

Business Problem Space

A comprehensive dataset with time series metrics can significantly influence an agency.

For example, by analyzing unlinked passenger trips (UPT), an agency can gauge service demand and pinpoint areas that require more resources.

Vehicle revenue miles (VRM) and hours (VH) offer insights into the agency's operational efficiency, enabling them to refine their routes and timetables.

Moreover, by monitoring the number of vehicles operated at peak times (MS), an agency can anticipate high demand periods and ensure they maintain adequate capacity for their riders.

Building a data pipeline for this comprehensive dataset empowers agencies to use machine learning (ML) for predictions, further enhancing their services.

For instance, agencies can train ML models on past UPT and VRM data to predict upcoming demand and highlight possible capacity issues.

Data insights and ML enable agencies to tweak their timetables and resource distribution to avert service interruptions. They can also use ML to fine-tune routes and initiatives based on live data, such as traffic flow and weather, thus boosting operational efficiency.

In essence, this level of data access equips an agency to make well-informed choices and elevate its service quality.

We will delve deeper into these subjects in this series.

Data Engineering

We need to adjust the data's format to enhance its manipulability and storability. This adjustment ensures the data's readiness for a web service and a machine learning model.

In an upcoming post, we will explore this subject more profoundly, diving into the specifics and illustrating how to prepare the data for diverse downstream users. We can establish a thorough data solution pipeline by processing this data and streamlining data distribution to various stakeholders.

Modifying the data's structure makes it more approachable and user-centric, allowing us to draw deeper insights. Processing the data ensures the data remains consistent, precise, and actionable, which is crucial for developing a powerful machine-learning model that forecasts outcomes reliably.

Feature Engineering

Feature Engineering

Building an accurate and potent machine learning model requires deliberate feature engineering upfront. Feature engineering entails picking and modifying data attributes to craft features suitable for training a machine-learning model. While this task can pose challenges, it remains vital for shaping a model that forecasts the outcomes accurately. By judiciously choosing and adjusting the pertinent attributes, we can define features highlighting the data's most crucial information. Processing the data before hand assists the model in generating more precise predictions, underscoring feature engineering's significance in machine learning.

Machine Learning

Our aim is to harness machine learning (ML) techniques to refine our transit operations and bolster strategic planning. Using the extensive historical data we've gathered, we plan to train an ML model to discern patterns, trends, and inconsistencies in our transit usage data. This initiative will enable us to make accurate metric predictions, thereby enhancing our decision-making prowess. By capitalizing on the abundant data we've accumulated, we're taking a step forward, merging contemporary tech advancements with our dedication to elevating transit services and the overall user journey.

Web Service

We're set to develop a web service that facilitates seamless access to our data, presenting it effectively within a web application.

By leveraging our vast repository of merged satellite and GIS data, our goal is to transition from mere data collection to actionable insights via a dedicated web service and its associated app.

  1. User-Focused Interface: Our web service boasts an instinctive design, promising uncomplicated data access and interaction for a range of users, from academic researchers to curious novices.
  2. Interactive Display: The web app presents the data in visually appealing maps and charts, ensuring a detailed yet accessible exploration journey.
  3. API Capabilities: With a built-in API, our service encourages other developers or platforms to connect with our database effortlessly, underscoring its adaptability.
  4. Showcasing Applications: The web app serves as a tangible illustration, revealing the potential depth and breadth of analyses with our data reservoir.
  5. Security and Performance: Prioritizing top-notch security protocols and peak performance, our web service guarantees the integrity of data alongside a smooth user journey.

Keen to craft your unique data solution pipeline or collaborate with Ganze Karte on one?

In this series opener, we unveiled the data solution pipeline framework, guiding you through the ETL process landscape, the intricacies of feature engineering, the architecture of a machine-learning model, and the nuances of establishing a web API.

We also delved into the treasures within the National Transit Database and its capacity to shed light on agency operations.

To further immerse yourself in data engineering and master the art of crafting a holistic data solution, eagerly anticipate Part Two of our instructional series. There, we'll elucidate the crafting of an ETL toolset.

Code

Part Two

About Us

Contact Us