# misbaou672/velib-optim architecture

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

- Interactive diagram: https://gitdiagram.com/misbaou672/velib-optim
- Repository: https://github.com/misbaou672/velib-optim

## Overview

Velib-Optim analyzes Vélib station locations and availability, then presents network analysis and route-planning results in an interactive map. The main workflow is data loading (including a documented live OpenData feed), spatial/graph analysis, and map output; the map also exposes search, station comparison, charts, and network-health views. The sampled excerpts confirm the live API mapping and map interface elements, but omit parts of the Python orchestration and algorithm implementations, so uncertain wiring is left out.

Main entry points: [`optimisation_velib.py`](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py) (Station data loader), [`carte_velib_optimisee.html`](https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html) (Interactive map), [`server.py`](https://github.com/misbaou672/velib-optim/blob/main/server.py) (Local map server), [`data/stations_velib.json`](https://github.com/misbaou672/velib-optim/blob/main/data/stations_velib.json) (Station datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data and ingestion"]
  node_loader["Station data loader"]
  node_station_data[("Station datasets")]
  node_idf_data[("Complete IDF dataset")]
end

subgraph group_analysis["Spatial analysis"]
  node_spatial["Delaunay analysis"]
  node_mst["MST algorithms"]
  node_routes["Waypoint routing"]
end

subgraph group_interface["Map and exploration"]
  node_map_output["Interactive map generation"]
  node_map["Interactive map"]
  node_exploration["Search and comparison"]
  node_charts["Charts and health"]
  node_local_server["Local map server<br/>[server.py]"]
end

subgraph group_outputs["Results"]
  node_analysis_report["Statistical report"]
  node_limits["Anomalies and limits"]
end

node_operator(("Analyst"))
node_live_api{{"OpenData Paris"}}

node_operator -->|"runs analysis"| node_loader
node_loader -.->|"fetches stations"| node_live_api
node_loader -.->|"loads data"| node_station_data
node_loader -.->|"loads data"| node_idf_data
node_loader -->|"provides stations"| node_spatial
node_spatial -->|"builds graph"| node_mst
node_loader -->|"provides stations"| node_routes
node_loader -->|"provides stations"| node_map_output
node_spatial -->|"provides geometry"| node_map_output
node_mst -->|"provides optimized paths"| node_map_output
node_routes -->|"provides route"| node_map_output
node_map_output -->|"generates map"| node_map
node_operator -->|"explores results"| node_map
node_map -->|"supports search"| node_exploration
node_map -->|"shows metrics"| node_charts
node_operator -.->|"serves map"| node_local_server
node_local_server -.->|"serves file"| node_map
node_spatial -.->|"records statistics"| node_analysis_report
node_operator -.->|"consults findings"| node_limits

click node_loader "https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py"
click node_station_data "https://github.com/misbaou672/velib-optim/blob/main/data/stations_velib.json"
click node_idf_data "https://github.com/misbaou672/velib-optim/blob/main/data/stations_velib_idf_complete.json"
click node_spatial "https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py"
click node_mst "https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py"
click node_routes "https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py"
click node_map_output "https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py"
click node_map "https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html"
click node_exploration "https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html"
click node_charts "https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html"
click node_local_server "https://github.com/misbaou672/velib-optim/blob/main/server.py"
click node_analysis_report "https://github.com/misbaou672/velib-optim/blob/main/rapport_statistiques_velib.json"
click node_limits "https://github.com/misbaou672/velib-optim/blob/main/anomalies_et_limites.md"

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_loader,node_station_data,node_idf_data toneBlue
class node_spatial,node_mst,node_routes toneAmber
class node_map_output,node_map,node_exploration,node_charts,node_local_server toneMint
class node_analysis_report,node_limits toneRose
class node_operator,node_live_api toneIndigo
```

## Components

### Data and ingestion

- [Station data loader](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py): `optimisation_velib.py`
- [Station datasets](https://github.com/misbaou672/velib-optim/blob/main/data/stations_velib.json): `data/stations_velib.json`
- [Complete IDF dataset](https://github.com/misbaou672/velib-optim/blob/main/data/stations_velib_idf_complete.json): `data/stations_velib_idf_complete.json`

### Spatial analysis

- [Delaunay analysis](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py): `optimisation_velib.py`
- [MST algorithms](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py): `optimisation_velib.py`
- [Waypoint routing](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py): `optimisation_velib.py`

### Map and exploration

- [Interactive map generation](https://github.com/misbaou672/velib-optim/blob/main/optimisation_velib.py): `optimisation_velib.py`
- [Interactive map](https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html): `carte_velib_optimisee.html`
- [Search and comparison](https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html): `carte_velib_optimisee.html`
- [Charts and health](https://github.com/misbaou672/velib-optim/blob/main/carte_velib_optimisee.html): `carte_velib_optimisee.html`
- [Local map server](https://github.com/misbaou672/velib-optim/blob/main/server.py): `server.py`

### Results

- [Statistical report](https://github.com/misbaou672/velib-optim/blob/main/rapport_statistiques_velib.json): `rapport_statistiques_velib.json`
- [Anomalies and limits](https://github.com/misbaou672/velib-optim/blob/main/anomalies_et_limites.md): `anomalies_et_limites.md`

### Other components

- **Analyst**
- **OpenData Paris**

## Connections

- Analyst → Station data loader: runs analysis
- Station data loader → OpenData Paris: fetches stations
- Station data loader → Station datasets: loads data
- Station data loader → Complete IDF dataset: loads data
- Station data loader → Delaunay analysis: provides stations
- Delaunay analysis → MST algorithms: builds graph
- Station data loader → Waypoint routing: provides stations
- Station data loader → Interactive map generation: provides stations
- Delaunay analysis → Interactive map generation: provides geometry
- MST algorithms → Interactive map generation: provides optimized paths
- Waypoint routing → Interactive map generation: provides route
- Interactive map generation → Interactive map: generates map
- Analyst → Interactive map: explores results
- Interactive map → Search and comparison: supports search
- Interactive map → Charts and health: shows metrics
- Analyst → Local map server: serves map
- Local map server → Interactive map: serves file
- Delaunay analysis → Statistical report: records statistics
- Analyst → Anomalies and limits: consults findings
