Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected leaving_datetime in detection.stay_locations #263

Open
hamishgibbs opened this issue Mar 14, 2023 · 0 comments
Open

Unexpected leaving_datetime in detection.stay_locations #263

hamishgibbs opened this issue Mar 14, 2023 · 0 comments

Comments

@hamishgibbs
Copy link

Hello, I am receiving unexpected behavior from detection.stay_locations.

When a stay ends, leaving_datetime is the datetime value of the first point outside of the spatial radius, not the final point within the spatial radius.

A toy example is available here.

In this example, there is one stay at the lat/lng coordinates (1, 1) for datetime 2018-01-01 00:00 to 2018-01-01 00:06. I would expect the leaving_datetime of this visit to be 2018-01-01 00:06, however, in this example it is actually the datetime of the following point in the sequence: 2018-01-01 00:23.

Using the datetime of the first point outside the spatial radius may not introduce much difference in the duration of visits for a regularly sampled time series, but for an irregular time series it can produce an inaccurate duration.

Is this a bug or an intentional design choice?

Thank you for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant