# piyu98909/ev-station-findernewui architecture

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

- Interactive diagram: https://gitdiagram.com/piyu98909/ev-station-findernewui
- Repository: https://github.com/piyu98909/ev-station-findernewui

## Overview

The repository appears to be an EV-station web application with station data and precomputed model artifacts. The sampled model-preparation script reads the station CSV, fits a geographic nearest-neighbor index, and writes two artifacts. The README is empty, and app.py was not sampled, so the web request flow, UI-to-server connection, and use of the charging-time model cannot be verified; those relationships are omitted.

Main entry points: [`build_models.py`](https://github.com/piyu98909/ev-station-findernewui/blob/main/build_models.py) (Model preparation), [`ev_stations_csv.csv`](https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_stations_csv.csv) (Station dataset), [`ev_data.pkl`](https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_data.pkl) (Prepared station data), [`knn_model.pkl`](https://github.com/piyu98909/ev-station-findernewui/blob/main/knn_model.pkl) (Nearest-neighbor model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_ui["Web interface<br/>[index &#40;2&#41;.html]"]
  node_server["Application server<br/>[app.py]"]
end

subgraph group_assets["Data and models"]
  node_station_data[("Station dataset")]
  node_ev_data[("Prepared station data<br/>[ev_data.pkl]")]
  node_knn_model[("Nearest-neighbor model<br/>[knn_model.pkl]")]
  node_charging_model[("Charging-time model")]
end

subgraph group_prep["Model preparation"]
  node_model_builder["Model preparation<br/>[build_models.py]"]
end

node_user(("User"))

node_model_builder -->|"reads"| node_station_data
node_model_builder -->|"writes"| node_ev_data
node_model_builder -->|"writes"| node_knn_model

click node_ui "https://github.com/piyu98909/ev-station-findernewui/blob/main/index%20(2).html"
click node_server "https://github.com/piyu98909/ev-station-findernewui/blob/main/app.py"
click node_station_data "https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_stations_csv.csv"
click node_ev_data "https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_data.pkl"
click node_knn_model "https://github.com/piyu98909/ev-station-findernewui/blob/main/knn_model.pkl"
click node_charging_model "https://github.com/piyu98909/ev-station-findernewui/blob/main/charging_time_model.pkl"
click node_model_builder "https://github.com/piyu98909/ev-station-findernewui/blob/main/build_models.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_ui,node_server,node_user toneBlue
class node_station_data,node_ev_data,node_knn_model,node_charging_model toneAmber
class node_model_builder toneMint
```

## Components

### Web application

- [Web interface](https://github.com/piyu98909/ev-station-findernewui/blob/main/index%20(2).html): `index (2).html`
- [Application server](https://github.com/piyu98909/ev-station-findernewui/blob/main/app.py): `app.py`

### Data and models

- [Station dataset](https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_stations_csv.csv): `ev_stations_csv.csv`
- [Prepared station data](https://github.com/piyu98909/ev-station-findernewui/blob/main/ev_data.pkl): `ev_data.pkl`
- [Nearest-neighbor model](https://github.com/piyu98909/ev-station-findernewui/blob/main/knn_model.pkl): `knn_model.pkl`
- [Charging-time model](https://github.com/piyu98909/ev-station-findernewui/blob/main/charging_time_model.pkl): `charging_time_model.pkl`

### Model preparation

- [Model preparation](https://github.com/piyu98909/ev-station-findernewui/blob/main/build_models.py): `build_models.py`

### Other components

- **User**

## Connections

- Model preparation → Station dataset: reads (evidence: `build_models.py`)
- Model preparation → Prepared station data: writes (evidence: `build_models.py`)
- Model preparation → Nearest-neighbor model: writes (evidence: `build_models.py`)
