Skip to content

Commit

Permalink
addition to jasmine to stop an error that happened, also updated docs…
Browse files Browse the repository at this point in the history
…tring
  • Loading branch information
clementzach committed Sep 19, 2023
1 parent f86e20f commit 800eb21
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions forest/jasmine/traj2stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,16 @@ def gps_summaries(
res += [0] * (2 * len(places_of_interest) + 1)
summary_stats.append(res)
continue
elif sum(index_rows) == 0 and not split_day_night:
## There is no data and it is daily data, so we need to add empty rows
res = [year, month, day] + [0] * 3 + [pd.NA] * 15

if places_of_interest is not None:
# add empty data for places of interest
# for daytime/nighttime + other
res += [0] * (2 * len(places_of_interest) + 1)
summary_stats.append(res)
continue

temp = traj[index_rows, :]
# take a subset which is exactly one hour/day,
Expand Down
2 changes: 1 addition & 1 deletion forest/willow/log_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def text_analysis(
def text_and_call_analysis(
df_call: pd.DataFrame, df_text: pd.DataFrame, stamp: int, step_size: int
) -> tuple:
"""Calculate the summary statistics for the call data
"""Calculate the summary statistics for the call and text data
in the given time interval.
Args:
Expand Down

0 comments on commit 800eb21

Please sign in to comment.