R just created this cool map of our RV trip using data he downloaded from Google. If you have an Android, the location tracking that Google offers is both creepy and cool.
I mean, Google knows where you are every second of every day, but they give you unfettered access to that data…so, you know, you can make a map! (All right, it’s more creepy than cool).
But if you’d like to create a shareable map:
- It’s easiest if you’re like R and own an Android phone. I have an iPhone; it’s possible to get the data, but it’s more complicated and you may have to buy a program. Go here for more info on downloading location data for an iPhone.
- Make sure location services is on. Go to Settings and scroll down to Location. Make sure it’s on. You can also set your “Mode” to determine how accurate you want the location data to be. We recommend setting yours to “High accuracy.”
- You need to be like almost everyone in the world and have a Google account (gmail, Google+, etc.).
- Go to google.com/maps/timeline. Your data is already there for everywhere you’ve gone since you first started using your phone.
- Download your data. Find the “Settings” button at the lower right of the screen (the gear icon), and select “Download copy of all your data.” R found the KML format to be easier to work with, but you can also get it in JSON if you like that. If you’re new to this kind of thing, download it in KML.
You now have a massive file of data points. Nice work. Here’s the thing: you’re going to get ALL your data from the time you started using the phone (presuming you’ve had location services on from inception). R’s file was 1.5 million lines. Our trip made up 120,000 of them.
“You literally get data points for every second of every day, longitude and latitude, and your height off the ground. The data for this last point is particularly noisy.” – R
Now you need to narrow things down and make your map:
- Open the file in a good text editor. R uses Notepad++, which he says deals with large files well.
- Press Ctrl+F to open the find window. Enter the start date you want in the format that matches what’s used in the KML file – in this case YYYY-MM-DD. Notice that each date/coordinate entry is two lines, and that the data will show the most recent days first (like how blog posts are organized). Delete the date/coordinate lines you don’t want. For example, if your trip was two weeks, you’d search for either the start or end dates of your trip and then delete all the data that is outside of those dates.
- STOP: Don’t delete the first seven or last four lines. This bit is important: do not delete the seven lines at the top of the file or the four lines at the bottom. These are important as they tell the computer what to do with all that data. Keep lines 1-7 and the last four lines in the file. All your data points should be sandwiched between these. If your trip was two weeks or, you’ll have a relatively small file. If your trip is long like ours, you’ll probably have to break the data up into two files. Google won’t accept files that are more than 5gb. R had to break our trip up into two files – remembering to keep those first seven and last four lines in both files.
- Go to google.com/mymaps and create a new map. In the “Untitled Layer” you will see on your screen, click “Import” and select your file. It may take a while to fully upload. And viola! A map of your trip!
It’s not perfect. As you can see from our map above, there is something amiss in Colorado. We were in Rocky Mountain National Park and drove to Denver. There are a lot of very straight lines in that section of the map, and I guarantee you the roads were not a straight shot out of the mountains. R decided not to go down the rabbit hole of cleaning up that particular set of data.
You can also pretty up the file by adding “pins” and text boxes with additional information.
Happy mapping! And happy travels!