/
tripkit_config.py
39 lines (30 loc) · 1.3 KB
/
tripkit_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
# Kyle Fitzsimmons, 2018
# filename for the itinerum-cli database
DATABASE_FN = 'itinerum.sqlite'
# path of raw data directory exported from Itinerum platform or Qstarz
INPUT_DATA_DIR = './input/itinerum-csv'
# 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/mtl_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'
# location radius for activity dwell tallies
SEMANTIC_LOCATIONS = {
'home': ['location_home_lat', 'location_home_lon'],
'work': ['location_work_lat', 'location_work_lon'],
'study': ['location_study_lat', 'location_study_lon']
}
ACTIVITY_LOCATION_PROXIMITY_METERS = 50
# OSRM map matcher API URLs
MAP_MATCHING_BIKING_API_URL = 'https://osrmserver.com/osrm/match/v1/biking/'
MAP_MATCHING_DRIVING_API_URL = 'https://osrmserver.com/osrm/match/v1/driving/'
MAP_MATCHING_WALKING_API_URL = 'https://osrmserver.com/osrm/match/v1/walking/'