# cdrowley/ceg8719 architecture

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

- Interactive diagram: https://gitdiagram.com/cdrowley/ceg8719
- Repository: https://github.com/cdrowley/ceg8719

## Overview

##### Project Type and Purpose
- This project is a research and coursework submission tool for geospatial data handling. Its main purpose is to collect, preprocess, and document geospatial datasets. It also serves as a development environment that runs both data collection scripts (using notebooks and Python scripts) and a Jupyter Book for curated documentation and analysis.
- In the README, you notice references to “data collection notebooks,” “building the book,” and eventual integration into a cloud PostgreSQL database, which explains the multi-faceted focus: data ingestion, processing, and documentation.

##### File Structure
- A .devcontainer directory contains Dockerfile and Codespace configuration files. This indicates that the development environment is containerized – essential for reproducibility.
- The .github directory holds the deployment workflow script, suggesting CI/CD is in use.
- Top-level files such as Makefile, environment examples, and configuration files imply scripted tasks for building virtual environments and building the Jupyter book.
- Several directories are key:
- book: Contains the Jupyter book content, including notebooks (.ipynb) and markdown for the book’s chapters (e.g., data_access.md, discussion.md) along with configuration files for Jupytext.
- data: Contains subdirectories for different data sources (cdrc and ons) with parquet and PDF files, clearly intended as the repository for pre-processed data.
- data_collection: Houses data collection notebooks and scripts (both .ipynb and .py), along with utility functions and a TODO file, providing the layer to gather and organize data.
- Supporting files such as requirements_dev.txt and requirements_book.txt indicate separate dependency management for development and book generation.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top Layer: Development Environment and CI/CD Pipeline
    subgraph "Top Layer"
        DC["Dev Container"]:::dev
        CICD["CI/CD Pipeline"]:::cicd
    end

    %% Supporting Scripts & Configurations
    subgraph "Supporting Scripts & Configurations"
        MF["Makefile"]:::scripts
        ENV[".env-example"]:::scripts
        CF["_config.yml"]:::scripts
        TOC["_toc.yml"]:::scripts
        RDV["requirements_dev.txt"]:::scripts
        RDB["requirements_book.txt"]:::scripts
    end

    %% Data Collection Layer
    subgraph "Data Collection Layer"
        DCOL["Data Collection"]:::collect
    end

    %% Data Storage/Preprocessing Layer
    subgraph "Data Storage/Preprocessing Layer"
        DS["Data Storage"]:::storage
    end

    %% Documentation & Presentation Layer
    subgraph "Documentation & Presentation Layer"
        JB["Jupyter Book"]:::doc
    end

    %% Connections
    DC -->|"sets_environment"| MF
    CICD -->|"triggers_build"| MF
    MF -->|"executes_collection"| DCOL
    DCOL -->|"feeds_data"| DS
    DCOL -->|"provides_analysis"| JB
    DS -->|"supplies_preprocessed"| JB

    %% Click Events for Top Layer
    click DC "https://github.com/cdrowley/ceg8719/tree/main/.devcontainer/"
    click CICD "https://github.com/cdrowley/ceg8719/blob/main/.github/workflows/deploy.yml"

    %% Click Events for Supporting Scripts & Configurations
    click MF "https://github.com/cdrowley/ceg8719/tree/main/Makefile"
    click ENV "https://github.com/cdrowley/ceg8719/blob/main/.env-example"
    click CF "https://github.com/cdrowley/ceg8719/blob/main/_config.yml"
    click TOC "https://github.com/cdrowley/ceg8719/blob/main/_toc.yml"
    click RDV "https://github.com/cdrowley/ceg8719/blob/main/requirements_dev.txt"
    click RDB "https://github.com/cdrowley/ceg8719/blob/main/requirements_book.txt"

    %% Click Events for Other Layers
    click DCOL "https://github.com/cdrowley/ceg8719/tree/main/data_collection/"
    click DS "https://github.com/cdrowley/ceg8719/tree/main/data/"
    click JB "https://github.com/cdrowley/ceg8719/tree/main/book/"

    %% Styles
    classDef dev fill:#f9c74f,stroke:#000,stroke-width:2px;
    classDef cicd fill:#90be6d,stroke:#000,stroke-width:2px;
    classDef scripts fill:#f8961e,stroke:#000,stroke-width:2px;
    classDef collect fill:#f94144,stroke:#000,stroke-width:2px;
    classDef storage fill:#577590,stroke:#000,stroke-width:2px;
    classDef doc fill:#43aa8b,stroke:#000,stroke-width:2px;
```
