# div-s-1812/da_practical9_mapreduce architecture

> Architecture diagram of the GitHub repository div-s-1812/da_practical9_mapreduce, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/div-s-1812/da_practical9_mapreduce
- Repository: https://github.com/div-s-1812/da_practical9_mapreduce

## Overview

This is a small MapReduce word-count example, despite the inverted-index filename: it splits input lines into words, counts occurrences, then displays the results as a Pandas table and chart. The script configures and runs an mrjob job over `inputtext1.txt`; the framework dispatches to the mapper and reducer. The excerpts show result parsing and plotting, but not mrjob’s internal dispatch, so those framework links are marked unverified.

Main entry points: [`MapReduce_InvertedIndex.py`](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py) (Job script), [`inputtext1.txt`](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/inputtext1.txt) (Input text)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_script["Job script"]
node_input["Input text<br/>[inputtext1.txt]"]
node_runtime["mrjob runtime"]
node_mapper["Word mapper"]
node_reducer["Count reducer"]
node_table["Count table"]
node_chart["Word chart"]

node_user -->|"runs"| node_script
node_script -->|"selects input"| node_input
node_script -->|"runs job"| node_runtime
node_runtime -.->|"dispatches"| node_mapper
node_runtime -.->|"dispatches"| node_reducer
node_script -->|"builds table"| node_table
node_script -->|"saves chart"| node_chart

click node_script "https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py"
click node_input "https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/inputtext1.txt"
click node_mapper "https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py"
click node_reducer "https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.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_user toneBlue
class node_script,node_input,node_mapper,node_reducer toneTeal
class node_runtime,node_table,node_chart toneIndigo
```

## Components

### Other components

- **User**
- [Job script](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py): `MapReduce_InvertedIndex.py`
- [Input text](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/inputtext1.txt): `inputtext1.txt`
- **mrjob runtime**
- [Word mapper](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py): `MapReduce_InvertedIndex.py`
- [Count reducer](https://github.com/div-s-1812/da_practical9_mapreduce/blob/main/MapReduce_InvertedIndex.py): `MapReduce_InvertedIndex.py`
- **Count table**
- **Word chart**

## Connections

- User → Job script: runs (evidence: `MapReduce_InvertedIndex.py`)
- Job script → Input text: selects input (evidence: `MapReduce_InvertedIndex.py`)
- Job script → mrjob runtime: runs job (evidence: `MapReduce_InvertedIndex.py`)
- mrjob runtime → Word mapper: dispatches
- mrjob runtime → Count reducer: dispatches
- Job script → Count table: builds table (evidence: `MapReduce_InvertedIndex.py`)
- Job script → Word chart: saves chart (evidence: `MapReduce_InvertedIndex.py`)
