Is there a way in R (a script or package) that would allow identifying activity spots in GPS tracking data?

I have a number of GPS tracks in GPX/CSV formats that follow the movements of people in a city during a day. I would like to identify locations where a person stays longer (stays or walks around a small area - a cluster of trackpoints like the one in the image attached), count these locations, and estimate the time spent in each.

So far I have checked some packages, such as trip and move, etc, but they did not seem to offer this possibility

I think, density-based clustering might be the best approach

IN other words, I would like to count clusters of trackpoints, like the one in the screenshot

  • If you can specify your question mathematically then yes, it can be done. Currently your question is a bit vague (eg "where a person stays longer") to be well specified. – Spacedman Jul 27 '17 at 13:15
  • I thought that's a minor detail in the problem. I imagine the best way would be to identify clusters of trackpoints located close to each other rather than following each other on a track. And then measuring the number of these clusters, as well as the time between the first and last trackpoint in the cluster. Sorry that I cannot express it in math terms, I am not really a quant person – magnolian Jul 27 '17 at 17:38
  • Look at the telemetry functions in the ade packages. There are plenty of online tutorials and documentation for this type of analysis using animal track locations from gps collars. – Jeffrey Evans Jul 27 '17 at 20:19
  • I have looked into adehabitatLT which allows to segments "bursts" of movements, but that is not really what I want. For me, only clusterings of trackpoints are interested. One difference I noticed with animal tracing is that GPS collars provide GPS location once every 10 minutes or every hour, every day. In my case I have data for every 10 seconds, so the tracks are much more detailed – magnolian Jul 28 '17 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.