# biltang/meituan_data architecture

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

- Interactive diagram: https://gitdiagram.com/biltang/meituan_data
- Repository: https://github.com/biltang/meituan_data

## Overview

This repository is a small, early-stage Meituan courier/order data-processing project, not a dispatch service. Its implemented workflow transforms waybill rows into courier and order datasets, with utilities for time-based partitioning and overlap analysis; matching is only a stub. The empty README offers no further capability claims, and the provided excerpts show no notebook execution flow, so the graph focuses on the implemented pipeline and its documented input/output files.

Main entry points: [`src/meituan/pipeline/data.py`](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py) (Upstream extraction), [`processed_data/base/courier.csv`](https://github.com/biltang/meituan_data/blob/main/processed_data/base/courier.csv) (Courier dataset), [`processed_data/base/orders.csv`](https://github.com/biltang/meituan_data/blob/main/processed_data/base/orders.csv) (Orders dataset), [`all_waybill_info_meituan_0322.csv.zip`](https://github.com/biltang/meituan_data/blob/main/all_waybill_info_meituan_0322.csv.zip) (Waybill data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Data pipeline"]
  node_upstream["Upstream extraction<br/>[data.py]"]
  node_courier_extract["Courier extraction<br/>[data.py]"]
  node_orders_extract["Order extraction<br/>[data.py]"]
end

subgraph group_artifacts["Data artifacts"]
  node_courier_csv["Courier dataset<br/>[courier.csv]"]
  node_orders_csv["Orders dataset<br/>[orders.csv]"]
  node_block_files["Parquet timeblocks<br/>[data.py]"]
end

subgraph group_analysis["Time analysis"]
  node_timeblocks["Timeblock utilities<br/>[data.py]"]
  node_overlap["ID overlap analysis<br/>[data.py]"]
  node_matching["Courier-order matching<br/>[data.py]"]
end

node_waybill["Waybill data"]

node_waybill -->|"provides rows"| node_upstream
node_upstream -->|"calls"| node_courier_extract
node_upstream -->|"calls"| node_orders_extract
node_upstream -->|"writes CSV"| node_courier_csv
node_upstream -->|"writes CSV"| node_orders_csv
node_courier_extract -->|"produces rows"| node_courier_csv
node_orders_extract -->|"produces rows"| node_orders_csv
node_timeblocks -->|"writes parquet"| node_block_files
node_timeblocks -.->|"supports analysis"| node_overlap

click node_waybill "https://github.com/biltang/meituan_data/blob/main/all_waybill_info_meituan_0322.csv.zip"
click node_upstream "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_courier_extract "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_orders_extract "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_courier_csv "https://github.com/biltang/meituan_data/blob/main/processed_data/base/courier.csv"
click node_orders_csv "https://github.com/biltang/meituan_data/blob/main/processed_data/base/orders.csv"
click node_timeblocks "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_overlap "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_block_files "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py"
click node_matching "https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.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_upstream,node_courier_extract,node_orders_extract toneBlue
class node_courier_csv,node_orders_csv,node_block_files toneAmber
class node_timeblocks,node_overlap,node_matching toneMint
class node_waybill toneTeal
```

## Components

### Data pipeline

- [Upstream extraction](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`
- [Courier extraction](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`
- [Order extraction](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`

### Data artifacts

- [Courier dataset](https://github.com/biltang/meituan_data/blob/main/processed_data/base/courier.csv): `processed_data/base/courier.csv`
- [Orders dataset](https://github.com/biltang/meituan_data/blob/main/processed_data/base/orders.csv): `processed_data/base/orders.csv`
- [Parquet timeblocks](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`

### Time analysis

- [Timeblock utilities](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`
- [ID overlap analysis](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`
- [Courier-order matching](https://github.com/biltang/meituan_data/blob/main/src/meituan/pipeline/data.py): `src/meituan/pipeline/data.py`

### Other components

- [Waybill data](https://github.com/biltang/meituan_data/blob/main/all_waybill_info_meituan_0322.csv.zip): `all_waybill_info_meituan_0322.csv.zip`

## Connections

- Waybill data → Upstream extraction: provides rows (evidence: `src/meituan/pipeline/data.py`)
- Upstream extraction → Courier extraction: calls (evidence: `src/meituan/pipeline/data.py`)
- Upstream extraction → Order extraction: calls (evidence: `src/meituan/pipeline/data.py`)
- Upstream extraction → Courier dataset: writes CSV (evidence: `src/meituan/pipeline/data.py`)
- Upstream extraction → Orders dataset: writes CSV (evidence: `src/meituan/pipeline/data.py`)
- Courier extraction → Courier dataset: produces rows (evidence: `src/meituan/pipeline/data.py`)
- Order extraction → Orders dataset: produces rows (evidence: `src/meituan/pipeline/data.py`)
- Timeblock utilities → Parquet timeblocks: writes parquet (evidence: `src/meituan/pipeline/data.py`)
- Timeblock utilities → ID overlap analysis: supports analysis (evidence: `src/meituan/pipeline/data.py`)
