# chiajung-yeh/nycu_tdx architecture

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

- Interactive diagram: https://gitdiagram.com/chiajung-yeh/nycu_tdx
- Repository: https://github.com/chiajung-yeh/nycu_tdx

## Overview

TDX is an R client for retrieving transportation and related datasets from Taiwan’s Transport Data eXchange. The documented workflow is to obtain an access token with Client ID and Client Secret, then pass that token to a dataset function and receive the requested data. The README documents broad transport, mobility, geographic, and demographic capabilities, but no source excerpts were available; function-level wiring beyond that documented workflow is therefore not inferred. The documented API functions are implemented in R/TDX.R.

Main entry points: [`R/TDX.R`](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R) (get_token)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_token["get_token<br/>[TDX.R]"]
end

subgraph group_transit["Public Transit"]
  node_rail["Rail Data<br/>[TDX.R]"]
  node_bus["Bus Data<br/>[TDX.R]"]
  node_bike["Bike Data<br/>[TDX.R]"]
  node_gtfs["GTFS Data<br/>[TDX.R]"]
end

subgraph group_mobility["Other Mobility"]
  node_air["Air Schedules<br/>[TDX.R]"]
  node_ship["Ship Data<br/>[TDX.R]"]
  node_freeway["Freeway Data<br/>[TDX.R]"]
  node_road["Road Network<br/>[TDX.R]"]
  node_parking["Parking Data<br/>[TDX.R]"]
  node_tourism["Tourism Data<br/>[TDX.R]"]
end

subgraph group_context["Places And People"]
  node_geocoding["Geocoding<br/>[TDX.R]"]
  node_district["District Shapes<br/>[TDX.R]"]
  node_population["Population Data<br/>[TDX.R]"]
  node_income["Income Data<br/>[TDX.R]"]
end

node_user(("Package User"))
node_tdx{{"TDX Platform"}}

node_user -->|"requests token"| node_token
node_token -->|"authenticates with"| node_tdx
node_tdx -->|"returns token"| node_token
node_user -->|"requests dataset"| node_rail
node_user -->|"requests dataset"| node_bus
node_user -->|"requests dataset"| node_bike
node_user -->|"requests dataset"| node_gtfs
node_user -->|"requests dataset"| node_air
node_user -->|"requests dataset"| node_ship
node_user -->|"requests dataset"| node_freeway
node_user -->|"requests dataset"| node_road
node_user -->|"requests dataset"| node_parking
node_user -->|"requests dataset"| node_tourism
node_user -->|"requests service"| node_geocoding
node_user -->|"requests dataset"| node_district
node_user -->|"requests dataset"| node_population
node_user -->|"requests dataset"| node_income
node_tdx -->|"provides data"| node_rail
node_tdx -->|"provides data"| node_bus
node_tdx -->|"provides data"| node_bike
node_tdx -->|"provides data"| node_gtfs
node_tdx -->|"provides data"| node_air
node_tdx -->|"provides data"| node_ship
node_tdx -->|"provides data"| node_freeway
node_tdx -->|"provides data"| node_road
node_tdx -->|"provides data"| node_parking
node_tdx -->|"provides data"| node_tourism
node_tdx -->|"provides service"| node_geocoding
node_tdx -->|"provides data"| node_district
node_tdx -->|"provides data"| node_population
node_tdx -->|"provides data"| node_income
node_token -->|"supplies credential"| node_rail
node_token -->|"supplies credential"| node_bus
node_token -->|"supplies credential"| node_bike
node_token -->|"supplies credential"| node_gtfs
node_token -->|"supplies credential"| node_air
node_token -->|"supplies credential"| node_ship
node_token -->|"supplies credential"| node_freeway
node_token -->|"supplies credential"| node_road
node_token -->|"supplies credential"| node_parking
node_token -->|"supplies credential"| node_tourism
node_token -->|"supplies credential"| node_district
node_token -->|"supplies credential"| node_population
node_token -->|"supplies credential"| node_income

click node_token "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_rail "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_bus "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_bike "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_gtfs "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_air "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_ship "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_freeway "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_road "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_parking "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_tourism "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_geocoding "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_district "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_population "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"
click node_income "https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R"

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_token,node_user toneBlue
class node_rail,node_bus,node_bike,node_gtfs toneAmber
class node_air,node_ship,node_freeway,node_road,node_parking,node_tourism toneMint
class node_geocoding,node_district,node_population,node_income toneRose
class node_tdx toneIndigo
```

## Components

### Access

- [get_token](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`

### Public Transit

- [Rail Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Bus Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Bike Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [GTFS Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`

### Other Mobility

- [Air Schedules](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Ship Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Freeway Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Road Network](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Parking Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Tourism Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`

### Places And People

- [Geocoding](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [District Shapes](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Population Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`
- [Income Data](https://github.com/chiajung-yeh/nycu_tdx/blob/main/R/TDX.R): `R/TDX.R`

### Other components

- **Package User**
- **TDX Platform**

## Connections

- Package User → get_token: requests token
- get_token → TDX Platform: authenticates with
- TDX Platform → get_token: returns token
- Package User → Rail Data: requests dataset
- Package User → Bus Data: requests dataset
- Package User → Bike Data: requests dataset
- Package User → GTFS Data: requests dataset
- Package User → Air Schedules: requests dataset
- Package User → Ship Data: requests dataset
- Package User → Freeway Data: requests dataset
- Package User → Road Network: requests dataset
- Package User → Parking Data: requests dataset
- Package User → Tourism Data: requests dataset
- Package User → Geocoding: requests service
- Package User → District Shapes: requests dataset
- Package User → Population Data: requests dataset
- Package User → Income Data: requests dataset
- TDX Platform → Rail Data: provides data
- TDX Platform → Bus Data: provides data
- TDX Platform → Bike Data: provides data
- TDX Platform → GTFS Data: provides data
- TDX Platform → Air Schedules: provides data
- TDX Platform → Ship Data: provides data
- TDX Platform → Freeway Data: provides data
- TDX Platform → Road Network: provides data
- TDX Platform → Parking Data: provides data
- TDX Platform → Tourism Data: provides data
- TDX Platform → Geocoding: provides service
- TDX Platform → District Shapes: provides data
- TDX Platform → Population Data: provides data
- TDX Platform → Income Data: provides data
- get_token → Rail Data: supplies credential
- get_token → Bus Data: supplies credential
- get_token → Bike Data: supplies credential
- get_token → GTFS Data: supplies credential
- get_token → Air Schedules: supplies credential
- get_token → Ship Data: supplies credential
- get_token → Freeway Data: supplies credential
- get_token → Road Network: supplies credential
- get_token → Parking Data: supplies credential
- get_token → Tourism Data: supplies credential
- get_token → District Shapes: supplies credential
- get_token → Population Data: supplies credential
- get_token → Income Data: supplies credential
