Getting Started

Get up and running with Flamingo E-Scooter by installing the package, loading data, and running the first analysis.

Install from PyPI

pip install flamingo-escooter

Install from source

git clone https://github.com/jhe482-uoa/flamingo-escooter.git
cd flamingo-escooter
pip install -e .

Optional UV-based setup

If you use uv for environment management, the repository supports the uv workflow:

uv sync
uv build

This installs dependencies and configures the environment for development and testing.

Load the bundled sample dataset

from flamingo_escooter import load_trips

trips = load_trips()
print(trips.shape)
print(trips.columns)

The package ships with demo data so you can explore results without needing your own CSV file.

First analysis example

from flamingo_escooter import analyse

trips = analyse()
print(trips[['origin', 'destination', 'is_violation']].head())
print(f"Total violations: {trips['is_violation'].sum()}")

Loading geofence zones and checking violations

from flamingo_escooter import load_trips, load_geofence, geofence_violations

trips = load_trips()
zones = load_geofence()
violations = geofence_violations(trips, zones)
print(violations[violations['is_violation']].head())

Notes

  • The package is designed for Auckland CBD analysis and uses NZTM projection (EPSG:2193).
  • Demo outputs are included in the repository as PNG images.
  • demo.ipynb is a useful reference for interactive exploration.