Metadata-Version: 2.4
Name: suntdataset
Version: 0.1.1
Summary: A Dataset for the Salvador Unified Network for Transport (SUNT).
Author-email: Jorge Nery <jorgenery@ufba.br>
License: MIT
Project-URL: Homepage, https://github.com/LabIA-UFBA/SUNT
Project-URL: Documentation, https://labiaufba.github.io/SUNT
Project-URL: Repository, https://github.com/LabIA-UFBA/SUNT
Project-URL: Issues, https://github.com/LabIA-UFBA/SUNT/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: pyarrow
Requires-Dist: requests
Requires-Dist: tqdm
Provides-Extra: vis
Requires-Dist: pydeck; extra == "vis"
Requires-Dist: folium; extra == "vis"
Requires-Dist: geopandas; extra == "vis"
Provides-Extra: dashboard
Requires-Dist: streamlit; extra == "dashboard"
Provides-Extra: all
Requires-Dist: pydeck; extra == "all"
Requires-Dist: folium; extra == "all"
Requires-Dist: geopandas; extra == "all"
Requires-Dist: streamlit; extra == "all"
Requires-Dist: networkx; extra == "all"

# suntdataset

Python library to load and visualize data from **SUNT (Salvador Unified Network for Transport)**.

## Features

- Batch loading with `start_date`, `periods`, and `freq`.
- Day-type filtering (`all`, `workdays`, `saturdays`, `sundays`).
- OD graph creation and export with `networkx`.
- GIS line rendering (GTFS `shapes`) with `folium`.

## Installation

```bash
pip install suntdataset
```

Optional dependencies:

```bash
pip install "suntdataset[vis]"
pip install "suntdataset[all]"
```

## Quick Start

### 1. Load data

```python
from suntdataset.loader import SUNTLoader

loader = SUNTLoader()

# Daily OD data (default start_date = 2024-03-01)
df_od = loader.load_batch(dataset_type="od", periods=1)

# GTFS shapes for GIS visualization
df_shapes = loader.load_batch(dataset_type="gtfs-shapes", periods=1)
```

### 2. Build OD graph

```python
from suntdataset.visualizer import SUNTVisualizer

viz_od = SUNTVisualizer(df_od)
graph = viz_od.build_od_graph()
viz_od.export_od_graph("outputs/od_2024-03-01.graphml", fmt="graphml")
viz_od.export_od_graph("outputs/od_2024-03-01.gexf", fmt="gexf")
```

## Dataset Types Supported

| Type | Description |
| --- | --- |
| `od` | Origin-Destination data |
| `gtfs-stops` | GTFS stops data |
| `gtfs-trips` | GTFS trips data |
| `gtfs-stop-times` | GTFS stop times data |
| `gtfs-routes` | GTFS routes data |
| `gtfs-shapes` | GTFS shapes data |
| `gtfs-agency` | GTFS agency data |
| `boarding` | Boarding data |
| `alighting` | Alighting data |

## Academic Use & Citation

If you use this library in research, please cite the SUNT dataset:

> 
    @dataset{SUNT2025,
        author       = {Marcos Vinícius dos Santos Ferreira and Matheus Carvalho de Souza and Jorge Nery and Tatiane Nogueira Rios and Islame Felipe da Costa Fernandes and Danilo Oliveira Andrade and Joao Gama and Albert Bifet and Ricardo Rios},
        title        = {Salvador Urban Network Transportation (SUNT)},
        year         = {2025},
        publisher    = {Mendeley Data},
        version      = {1},
        doi          = {10.17632/85fdtx3kr5.1},
        url          = {https://data.mendeley.com/datasets/85fdtx3kr5/1}
    }
