Cookies help us display personalized product recommendations and ensure you have great shopping experience.

We use cookies, including third-party cookies from Google to serve personalized ads through AdSense, to operate this site and understand how it is used. By continuing to browse, you accept this use. See our Privacy Policy and Terms of Use for details, including how to opt out of personalized advertising.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    chatgpt image jul 21, 2026, 04 34 30 pm
    4 Core Benefits of Predictive Maintenance after Vibration Analysis
    10 Min Read
    How Does Data Mining Boost Customer Satisfaction in Logistics? Harnessing Analytics for Results -- AI-generated illustration
    How Does Data Mining Boost Customer Satisfaction in Logistics? Harnessing Analytics for Results
    11 Min Read
    chatgpt image jul 13, 2026, 04 23 45 pm
    How Data Analytics Helps Companies Improve User Engagement
    19 Min Read
    chatgpt image jul 13, 2026, 03 59 46 pm
    How Data Analytics Improves Multi-Location Search Strategies
    10 Min Read
    cybersecurity efforts
    How Behavioral Analytics and AI Are Redefining Cybersecurity for Boca Raton Businesses
    14 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-25 SmartData Collective. All Rights Reserved.
Reading: How to load your iPhone location data into R
Share
Notification
Font ResizerAa
SmartData CollectiveSmartData Collective
Font ResizerAa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Big Data > Data Visualization > How to load your iPhone location data into R
Business IntelligenceData VisualizationLocation

How to load your iPhone location data into R

DavidMSmith
DavidMSmith
3 Min Read
SHARE

Earlier this week, data scientists Pete Warden and Alasdair Allen reported that iPhones and cell-enabled iPads keep an internal log of the devices location, which is accessible from the backup that iTunes creates when you sync the device.

Earlier this week, data scientists Pete Warden and Alasdair Allen reported that iPhones and cell-enabled iPads keep an internal log of the devices location, which is accessible from the backup that iTunes creates when you sync the device. Naturally, there’s been some controversy over the privacy implications of the data keing kept, but from a data scientist’s perspective this represents a rich and interesting data source for analysis. Personally, I’m kind of interested to get access to where I’ve been over the past year: wherever I go, my iPhone goes.

Pete Warden has provided a tool that lets you easily access and map the data. Here’s why the data for my iPhone looks like when zoomed in on California:

IPhoneMap

More Read

ai helps suppliers manage their risks
AI Helps Mitigate These 5 Major Supplier Risks
Despite many experts’ doubt that whole-genome sequencing…
The Transformative Power of Smarter Analytics
Baby Dashboard 2.0
Auditing the Email Collection Process

If you have more than one iDevice the tool only shows the data from the one you most recently synced, and more importantly it doesn’t (directly) give you access to the location data if you want to do more with it. Drew Conway comes to the rescue with an R package (amusingly called stalkR) that lets you import the data from a named device into an R object for visualization or other analysis. You’ll need to make sure the dependent R packages are installed, and download and install the stalkR_0.01.tar.gz file in your R working directory:

install.packages("RSQLite")
install.packages("XML")
install.packages("ggplot2")
install.packages(c("maps","mapproj"))
install.packages("stalkR_0.01.tar.gz", repos=NULL, type="source")
 
library(stalkR)
iphone.locs<-get.mylocations("dsmith", "David Smiths iPhone")
viz.locations(iphone.locs, "usa")

The last two commands are the key ones. get.mylocations creates a data frame with timestamped latitute and longitude, along with a horizontal accuracy measure. There’s also an Altitude variable, but at least in my data it was always zero (probably because the tracking data comes from cell tower triangulation, not GPS). The vis.locations function uses the syntax of the map function to map the locations, but the nice thing about having the data in R is that you can use it in whatever way you like.

USAiphonemap
Drew Conway’s github: stalkR

Share This Article
Facebook Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

The Leading 10 AI Drug Discovery & Development Platforms -- AI-generated illustration
The Leading 10 AI Drug Discovery & Development Platforms
Artificial Intelligence Exclusive
7 Best Knowledge Management Systems for Call Centers [2026 Comparison] -- AI-generated illustration
7 Best Knowledge Management Systems for Call Centers [2026 Comparison]
Exclusive
Top 5 FIPS-Validated and STIG-Hardened Image Providers in 2026 -- AI-generated illustration
Top 5 FIPS-Validated and STIG-Hardened Image Providers in 2026
Exclusive IT Security Software
8 Best Postgres CDC Tools and Software for Real-Time Replication in 2026 -- AI-generated illustration
8 Best Postgres CDC Tools and Software for Real-Time Replication in 2026
Big Data Exclusive Software

Stay Connected

1.2KFollowersLike
33.7KFollowersFollow
222FollowersPin

You Might also Like

The End of Unstructured Marketing: Forcing Generative AI into Strict HTML Schemas
Artificial IntelligenceExclusive

The End of Unstructured Marketing: Forcing Generative AI into Strict HTML Schemas

13 Min Read

TDWI Boston Dec 6 – Secrets of Analytical Leaders: Insights from Information Insiders +

3 Min Read

From GPS to Genomes: “Big Data” Expanding Its Reach

7 Min Read
Big DataData MiningKnowledge Management

Challenges of Big Data in Education

5 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

ai in ecommerce
Artificial Intelligence for eCommerce: A Closer Look
Artificial Intelligence
AI chatbots
AI Chatbots Can Help Retailers Convert Live Broadcast Viewers into Sales!
Chatbots

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-26 SmartData Collective. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?