# matylerb/dcps2project architecture

> Architecture diagram of the GitHub repository matylerb/dcps2project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matylerb/dcps2project
- Repository: https://github.com/matylerb/dcps2project

## Overview

This is a Dublin Bus cancellation-analysis project that turns GTFS schedules and service exceptions into route/day cancellation summaries, statistical findings, charts, and written reports. The documented workflow is data engineering → analysis → visualisation → reporting, but the checked-in entry point reads already-processed CSVs rather than running the GTFS engineering pipeline. The map distinguishes that executable orchestration from the documented data-preparation flow; unsampled analysis internals and notebook details are not inferred.

Main entry points: [`data/processed`](https://github.com/matylerb/dcps2project/tree/main/data/processed) (Processed cancellation data), [`main.py`](https://github.com/matylerb/dcps2project/blob/main/main.py) (Pipeline entry point), [`src/data_engineering.py`](https://github.com/matylerb/dcps2project/blob/main/src/data_engineering.py) (GTFS engineering), [`src/visualisation.py`](https://github.com/matylerb/dcps2project/blob/main/src/visualisation.py) (Cancellation charts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_engineering["GTFS engineering"]
  node_web_scraping["Supplementary scraping"]
  node_processed["Processed cancellation data"]
end

subgraph group_insight["Analysis"]
  node_analysis["Statistical analysis<br/>[ananlysis.py]"]
end

subgraph group_outputs["Results"]
  node_visualisation["Cancellation charts<br/>[visualisation.py]"]
  node_figures["Generated figures"]
  node_reporting["Report generation<br/>[reporting.py]"]
  node_reports["Written and EDA reports"]
end

subgraph group_runtime["Pipeline runtime"]
  node_main["Pipeline entry point<br/>[main.py]"]
end

node_gtfs["GTFS source data"]
node_dublin_live["Dublin Live"]
node_met_eireann["Met Éireann"]

node_gtfs -->|"loads and cleans"| node_engineering
node_engineering -->|"exports summaries"| node_processed
node_engineering -->|"performs scraping"| node_web_scraping
node_web_scraping -->|"requests news"| node_dublin_live
node_web_scraping -->|"requests weather"| node_met_eireann
node_processed -.->|"provides analysis data"| node_analysis
node_processed -->|"loads CSVs"| node_visualisation
node_visualisation -->|"saves charts"| node_figures
node_processed -->|"loads CSVs"| node_reporting
node_reporting -->|"writes report"| node_reports
node_main -->|"reads summaries"| node_processed
node_main -->|"runs analysis"| node_analysis
node_main -->|"runs charts"| node_visualisation
node_main -->|"generates report"| node_reporting

click node_engineering "https://github.com/matylerb/dcps2project/blob/main/src/data_engineering.py"
click node_web_scraping "https://github.com/matylerb/dcps2project/blob/main/src/data_engineering.py"
click node_processed "https://github.com/matylerb/dcps2project/tree/main/data/processed"
click node_analysis "https://github.com/matylerb/dcps2project/blob/main/src/ananlysis.py"
click node_visualisation "https://github.com/matylerb/dcps2project/blob/main/src/visualisation.py"
click node_figures "https://github.com/matylerb/dcps2project/tree/main/outputs/figures"
click node_reporting "https://github.com/matylerb/dcps2project/blob/main/src/reporting.py"
click node_reports "https://github.com/matylerb/dcps2project/tree/main/outputs/reports"
click node_main "https://github.com/matylerb/dcps2project/blob/main/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_engineering,node_web_scraping,node_processed toneBlue
class node_analysis toneAmber
class node_visualisation,node_figures,node_reporting,node_reports toneMint
class node_main toneRose
class node_gtfs,node_dublin_live,node_met_eireann toneIndigo
```

## Components

### Data preparation

- [GTFS engineering](https://github.com/matylerb/dcps2project/blob/main/src/data_engineering.py): `src/data_engineering.py`
- [Supplementary scraping](https://github.com/matylerb/dcps2project/blob/main/src/data_engineering.py): `src/data_engineering.py`
- [Processed cancellation data](https://github.com/matylerb/dcps2project/tree/main/data/processed): `data/processed`

### Analysis

- [Statistical analysis](https://github.com/matylerb/dcps2project/blob/main/src/ananlysis.py): `src/ananlysis.py`

### Results

- [Cancellation charts](https://github.com/matylerb/dcps2project/blob/main/src/visualisation.py): `src/visualisation.py`
- [Generated figures](https://github.com/matylerb/dcps2project/tree/main/outputs/figures): `outputs/figures`
- [Report generation](https://github.com/matylerb/dcps2project/blob/main/src/reporting.py): `src/reporting.py`
- [Written and EDA reports](https://github.com/matylerb/dcps2project/tree/main/outputs/reports): `outputs/reports`

### Pipeline runtime

- [Pipeline entry point](https://github.com/matylerb/dcps2project/blob/main/main.py): `main.py`

### Other components

- **GTFS source data**
- **Dublin Live**
- **Met Éireann**

## Connections

- GTFS source data → GTFS engineering: loads and cleans (evidence: `Readme.md`)
- GTFS engineering → Processed cancellation data: exports summaries (evidence: `src/data_engineering.py`)
- GTFS engineering → Supplementary scraping: performs scraping (evidence: `Readme.md`)
- Supplementary scraping → Dublin Live: requests news (evidence: `src/data_engineering.py`)
- Supplementary scraping → Met Éireann: requests weather (evidence: `src/data_engineering.py`)
- Processed cancellation data → Statistical analysis: provides analysis data (evidence: `Readme.md`)
- Processed cancellation data → Cancellation charts: loads CSVs (evidence: `src/visualisation.py`)
- Cancellation charts → Generated figures: saves charts (evidence: `src/visualisation.py`)
- Processed cancellation data → Report generation: loads CSVs (evidence: `src/reporting.py`)
- Report generation → Written and EDA reports: writes report (evidence: `src/reporting.py`)
- Pipeline entry point → Processed cancellation data: reads summaries (evidence: `main.py`)
- Pipeline entry point → Statistical analysis: runs analysis (evidence: `main.py`)
- Pipeline entry point → Cancellation charts: runs charts (evidence: `main.py`)
- Pipeline entry point → Report generation: generates report (evidence: `main.py`)
