Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Microsoft Fabric Data Engineering Project

Final project for the "Software Engineer" internship in the Data Group at Itransition.

This project demonstrates a complete data engineering workflow using Microsoft Fabric, integrating mobility, environmental, and economic data to analyze urban patterns in New York City.

Project Overview

Goal: Build a unified analytics platform that combines:

  • NYC Taxi Trip Data - Urban mobility patterns across 265 zones
  • Air Quality Data (OpenAQ) - PM2.5 pollution measurements from NYC monitoring stations
  • Economic Data - US GDP and USD/EUR exchange rates

Key Questions:

  • How does taxi traffic relate to air pollution levels?
  • What are peak travel times and revenue trends by borough and zone?
  • How do economic indicators correlate with urban mobility?

Architecture

Medallion Architecture (Bronze → Silver → Gold)

Lakehouse
├── Bronze Layer (Raw Data)
│ ├── nyc_taxi/ # Monthly parquet files (2019-2024)
│ ├── openaq/ # Air quality locations
│ ├── ecb_fx/ # Daily USD/EUR exchange rates
│ └── worldbank_gdp/ # Annual GDP data
│
├── Silver Layer (Cleaned Data)
│ ├── silver_nyc_taxi # Standardized taxi trips with date columns
│ ├── silver_openaq # Air quality locations
│ ├── silver_ecb_fx_rates # Clean FX rates with date dimensions
│ └── silver_gdp # GDP with year-over-year growth
│
└── Gold Layer (Star Schema Warehouse)
├── DimDate # 2,192 days (2019-2024)
├── DimZone # 265 NYC taxi zones
├── DimFX # 1,538 trading days
├── DimGDP # 6 years of US GDP
├── FactTaxiDaily # 14.8M daily zone-level aggregates
└── FactAirQualityDaily # 2,192 daily air quality measurements

Data Warehouse - Star Schema

Dimension Tables

DimDate (2,192 rows)

Calendar dimension covering 2019-2024 with full date attributes.

ColumnTypeDescription
DateKeyINTPrimary key (YYYYMMDD format)
DateDATEActual date
Year, Quarter, Month, DayINTDate components
MonthName, DayNameVARCHARText representations
DayOfWeekINT1=Monday, 7=Sunday
IsWeekend, IsHolidayBITBoolean flags
WeekOfYearINTISO week number

DimZone (265 rows)

NYC taxi zones with borough information.

ColumnTypeDescription
ZoneKeyINTPrimary key
LocationIDINTTLC location ID
ZoneNameVARCHAR(100)Zone name (e.g., "Alphabet City")
BoroughVARCHAR(50)Manhattan, Brooklyn, Queens, Bronx, Staten Island, EWR
ServiceZoneVARCHAR(50)Yellow Zone, Boro Zone, Airports

DimFX (1,538 rows)

Daily USD/EUR exchange rates for all trading days 2019-2024.

ColumnTypeDescription
FXKeyINTPrimary key
DateDATETrading date
CurrencyFromVARCHAR(10)"USD"
CurrencyToVARCHAR(10)"EUR"
ExchangeRateDECIMAL(10,6)USD to EUR conversion rate

DimGDP (6 rows)

Annual US GDP 2019-2024.

ColumnTypeDescription
GDPKeyINTPrimary key
YearINTYear
CountryNameVARCHAR(100)"United States"
GDPDECIMAL(18,2)GDP in USD

Sample Data:

YearGDP (Trillions USD)
2019$21.38T
2020$21.06T
2021$23.32T
2022$25.60T
2023$27.29T
2024$28.75T

Fact Tables

FactTaxiDaily (14,827,172 rows)

Daily aggregated taxi metrics by pickup and dropoff zone.

ColumnTypeDescription
TaxiDailyKeyINTPrimary key
DateKeyINTFK to DimDate
PickupZoneKeyINTFK to DimZone (pickup location)
DropoffZoneKeyINTFK to DimZone (dropoff location)
TripCountINTNumber of trips
TotalPassengersINTSum of passengers
TotalDistanceDECIMALTotal miles traveled
TotalFareAmountDECIMALTotal fare revenue
TotalTipAmountDECIMALTotal tips
TotalTollAmountDECIMALTotal tolls
TotalAmountDECIMALTotal trip cost
AvgTripDistanceDECIMALAverage trip distance
AvgFareAmountDECIMALAverage fare
AvgTripDurationDECIMALAverage trip time (minutes)

