Skip to main content

itinerum-tripkit-cli

Python Version

The itinerum-tripkit-cli makes using the itinerum-tripkit library fast and simple:

  1. Create an ./input and ./output directory. Copy source .csv data to ./input.
  2. Edit a config.py file with data filepaths and trip processing parameters.
  3. Run the tripkit command-line tool*:
    $ pip install itinerum-tripkit-cli
    $ tripkit-cli -c config.py
    

*On Windows, GDAL and Fiona dependencies are required. These easiest way to install these packages is to first download and install the Visual C++ Redistributable for Visual Studio 2015. Once available, compiled versions can be installed with Python's pip: - GDAL: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal - Fiona: https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona

```bash
$ pip install .\GDAL-3.0.2-cp37-cp37m-win_amd64.whl
$ pip install .\Fiona-1.8.13-cp37-cp37m-win_amd64.whl
```

Quick comands

Show help:

$ tripkit-cli --help

Logging verbosity:

$ tripkit-cli -q  # quiet (no output messages)
$ tripkit-cli -v  # verbose

Supply config:

$ tripkit-cli -c config.py

Write GIS data outputs

$ tripkit-cli

Config

Sample config:

##
## itinerum-tripkit configuration
##
SURVEY_NAME = 'itinerum_survey'

# path of raw data directory exported from Itinerum platform or Qstarz
INPUT_DATA_DIR = './input/csv-data-dir'
# types: "itinerum" or "qstarz"
INPUT_DATA_TYPE = 'itinerum'

# path of export data from itinerum-cli
OUTPUT_DATA_DIR = './output'

# path of subway station entrances .csv for trip detection
SUBWAY_STATIONS_FP = './input/subway_stations/stations.csv'

# trip detection parameters
TRIP_DETECTION_BREAK_INTERVAL_SECONDS = 300
TRIP_DETECTION_SUBWAY_BUFFER_METERS = 300
TRIP_DETECTION_COLD_START_DISTANCE_METERS = 750
TRIP_DETECTION_ACCURACY_CUTOFF_METERS = 50

# timezone of study area for calculating complete trip days
TIMEZONE = 'America/Montreal'

# semantic location radius for activity dwell tallies
ACTIVITY_LOCATION_PROXIMITY_METERS = 50

# OSRM map matcher API URLs
MAP_MATCHING_BIKING_API_URL = 'https://osrm.server.com/match/v1/biking/'
MAP_MATCHING_DRIVING_API_URL = 'https://osrm.server.com/match/v1/driving/'
MAP_MATCHING_WALKING_API_URL = 'https://osrm.server.com/match/v1/walking/'

##
## itinerum-tripkit-cli configuration
##
# GIS output formats: shp (shapefile), gpkg (geopackage), geojson
GIS_OUTPUT_FORMAT = 'shp'

Metadata

Release files for itinerum-tripkit-cli 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for itinerum-tripkit-cli 0.0.11
File Size Uploaded
itinerum-tripkit-cli-0.0.11.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for itinerum-tripkit-cli 0.0.11
File Interpreter ABI Platform
itinerum_tripkit_cli-0.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 27.4 kB

Release files / itinerum-tripkit-cli-0.0.11.tar.gz

Download URL itinerum-tripkit-cli-0.0.11.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9cb8fefaf6dd27fab1cd115e3f6819d0284ccf2855f6e44994ff7ec004e8e11e
BLAKE2b-256 checksum
How to use checksums
6fba48ebfdddd712c64ba1cb1c826765faabb7765c5050d627945cc8ea217901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.4

Release files / itinerum_tripkit_cli-0.0.11-py3-none-any.whl

Download URL itinerum_tripkit_cli-0.0.11-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15f73b0ace5286bff1cde2ff53ca7c5d0f7c34d61eb4f747a56d048b59bbcd23
BLAKE2b-256 checksum
How to use checksums
525be471992c41d1cd8eb64eab4041ea3a81184f359afd3f8dd1f026fc4ca5cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.11 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page