Metadata-Version: 2.4
Name: penguinstransittoolbox
Version: 0.1.2
Summary: Penguin's Transit Toolbox :  a simple python toolbox for managing GTFS data. Work in progress
Author-email: Maxence Marchand <mxnc.marchand@gmail.com>
License: Unlicense
Project-URL: Homepage, https://github.com/mxncmrchnd/penguinstransittoolbox
Project-URL: Repository, https://github.com/mxncmrchnd/penguinstransittoolbox
Project-URL: Issues, https://github.com/mxncmrchnd/penguinstransittoolbox/issues
Keywords: GTFS,geopandas,transit,transport,shapely,data
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Requires-Dist: geopandas>=0.13
Requires-Dist: shapely>=2.0
Requires-Dist: requests>=2.30
Requires-Dist: fiona>=1.9
Requires-Dist: pyproj>=3.5
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# Penguin's Transit Toolbox

[![Python Version](https://img.shields.io/badge/python-%3E%3D3.9-blue.svg)]()
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://unlicense.org/)
[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://mxncmrchnd.github.io/penguinstransittoolbox/penguinstransittoolbox.html)
![Status](https://img.shields.io/badge/status-work--in--progress-yellow)
[![PyPI version](https://img.shields.io/pypi/v/penguinstransittoolbox.svg)](https://pypi.org/project/penguinstransittoolbox/)

---

**Penguin's Transit Toolbox** :  a simple python toolbox for managing GTFS data. Work in progress

---

## Summary

- [Features](#features)
- [Installation](#installation)
- [Usage examples](#usage-examples)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [License](#license)
- [Project Status](#project-status)
- [References](#references)

---

## Features

- Loading of GTFS files, either individually or in a dictionnary ;
- Support of both standard and spatial tables ;
- Export of `stops` and `shapes` as GIS-ready files ;
- Detection of available files ;
- Geometry validation ;
- Compatibility with `pandas`, `geopandas` and `shapely`.

---

## Installation

From PyPI
```python
pip install penguinstransittoolbox
```

For local development from the latest build on Github.
```bash
git clone https://github.com/mxncmrchnd/penguinstransittoolbox.git
pip install -e .
```

---

## Usage examples

Importing the package :
```python
import penguinstransittoolbox as ptt
```

Loading a feed and exporting its geographical features to GIS-ready files :
```python
feed = ptt.zip.load_feed('example/feed.zip')
# export the stops as GeoPackage (the default output format)
ptt.gis.export_stops(feed['stops'], output='stops.gpkg')
# export the shapes as ESRI Shapefile
ptt.gis.export_shapes(feed['shapes'], output='shapes.shp', format='Shapefile')
```

Reading stops and shapes from GIS files :
```python
stops_gdf = ptt.gis.stops_from_gis('stops.gpkg')
shapes_gdf = ptt.gis.shapes_from_gis('shapes.shp')
```

## Documentation

The documentation is available [here](https://mxncmrchnd.github.io/penguinstransittoolbox/penguinstransittoolbox.html).

## Requirements

- Python >= 3.9
- pandas >= 1.5
- geopandas >= 0.13
- shapely >= 2.0
- requests >= 2.30

---

## License

This project is released under **The Unlicense**, dedicated to the public domain.

---

## Project Status

This project is in early development and subject to change.
Contributions, feedback and issue reports are welcome.

## References

- [GTFS specification](https://gtfs.org/fr/)
- [pandas](https://pandas.pydata.org/)
- [geopandas](https://geopandas.org/en/stable/)
- [shapely](https://shapely.readthedocs.io/en/stable/manual.html)
- [requests](https://requests.readthedocs.io/en/latest/)