FactAirQualityDaily (2,192 rows)

Daily PM2.5 air quality measurements from NYC monitoring stations.

ColumnTypeDescription
AirQualityDailyKeyINTPrimary key
DateKeyINTFK to DimDate
LocationIDBIGINTOpenAQ location identifier
LocationNameVARCHAR(200)Monitoring station name
AvgPM25DECIMALAverage daily PM2.5 (μg/m³)
MaxPM25DECIMALMaximum PM2.5 reading
MinPM25DECIMALMinimum PM2.5 reading
MeasurementCountINTNumber of hourly readings

Data Pipeline

Phase 1: Data Ingestion (Bronze)

  • Data Factory Pipelines: Automated download of 72 monthly NYC Taxi parquet files (2019-2024)
    • Parent pipeline loops through years
    • Child pipeline downloads 12 months per year
    • Sequential execution to avoid concurrent write conflicts
  • Dataflows Gen2: World Bank GDP, and ECB exchange rates
  • Notebook: OpenAQ (could not use Dataflows Gen2 because of needed API key)
  • Storage: Raw data lands in Lakehouse Bronze layer

Phase 2: Data Transformation (Silver)

  • PySpark Notebooks: Schema standardization, data cleaning, enrichment
  • Transformations Applied:
    • Added date/time dimensions (pickup_year, pickup_month, pickup_day, dayofweek)
    • Calculated derived metrics (trip_duration_minutes, speed_mph)
    • Standardized column names (lowercase)
    • Data quality validation and deduplication
    • Partitioned by year and month for optimal performance
  • Output: Delta tables in Lakehouse Silver layer (35.6M taxi records processed)

Phase 3: Data Modeling (Gold)

  • Star Schema Design: 4 dimension tables + 2 fact tables in Fabric Warehouse
  • Aggregations:
    • Taxi data aggregated from 35.6M trips → 14.8M daily zone pairs
    • Air quality data at daily grain
  • Population Method:
    1. Created Delta tables in Lakehouse using PySpark notebooks
    2. Inserted from Lakehouse to Warehouse using SQL

Phase 4: Analytics & Visualization

  • Star schema optimized for Power BI
  • SQL-ready for ad-hoc analysis

Data Sources

SourceTypeTime RangeRecordsUpdate Frequency
NYC TLC Taxi DataParquet2019-202435.6M tripsMonthly
OpenAQAPI (JSON)202457 locationsReal-time
ECB Exchange RatesAPI (CSV)2019-20241,538 trading daysDaily
World Bank GDPAPI (JSON)2019-20246 yearsAnnual

Technologies Used

  • Microsoft Fabric
    • Lakehouse (Delta Lake storage with partitioning)
    • Data Factory (Pipelines & Dataflows Gen2)
    • Notebooks (PySpark for transformations)
    • Warehouse (SQL analytics engine)
  • Languages: Python (PySpark), SQL
  • Data Formats: Delta Lake, Parquet, CSV, JSON
  • Architecture Pattern: Medallion (Bronze-Silver-Gold)

Key Achievements

Data Integration - Successfully integrated 4 heterogeneous data sources (Parquet, JSON APIs, CSV)
Scale - Processed 35.6M taxi trip records → 14.8M daily aggregates
Star Schema Design - Built production-ready dimensional model with 4 dimensions + 2 facts
Pipeline Automation - Implemented nested ForEach loops for multi-year batch ingestion
Performance Optimization - Partitioned data by year/month, generated surrogate keys efficiently
Cross-Domain Analytics - Enabled correlation analysis across mobility, environment, and economy

Data Highlights

  • Time Range: 2019-2024 (6 years, 2,192 days)
  • Geographic Coverage: 265 NYC taxi zones across 5 boroughs + airports
  • Volume: 35.6M raw taxi trips → 14.8M daily zone-pair aggregates
  • Economic Context: $21.38T to $28.75T GDP growth (34.5% increase)
  • Environmental Monitoring: Daily PM2.5 tracking from multiple NYC stations

Author

Ervinas Vilkaitis
Software Engineer Intern - Data Group
Itransition
January 2026

About

Final Project of the Internship "Software Engineer" in Data Group in a company "Itransition".

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages