# kottakotavenkatakeerthika/bankunited-market-expansion architecture

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

- Interactive diagram: https://gitdiagram.com/kottakotavenkatakeerthika/bankunited-market-expansion
- Repository: https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion

## Overview

This is a BankUnited market-expansion analysis prototype. Its main workflow rebuilds metro-level data from public banking and economic sources, validates the resulting tables, derives four analytical pillars, and combines them into market-attractiveness rankings and scenario outputs. BankUnited fit and feasibility are modeled alongside the attractiveness score. The pipeline orchestration and scoring-run excerpts establish the main control flow; some ingestion and scoring internals were not sampled, so their individual connections are limited to documented or indexed references.

Main entry points: [`src/scoring/run.py`](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/run.py) (Scoring runner), [`src/run_pipeline.py`](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/run_pipeline.py) (Pipeline runner), [`src/market_attractiveness.py`](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/market_attractiveness.py) (Market attractiveness), [`data/processed`](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/data/processed) (Processed modeling tables)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_pipeline["Pipeline runner<br/>[run_pipeline.py]"]
  node_config["Project configuration<br/>[config.py]"]
  node_crosswalk["County metro crosswalk<br/>[crosswalk.py]"]
  node_ingest["Source ingestion"]
  node_utils["Fetch and interim helpers<br/>[utils.py]"]
  node_panel["Panel builder<br/>[build_panel.py]"]
  node_checks["Data checks<br/>[checks.py]"]
  node_processed[("Processed modeling tables")]
end

subgraph group_metrics["Market metrics"]
  node_settings["Model settings<br/>[settings.toml]"]
  node_p1["Lending metrics<br/>[pillar1.py]"]
  node_p2["Deposits metrics<br/>[pillar2.py]"]
  node_p3["Competition metrics<br/>[pillar3.py]"]
  node_p4["Market quality metrics<br/>[pillar4.py]"]
  node_fit["BankUnited fit<br/>[fit.py]"]
  node_common["Metric definitions<br/>[common.py]"]
end

subgraph group_scoring["Scoring and scenarios"]
  node_asof["Release-date adjustment<br/>[asof.py]"]
  node_score_run["Scoring runner<br/>[run.py]"]
  node_engine["Pillar score engine<br/>[engine.py]"]
  node_attract["Market attractiveness"]
  node_scenarios["Scenario comparison"]
  node_weights["Weight scenarios"]
end

subgraph group_results["Outputs and review"]
  node_scores["Pillar score files"]
  node_final_scores["Market rankings"]
end

node_analyst(("Analyst"))

node_pipeline -->|"reads settings"| node_config
node_pipeline -->|"builds when needed"| node_crosswalk
node_pipeline -->|"dispatches sources"| node_ingest
node_pipeline -->|"builds tables"| node_panel
node_pipeline -->|"runs checks"| node_checks
node_ingest -->|"maps counties"| node_crosswalk
node_ingest -->|"writes interim data"| node_utils
node_pipeline -->|"rebuilds modeling tables"| node_processed
node_panel -->|"writes tables"| node_processed
node_checks -->|"validates tables"| node_processed
node_score_run -->|"loads tables"| node_processed
node_score_run -->|"loads settings"| node_settings
node_score_run -->|"adjusts by date"| node_asof
node_score_run -->|"builds metrics"| node_p1
node_score_run -->|"builds metrics"| node_p2
node_score_run -->|"builds metrics"| node_p3
node_score_run -->|"builds metrics"| node_p4
node_p1 -->|"uses definitions"| node_common
node_p2 -->|"uses definitions"| node_common
node_p3 -->|"uses definitions"| node_common
node_p4 -->|"uses definitions"| node_common
node_score_run -->|"writes pillar files"| node_engine
node_engine -->|"writes scores"| node_scores
node_score_run -->|"runs final score"| node_attract
node_attract -->|"applies fit logic"| node_fit
node_score_run -->|"runs scenarios"| node_scenarios
node_scenarios -->|"loads configurations"| node_weights
node_scenarios -->|"scores scenarios"| node_attract
node_attract -->|"writes rankings"| node_final_scores
node_analyst -->|"runs refresh"| node_pipeline
node_analyst -->|"runs scoring"| node_score_run
node_analyst -.->|"reviews rankings"| node_final_scores

click node_pipeline "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/run_pipeline.py"
click node_config "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/config.py"
click node_crosswalk "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/crosswalk.py"
click node_ingest "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/src"
click node_utils "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/utils.py"
click node_panel "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/build_panel.py"
click node_checks "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/checks.py"
click node_processed "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/data/processed"
click node_settings "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/config/settings.toml"
click node_p1 "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar1.py"
click node_p2 "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar2.py"
click node_p3 "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar3.py"
click node_p4 "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar4.py"
click node_fit "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/fit.py"
click node_common "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/common.py"
click node_asof "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/asof.py"
click node_score_run "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/run.py"
click node_engine "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/engine.py"
click node_attract "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/market_attractiveness.py"
click node_scenarios "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/compare_scenarios.py"
click node_weights "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/weights"
click node_scores "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/outputs/pillar_scores"
click node_final_scores "https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/outputs/final_scores"

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_pipeline,node_config,node_crosswalk,node_ingest,node_utils,node_panel,node_checks,node_processed toneBlue
class node_settings,node_p1,node_p2,node_p3,node_p4,node_fit,node_common toneAmber
class node_asof,node_score_run,node_engine,node_attract,node_scenarios,node_weights toneMint
class node_scores,node_final_scores toneRose
class node_analyst toneIndigo
```

## Components

### Data preparation

- [Pipeline runner](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/run_pipeline.py): `src/run_pipeline.py`
- [Project configuration](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/config.py): `src/config.py`
- [County metro crosswalk](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/crosswalk.py): `src/crosswalk.py`
- [Source ingestion](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/src): `src`
- [Fetch and interim helpers](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/utils.py): `src/utils.py`
- [Panel builder](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/build_panel.py): `src/build_panel.py`
- [Data checks](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/checks.py): `src/checks.py`
- [Processed modeling tables](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/data/processed): `data/processed`

### Market metrics

- [Model settings](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/config/settings.toml): `config/settings.toml`
- [Lending metrics](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar1.py): `src/scoring/pillar1.py`
- [Deposits metrics](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar2.py): `src/scoring/pillar2.py`
- [Competition metrics](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar3.py): `src/scoring/pillar3.py`
- [Market quality metrics](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/pillar4.py): `src/scoring/pillar4.py`
- [BankUnited fit](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/fit.py): `src/scoring/fit.py`
- [Metric definitions](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/common.py): `src/scoring/common.py`

### Scoring and scenarios

- [Release-date adjustment](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/asof.py): `src/scoring/asof.py`
- [Scoring runner](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/run.py): `src/scoring/run.py`
- [Pillar score engine](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/scoring/engine.py): `src/scoring/engine.py`
- [Market attractiveness](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/market_attractiveness.py): `src/market_attractiveness.py`
- [Scenario comparison](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/blob/main/src/compare_scenarios.py): `src/compare_scenarios.py`
- [Weight scenarios](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/weights): `weights`

### Outputs and review

- [Pillar score files](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/outputs/pillar_scores): `outputs/pillar_scores`
- [Market rankings](https://github.com/kottakotavenkatakeerthika/bankunited-market-expansion/tree/main/outputs/final_scores): `outputs/final_scores`

### Other components

- **Analyst**

## Connections

- Pipeline runner → Project configuration: reads settings (evidence: `src/run_pipeline.py`)
- Pipeline runner → County metro crosswalk: builds when needed (evidence: `src/run_pipeline.py`)
- Pipeline runner → Source ingestion: dispatches sources (evidence: `src/run_pipeline.py`)
- Pipeline runner → Panel builder: builds tables (evidence: `src/run_pipeline.py`)
- Pipeline runner → Data checks: runs checks (evidence: `src/run_pipeline.py`)
- Source ingestion → County metro crosswalk: maps counties (evidence: `src/ingest_fdic.py`)
- Source ingestion → Fetch and interim helpers: writes interim data (evidence: `src/ingest_fdic.py`)
- Pipeline runner → Processed modeling tables: rebuilds modeling tables (evidence: `README.md`)
- Panel builder → Processed modeling tables: writes tables (evidence: `README.md`)
- Data checks → Processed modeling tables: validates tables (evidence: `README.md`)
- Scoring runner → Processed modeling tables: loads tables (evidence: `src/scoring/run.py`)
- Scoring runner → Model settings: loads settings (evidence: `src/scoring/run.py`)
- Scoring runner → Release-date adjustment: adjusts by date (evidence: `src/scoring/run.py`)
- Scoring runner → Lending metrics: builds metrics (evidence: `src/scoring/run.py`)
- Scoring runner → Deposits metrics: builds metrics (evidence: `src/scoring/run.py`)
- Scoring runner → Competition metrics: builds metrics (evidence: `src/scoring/run.py`)
- Scoring runner → Market quality metrics: builds metrics (evidence: `src/scoring/run.py`)
- Lending metrics → Metric definitions: uses definitions (evidence: `src/scoring/pillar1.py`)
- Deposits metrics → Metric definitions: uses definitions (evidence: `src/scoring/pillar2.py`)
- Competition metrics → Metric definitions: uses definitions (evidence: `src/scoring/pillar3.py`)
- Market quality metrics → Metric definitions: uses definitions (evidence: `src/scoring/pillar4.py`)
- Scoring runner → Pillar score engine: writes pillar files (evidence: `src/scoring/run.py`)
- Pillar score engine → Pillar score files: writes scores (evidence: `src/scoring/engine.py`)
- Scoring runner → Market attractiveness: runs final score (evidence: `src/scoring/run.py`)
- Market attractiveness → BankUnited fit: applies fit logic (evidence: `src/market_attractiveness.py`)
- Scoring runner → Scenario comparison: runs scenarios (evidence: `src/scoring/run.py`)
- Scenario comparison → Weight scenarios: loads configurations (evidence: `README.md`)
- Scenario comparison → Market attractiveness: scores scenarios (evidence: `src/compare_scenarios.py`)
- Market attractiveness → Market rankings: writes rankings (evidence: `README.md`)
- Analyst → Pipeline runner: runs refresh (evidence: `README.md`)
- Analyst → Scoring runner: runs scoring (evidence: `src/scoring/run.py`)
- Analyst → Market rankings: reviews rankings
