Guide how to analyse GPS data
The following guide explains the steps to analyse GPS data.
Save data as
psyo data frame. You should create a psyo data frame by reading GPX files with dir_get_gpx and add additional information for each participant with dir_add_csv.
Remove not needed data. By removing data, you can greatly improve calculation speed. (1) You can remove data by specifying a begin and end time (See example section below). (2) You could create a polygon of the area you want to select with mark_inside_polygon and then select only the data you want. To determine a good polygon, you can draw the tracks with plot_tracks. (3) You can select data between a start and finish polygon with select_between_polygons.
Create a test sample. If you have a lot of data calculations can take hours. Especially if you use the functions distance_psyo and distance_peers. To speed things up you can first create a test sample with average_coordinates and select_test_sample. In most cases, it is better to use average_coordinates. When everything works, you can run your script with the original coordinates.
clean-up the data. Before the clean-up calculate the descriptive summary with des_summary so you know which data is removed. After that you can clean-up the data with the following steps. (1) You should average coordinates that have the same time stamp with average_duplicates. You can mark gaps with (2) mark_speed_gaps and (3) mark_time_gaps.
Plot tracks. You can plot the tracks with plot_tracks to check how the tracks look like, if the right data is removed, if the gaps are marked correctly, ...
Calculate your data. You now can calculate different measures. It is important to do this after removing not needed data and the clean-up. Otherwise unwanted data could be included into the calculations. If you already calculated a measure you can calculate it again and the old column will be overwritten.
Create summary for each participant / tracker. With des_summary and other functions with the prefix "des_" you can calculate a summary for each participant.
You can see these steps implemented with the demo smuggler1. See also about_demos.
If you use 'psyosphere' for commercial use or research, please support us by include one off the following references:
MIT license: "psyosphere" by B. Ziepert, E. G. Ufkes & P. W. de Vries from https://CRAN.R-project.org/package=psyosphere
APA: Ziepert, B., Ufkes, E., & de Vries, P. W. (2018). psyosphere: Analyse GPS Data. Retrieved from https://CRAN.R-project.org/package=psyosphere
APA: Vries, P., Ziepert, B., & Ufkes, E. (2016). "De psychologie van bewegingen GPS-technologie voor de analyse van natuurlijk gedrag." Tijdschrift voor Human Factors 2: 11-15.
Benjamin Ziepert. Please send feedback to: firstname.lastname@example.org.
1 2 3 4 5 6 7 8 9
## Not run: # Remove data before begin and after end --------------------------------------- data(psyo_rounds2) tracks <- psyo_rounds2 begin <- as.POSIXct("2015-09-03 14:00:00") end <- as.POSIXct("2015-09-03 14:20:00") tracks <- tracks[ tracks[,"time"] > begin & tracks[,"time"] < end ,] ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.