Thursday, December 11, 2014

Answer--part 3: What's going on in this file?

Okay, NOW it's time to reveal what's going on...  

Let's start with the simplest way to analyze the KML file.  

As several of you found out, importing the KML file into Google Earth makes it very clear what's going on.  Here's what I see when I import it.  (It's labeled "Location history from 11/22/20..." on the left hand side panel below. 

Notice the scrubber in the upper left.  It looks like this.  (Note the "house shaped" icon that indicates the end point in the timeline being shown.  Note also the "crescent moon" shaped icon that indicates the earliest time of the data being shown.   

 With this widget, you can scrub along in time and follow the track of the phone.  If you click and drag on the "moon" and "house icons", you can select the segment of time on the KML track that you want to see displayed. Here I'm looking at the track from 8AM on 11/27 up to 8:47AM on 11/28.  

Using this slider widget, you can find out remarkable things.  

As several of you figured out, the track starts in North Carolina, in the parking lot of the Carolina Inn, Chapel Hill.  

To get the name of the building, I switched to Maps view (in Google Earth), and then did a search for:  

   [  *  ] 

this gives me a clickable red dot for each "known place" in the map.  

Fast forwarding the track a little bit, you can see that the phone went to the Raleigh-Durham airport... and then was turned off.  

You can keep on going like this--zooming in to see the fine details, and by looking at the time slider, you can figure out the time of day.  Below you can see that the phone landed at the San Francisco airport (SFO) around 10AM local time.  

By 2PM, the phone had driven down to Palo Alto.  (You know it was driven because from Tuesday's charts we know the speed the phone was moving at that time, around 65 mph.)  

Sliding forward a bit more in time, you can figure out what this trip is into the hills.  From the speed chart, we know the speed varied from 25 mph to around 4 mph.  If you zoom in even farther on maps, you'll see that some of this track is off-road, on trails in the Los Altos Hills.  The speed for that section is slow...  This is driving to a running location!  

Going forward a couple of days (to 11/26), you can see a trip to the coast.  Doing the same trick as before [* ] you can figure out that this is a quick overnight trip to the Costanoa Lodge.   

But you have to be a little careful when interpreting this data:  sometimes you'll get spurious data points.  As you can see here, several of these points seem to zip back and forth to an odd location (the focus at the top of the image).  If you find these points in the data set, they're really odd--very rapid back and forth.  Since I can't really travel at that speed (>100mph), they're really just jitter in the GPS signal.  

Errors happen.  This means we have to clean the data; yes, even cell phones can generate spurious signals.  Luckily, it's pretty easy to remove the whacky data points.  (Basically, you look for impossible value and just delete them.  It leaves holes in your data, but that's better than assuming I can fly from place-to-place at 3,000 mph... or as you can see in some of the data, that I used a submarine to travel at negative altitude!)  

There's another spurious value here. (The big spike going to the left.)  On the whole, the data is good--but this is why you compute speeds (as we did on Tuesday).... it makes it simple to find the broken data points.  

Let's wrap up this analysis with a quick telling of the story... 

What this KML tells us.... The KML file starts in Raleigh, NC, and travels to San Francisco on Nov 22.  After a couple days of traveling back and forth between work and home (and it's very easy for you to figure out which is which!), you can tell that I took a quick vacation over to the coast.  If you look carefully, you can even see where I went for a run, where I went for a bike ride, and where my favorite morning coffee shop is located!   

Search Lessons:  

There are many lessons here... let's start with the obvious.  

1.  A cell phone track can tell you a LOT about what a person is doing.  In this case, it's just my cell phone GPS locations. But you want to be aware that your phone has the capability of tracking your movements, and giving anyone who has access to that data a VERY deep insight into what you do.  In my case, I use this tracking information to geocode my photos, and on occasion, I can figure out where that interesting place I visited while driving.  That is, I can reconstruct where I went... sometimes that's exactly what I want to do.  

2.  Sometimes the cell phone data is spurious.  Luckily, the bad data points really stick out and are fairly easy to clean from the collected data.  Here's a deep lesson:  This is true for many logged events.  Just because the data is logged doesn't mean it's right.  Data sets almost always need to be cleaned carefully.  (And in particular, descriptive statistics can be misleading.  The "average speed" for my movements on Nov 26 is really high... unless you remember account for the incorrect data points.)  

3.  The mode switch from Google Earth to Google Maps can be useful.  You can use several of the methods you know in Maps (e.g., [ * ] or StreetView) to get additional data.  The deep lesson here is that you should learn the different viewing modes for any data viewer (e.g., Maps, Earth, Google Charts, or  Switching between viewing modes is often a way to get deep insights into your data very easily.  

4.  Zooming in can often reveal lots of data.  Don't stay just at the most distant view; zoom in and out to get the details (when zoomed way in), and the context (when zoomed way out).  

5.  Know your tools.  The Google Earth time slider has a "current" slider (the little "house" shaped icon) and a "previous point" slider (the "crescent moon" icon).  

6.  Know what your cell phone can do.  Personally, I like the geotracking feature as it gives me a bunch of nice capabilities.  But you might not care for it.  To change the tracking behavior on Android, you need to go to Settings, then Location, where you'll see a screen like this: 

Click on "Location" in the above menu, then click on "Google Location Reporting"  in the next menu (at the bottom):  

You can then turn Location Reporting on/off.  (This is how your photos get the Lat/Long EXIF data.)  

And this is the option that gives Android the information that generates track of the device.  (Note that you can activate "Location History" on a device-by-device basis.  So you can let your laptop be tracked, but not your phone, or vice-versa.)  

Now you know, and now you're empowered to make your own choices.  

Search on, geographically!

No comments:

Post a Comment