iPhone geo-tracking database

April 20, 2011
By

(This article was first published on simon jackman's blog » R, and kindly contributed to R-bloggers)

So the web lit up a little today with news that iPhones are collecting time-stamped location data, and in a form that isn’t particularly hard to look at (and even with some nice apps to make animated maps of your travels etc):

The database is SQLite, and I used R (and the RSQLite package) to open it up and see what is there. In my case, I found a database with 35,297 records, with timestamps ranging from June 22, 2010 to 4 days ago (the date I last synced my phone). That said, there are only 726 unique timestamps in the database, which makes me wonder what is going on. Incidentally, the time-stamps are seconds since 2001-01-01 (I don’t know which TZ): in R, I converted with:


as.POSIXct(data$Timestamp,origin=c("2001-01-01")

There is a little weirdness in the data: the iPhone thinks I was in Scotland last August (when in fact I was no further north than Colchester), and a few other instances of the geo-data being off by as much as 100 kilometres or so. There are also 68 records with lat/long recorded as 0/0, almost all of which are records from when I was in England last August.

There are also fields whose names I can’t fathom, nor does a quick look suggest that any of them might be offsets to the timestamps:

> names(data)
[1] "MCC" "MNC" "LAC"
[4] "CI" "Timestamp" "Latitude"
[7] "Longitude" "HorizontalAccuracy" "Altitude"
[10] "VerticalAccuracy" "Speed" "Course"
[13] "Confidence"

Does anyone know what the fields with non-obvious names might be?

To leave a comment for the author, please follow the link and comment on his blog: simon jackman's blog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.