# asadrehmann/data-gathering-using-api-project architecture

> Architecture diagram of the GitHub repository asadrehmann/data-gathering-using-api-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/asadrehmann/data-gathering-using-api-project
- Repository: https://github.com/asadrehmann/data-gathering-using-api-project

## Overview

This is a small TMDB movie-data collection and exploratory-analysis project. Its evidenced collection workflow is initiated through main_scripts.py, which fetches movie pages and saves the results as JSON. Separately, der_module/eda.py reads a CSV, cleans and summarizes it, and displays plots and analysis results. README capabilities describe this broader analysis workflow; the feature-generation and train/predict modules are placeholder loops, so they are not represented as working stages.

Main entry points: [`main_scripts.py`](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/main_scripts.py) (Collection entry point), [`der_module/fetch_data.py`](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/fetch_data.py) (Movie fetcher), [`der_module/save_data.py`](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/save_data.py) (JSON writer), [`der_module/eda.py`](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/eda.py) (Cleaning and EDA)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_runner["Collection entry point<br/>[main_scripts.py]"]
  node_fetch["Movie fetcher<br/>[fetch_data.py]"]
  node_save["JSON writer<br/>[save_data.py]"]
  node_raw["Raw movie JSON<br/>[movies.json]"]
end

subgraph group_analysis["Exploratory analysis"]
  node_eda["Cleaning and EDA<br/>[eda.py]"]
  node_analyst["Analysis results"]
end

node_user(("Project user"))
node_tmdb["TMDB API"]
node_csv["Analysis CSV input"]

node_user -->|"runs"| node_runner
node_runner -->|"calls"| node_fetch
node_fetch -->|"requests pages"| node_tmdb
node_runner -->|"passes movies"| node_save
node_save -->|"writes JSON"| node_raw
node_csv -->|"reads CSV"| node_eda
node_eda -->|"displays findings"| node_analyst

click node_runner "https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/main_scripts.py"
click node_fetch "https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/fetch_data.py"
click node_save "https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/save_data.py"
click node_raw "https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/data/raw/movies.json"
click node_eda "https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/eda.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_runner,node_fetch,node_save,node_raw,node_user toneBlue
class node_eda,node_analyst toneAmber
class node_tmdb toneMint
class node_csv toneIndigo
```

## Components

### Data collection

- [Collection entry point](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/main_scripts.py): `main_scripts.py`
- [Movie fetcher](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/fetch_data.py): `der_module/fetch_data.py`
- [JSON writer](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/save_data.py): `der_module/save_data.py`
- [Raw movie JSON](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/data/raw/movies.json): `data/raw/movies.json`

### Exploratory analysis

- [Cleaning and EDA](https://github.com/asadrehmann/data-gathering-using-api-project/blob/main/der_module/eda.py): `der_module/eda.py`
- **Analysis results**

### Other components

- **Project user**
- **TMDB API**
- **Analysis CSV input**

## Connections

- Project user → Collection entry point: runs
- Collection entry point → Movie fetcher: calls
- Movie fetcher → TMDB API: requests pages
- Collection entry point → JSON writer: passes movies
- JSON writer → Raw movie JSON: writes JSON
- Analysis CSV input → Cleaning and EDA: reads CSV
- Cleaning and EDA → Analysis results: displays findings
