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-escooterInstall 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 buildThis 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())Recommended workflow
- Install the package.
- Load your trip data with
load_trips(data_file=...)or use the bundled demo data. - Load geofence zones with
load_geofence(). - Run
geofence_violations()and optionallyod_flows(). - Compute transit proximity with
transit_proximity(). - Visualise results using
path_heatmap()andviolation_heatmap().
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.ipynbis a useful reference for interactive exploration.