Skip to main content
EngineeringData Science
What this does: Automatically cleans and validates incoming bike-sharing data so that downstream forecasts are always based on accurate, trustworthy inputs — reducing data errors before they reach the model.
The Data Pipeline is responsible for ingesting raw data, validating its schema with , and cleaning it for downstream consumption.

Pipeline Flow

The pipeline uses a defensive programming approach — validation issues generate warnings but processing continues with available data, rather than failing fast.

Node: validate_etl_data

The primary validation function checks data quality at each ETL stage.
1

Dataset Size Checks

Validates that the dataset is non-empty, has at least 100 samples for reliable training, and contains a minimum of 5 feature columns.
2

Required Columns

Ensures all 15 required columns are present: season, yr, mnth, hr, holiday, weekday, workingday, weathersit, temp, atemp, hum, windspeed, casual, registered, cnt.
3

Range & Outlier Detection

  • Temperature & Humidity: Validates normalized [0, 1] range
  • IQR Outliers: Flags statistical outliers using the Interquartile Range method
  • Skewness: Warns if any numeric column has skewness > 2.0

Node: preprocess_data

This node ensures the dataset is clean and stateless before feature engineering.
1

Column Removal

Drops administrative columns that offer no predictive value:
  • yr (Year — does not help with predictions)
  • casual & registered (Leakage — component parts of target cnt)
  • datetime (Not needed for model features)
2

Schema Validation

Validates input against strict Pandera schemas (RawBikeDataSchema) to prevent type errors.
Validation occurs before column dropping using the @pa.check_types decorator.
3

Defensive Dropping

Only drops columns that actually exist — logs warnings for any expected columns that are missing, indicating upstream pipeline changes.

Code Snippet

nodes.py

Data Catalog


Feature Engineering

How preprocessed data is transformed into lag features and split for training.

Data Catalog

Complete registry of all datasets, schemas, and storage paths.