Add day segment parameter to location barnett rule

pull/95/head
JulioV 2020-03-05 10:32:38 -05:00
parent 2c856f1cfc
commit ccc283db16
3 changed files with 8 additions and 4 deletions

View File

@ -23,7 +23,9 @@ rule all:
pid=config["PIDS"],
call_type=config["CALLS"]["TYPES"],
segment = config["CALLS"]["DAY_SEGMENTS"]),
expand("data/processed/{pid}/location_barnett.csv", pid=config["PIDS"]),
expand("data/processed/{pid}/location_barnett_{segment}.csv",
pid=config["PIDS"],
segment = config["BARNETT_LOCATION"]["DAY_SEGMENTS"]),
expand("data/processed/{pid}/bluetooth_{segment}.csv",
pid=config["PIDS"],
segment = config["BLUETOOTH"]["DAY_SEGMENTS"]),

View File

@ -68,7 +68,8 @@ RESAMPLE_FUSED_LOCATION:
TIMEZONE: *timezone
BARNETT_LOCATION:
METRICS: ["hometime","disttravelled","rog","maxdiam","maxhomedist","siglocsvisited","avgflightlen","stdflightlen","avgflightdur","stdflightdur","probpause","siglocentropy","minsmissing","circdnrtn","wkenddayrtn"]
DAY_SEGMENTS: [daily] # These metrics are only available on a daily basis
METRICS: ["hometime","disttravelled","rog","maxdiam","maxhomedist","siglocsvisited","avgflightlen","stdflightlen","avgflightdur","stdflightdur","probpause","siglocentropy","circdnrtn","wkenddayrtn"]
LOCATIONS_TO_USE: ALL # ALL, ALL_EXCEPT_FUSED OR RESAMPLE_FUSED
ACCURACY_LIMIT: 51 # meters, drops location coordinates with an accuracy higher than this. This number means there's a 68% probability the true location is within this radius
TIMEZONE: *timezone

View File

@ -55,9 +55,10 @@ rule location_barnett_metrics:
metrics = config["BARNETT_LOCATION"]["METRICS"],
locations_to_use = config["BARNETT_LOCATION"]["LOCATIONS_TO_USE"],
accuracy_limit = config["BARNETT_LOCATION"]["ACCURACY_LIMIT"],
timezone = config["BARNETT_LOCATION"]["TIMEZONE"]
timezone = config["BARNETT_LOCATION"]["TIMEZONE"],
day_segment = "{day_segment}"
output:
"data/processed/{pid}/location_barnett.csv"
"data/processed/{pid}/location_barnett_{day_segment}.csv"
script:
"../src/features/location_barnett_metrics.R"