home_attribution

nomad.home_attribution.compute_candidate_homes(stops_table, dusk_hour=19, dawn_hour=6, traj_cols=None, **kwargs)[source]

Aggregate nightly presence statistics for home inference.

Column names are resolved through traj_cols or keyword overrides and no type coercion beyond what is strictly necessary for the calculation is performed.

nomad.home_attribution.nocturnal_stops(stops_table, dusk_hour=19, dawn_hour=6, start_datetime='start_datetime', end_datetime='end_datetime')[source]

Clip each stop to the nocturnal window between dusk_hour and dawn_hour.

This helper assumes the caller already provides proper datetime columns. It merely slices the stop to the relevant night portion and recomputes the duration, dropping rows that do not intersect the night at all.

nomad.home_attribution.select_home(candidate_homes, stops_table, min_days, min_weeks, traj_cols=None, **kwargs)[source]

Select a single home location per user.