# vermaa2/-etl-_120285 architecture

> Architecture diagram of the GitHub repository vermaa2/-etl-_120285, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vermaa2/-etl-_120285
- Repository: https://github.com/vermaa2/-etl-_120285

## Overview

##### Project Type and Purpose
- This is a standalone Python–based ETL pipeline for processing Washington State electric vehicle registration data.
- Purpose: extract raw CSV data, perform transformations to conform to a star-schema data model (one fact table + three dimension tables), and output CSV files ready for analytics.

##### File Structure Analysis
- Top-level script: etl_120285.py (contains all ETL logic: extract, transform, load).
- No separate “src” or “modules” directories—ETL logic lives entirely in etl_120285.py.
- Outputs (not in tree but described): dim_vehicle_make.csv, dim_vehicle_model.csv, dim_vehicle_location.csv, fact_vehicle_registration.csv, summary_statistics.csv.

##### README Insights
- ETL pipeline stages clearly delineated: Extract from `Electric_Vehicle_Population_Data.csv`, Transform into dimension and fact tables, Load into CSV files.
- Data model: star schema with one fact and three dimension tables.
- Summary statistics generation as a side-effect of Transform stage.

##### Main Components & Relationships
a. Components:
- Data Source: Electric_Vehicle_Population_Data.csv (raw input file)
- ETL Process (etl_120285.py):
– Extract module
– Transform module (deduplicate makes/models, encode vehicle type, compute stats)
– Load module (write output CSVs)
- Output Stores:
– dim_vehicle_make.csv
– dim_vehicle_model.csv
– dim_vehicle_location.csv
– fact_vehicle_registration.csv
– summary_statistics.csv
b. Interactions/Data Flow:
– Data Source → Extract
– Extracted data → Transform
– Transform splits into:
· Dimension tables → Load → dim_*.csv
· Fact table → Load → fact_vehicle_registration.csv
· Summary stats → Load → summary_statistics.csv
c. Architectural Patterns/Principles:
– ETL pipeline with clear stage separation (Extract/Transform/Load).
– Star schema for data warehousing (central fact, surrounding dimensions).
– Single-script, modular function organization—if diagramming internals, show sub-components (functions) in the Transform stage.
d. Key Technologies:
– Python 3 script
– CSV files as both source and sink
– Pandas (presumed) or built-in CSV libraries
– Star schema relational model concepts

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Documentation
    subgraph "Documentation"
        README["README.md"]:::doc
        Wiki["Wiki_Page.md"]:::doc
    end

    %% Input Data
    RawData["Electric_Vehicle_Population_Data.csv"]:::storage

    %% ETL Process
    subgraph "ETL Process"
        Extract["Extract(csv)"]:::process
        Transform["Transform(DataFrame)"]:::process
        Load["Load to CSV"]:::process
    end

    %% Outputs
    subgraph "Output Files"
        DimMake["dim_vehicle_make.csv"]:::storage
        DimModel["dim_vehicle_model.csv"]:::storage
        DimLoc["dim_vehicle_location.csv"]:::storage
        Fact["fact_vehicle_registration.csv"]:::storage
        Stats["summary_statistics.csv"]:::storage
    end

    %% Star Schema Conceptual Model
    subgraph "Star Schema"
        Fact2["fact_vehicle_registration"]:::schema
        DimMake2["dim_vehicle_make"]:::schema
        DimModel2["dim_vehicle_model"]:::schema
        DimLoc2["dim_vehicle_location"]:::schema
    end

    %% Data Flow
    README --- RawData
    Wiki --- RawData
    RawData -->|"raw CSV → DataFrame"| Extract
    Extract -->|"DataFrame"| Transform
    Transform -->|"deduplicated dims"| Load
    Load -->|"write CSV"| DimMake
    Load -->|"write CSV"| DimModel
    Load -->|"write CSV"| DimLoc
    Load -->|"write CSV"| Fact
    Transform -->|"stats DataFrame"| Stats

    %% Star Schema Relationships
    DimMake2 -->|"FK: make_id"| Fact2
    DimModel2 -->|"FK: model_id"| Fact2
    DimLoc2 -->|"FK: location_id"| Fact2

    %% Click Events
    click Extract "https://github.com/vermaa2/-etl-_120285/blob/main/etl_120285.py"
    click Transform "https://github.com/vermaa2/-etl-_120285/blob/main/etl_120285.py"
    click Load "https://github.com/vermaa2/-etl-_120285/blob/main/etl_120285.py"
    click README "https://github.com/vermaa2/-etl-_120285/blob/main/README.md"
    click Wiki "https://github.com/vermaa2/-etl-_120285/blob/main/Wiki_Page.md"

    %% Styles
    classDef process fill:#90CDF4,stroke:#2B6CB0,color:#1A365D,stroke-width:1px;
    classDef storage fill:#9AE6B4,stroke:#2F855A,color:#22543D,stroke-width:1px;
    classDef schema fill:#FBD38D,stroke:#D69E2E,color:#744210,stroke-width:1px;
    classDef doc fill:#E9D8FD,stroke:#805AD5,color:#44337A,stroke-width:1px;
```
