# oscarski/research-workshop-cognitive-science-and-ai architecture

> Architecture diagram of the GitHub repository oscarski/research-workshop-cognitive-science-and-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oscarski/research-workshop-cognitive-science-and-ai
- Repository: https://github.com/oscarski/research-workshop-cognitive-science-and-ai

## Overview

##### Project Type and Purpose
- This is a data‐analysis pipeline focused on survey data for “Virtual Agent Perception Analysis.”
- It ingests raw CSVs, cleans and prepares the data, runs statistical models, and produces visualizations and a cleaned dataset.

##### File Structure Analysis
- Top level:
- data_cleaning.py – ETL/cleaning routines
- data_analysis.py – statistical modeling and orchestration
- cleaned_data.csv – processed output
- Version 1–4 .csv files – raw survey inputs
- Subdirectory (per README):
- Visualizations/ – charts and figures
- No frontend/backend split – it’s a single‐machine pipeline in Python.

##### Key Components
a. Data Sources
- Version1.csv, Version2.csv, Version3.csv, Version4.csv
b. Data Cleaning Module
- data_cleaning.py
- tasks: load raw, handle missing, cast types, create participant IDs, filter
c. Cleaned Data Store
- cleaned_data.csv
d. Analysis Module
- data_analysis.py
- tasks: compute composite scores, run logistic & ordinal regressions, descriptive stats
e. Visualization Module
- uses matplotlib & seaborn to produce .png files in Visualizations/
f. Outputs
- cleaned_data.csv
- composite_scores.png, demographics.png, rq1_consistency_persuasion.png

##### Relationships & Data Flow
- Cleaning Module → cleaned_data.csv
- cleaned_data.csv → Analysis Module
- Analysis Module → Visualization Module
- Visualization Module → output .png files

##### Architectural Patterns & Principles
- Single responsibility per script
- File‐based communication (CSV + PNG artifacts)
- Modular design: cleaning vs. analysis

##### Technologies & Frameworks
- Python 3.x
- pandas, numpy for data handling
- matplotlib, seaborn for viz
- statsmodels & scipy for statistical models

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    subgraph "Data Sources"
        V1["Version1.csv"]:::dataSource
        V2["Version2.csv"]:::dataSource
        V3["Version3.csv"]:::dataSource
        V4["Version4.csv"]:::dataSource
    end

    %% Processing Modules
    subgraph "Processing Modules"
        Cleaning["Data Cleaning Module\n(ETL & anonymization)"]:::processing
        Analysis["Analysis Module\n(statistical modeling)"]:::processing
        Vis["Visualization Module"]:::processing
    end

    %% Data Storage
    subgraph "Data Storage"
        Cleaned["cleaned_data.csv"]:::dataSource
    end

    %% Outputs
    subgraph "Outputs"
        CS["composite_scores.png"]:::output
        Dem["demographics.png"]:::output
        RQ["rq1_consistency_persuasion.png"]:::output
    end

    %% Data Flow
    V1 --> Cleaning
    V2 --> Cleaning
    V3 --> Cleaning
    V4 --> Cleaning
    Cleaning --> Cleaned
    Cleaned --> Analysis
    Analysis --> Vis
    Vis --> CS
    Vis --> Dem
    Vis --> RQ
    Analysis -->|"refine data"| Cleaning    

    %% Click Events
    click V1 "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/Version 1 - Version 1 (2).csv"
    click V2 "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/Version 2 - Version 2 (1).csv"
    click V3 "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/Version 3 - Version 3 (1).csv"
    click V4 "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/Version 4 - Version 4 (1).csv"
    click Cleaning "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/data_cleaning.py"
    click Cleaned "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/cleaned_data.csv"
    click Analysis "https://github.com/oscarski/research-workshop-cognitive-science-and-ai/blob/master/data_analysis.py"

    %% Styles
    classDef dataSource fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef processing fill:#90EE90,stroke:#333,stroke-width:1px
    classDef output fill:#DDA0DD,stroke:#333,stroke-width:1px
```
