A command-line interface for running the itinerum-tripkit library
Project description
itinerum-tripkit-cli
The itinerum-tripkit-cli
makes using the itinerum-tripkit
library fast and simple:
- Create an
./input
and./output
directory. Copy source .csv data to./input
. - Edit a
config.py
file with data filepaths and trip processing parameters. - Run the tripkit command-line tool*:
$ pip install itinerum-tripkit-cli $ tripkit-cli -v -c config.py
*On Windows, GDAL and Fiona dependencies are required. These easiest way to install these packages is to download pre-compiled versions: - 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.11-cp37-cp37m-win_amd64.whl
```
Quick comands
Show help:
$ tripkit-cli --help
Increase logging verbosity:
$ tripkit-cli -v # verbose
$ tripkit-cli -vv # very verbose
Supply config:
$ tripkit-cli -c config.py
Config
Sample config:
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
SEMANTIC_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/'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for itinerum-tripkit-cli-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5ab7433ce52d71a4791676c645a809d4ea49886706a02f46e98b78b2e3d2fe0 |
|
MD5 | e83fa54dfbc0ed84d163c29eb8979651 |
|
BLAKE2b-256 | ca3ce09e07b6d2a4df53b966661f233260e477477a0db4e8fb27f0b7dc669706 |
Close
Hashes for itinerum_tripkit_cli-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c76353622a1859bf8d55d00dc82e4128cf73771a53e702ff80356c03ae90b16a |
|
MD5 | 6d5f8ba7aaae3dcf9b1bda0ef382e07c |
|
BLAKE2b-256 | ef6ef1c7a55d350fa6fb5a86260e05975569fa4724f83c9de394be89b4f6b00f |