Geo Tagging Sensor Data

Geo Tagging Sensor Data

Introduction – tag…you’re it

There are 10 weeks left and they’ll go by fast, so we’re going to be moving quick through a lot of material.  This post will be on geotagging.  We’ll be tagging Accelerometer data along with current usage for use in heat maps hosted by CartoDB.  If you haven’t used CartoDB, create an account and take a look at the tutorials they offer.  Once you have a bit of background, come on back.

Purpose – one slice at a time

Sensor data by itself is bland stuff.  Associating it with a time and place gives more life to it.  I wanted to plot road conditions in the area to get a better understanding of how it changes from one location to the next.  Another nagging question I had was the operation range of my electric bike.  Having information about locations that are energy intensive can help me make route choices to get the best range.

In the last post I give a basic rundown of the devices and code that will be used to make geographically identifiable data readings.  The readings are gathered, process, and stored on MicroSD media.  The data is transferred and processed further for use on CartoDB.

Details – where its been

I consolidated the code for the Arduino UNO and now have raw data.  CartoDB imports work with CSV files, so I’ll be changing the format to accommodate.  Time is a factor and I having elected not to do the processing on the UNO.  It was my intent to keep as much of the readings intact, mainly because I might process it differently later on.  Here’s a snippet of some of the readings I was able to gather.

47.624073,-122.3344197,4/26/2015,23:15:04,19.7,1.93,111,-10,-13,-13,-11,-19,-18,-19,-19,63,64,65,64,1.5,0.5,0.816496581

I’m not going to need all of this data plotted in CartoDB.  But you can see clearly the latitude, longitude, date, and time.  The stuff I’m more interested in keeping is the “111” reading from the current sensor and the last 3 values that represent the tilt sensor standard deviation values from the x,y,z planes.  Here’s what I’ll end up with.

Latitude,Logitude,Date,Time,Current,XDev,YDev,ZDev
47.624073,-122.3344197,4/26/2015,23:15:04,111,1.5,0.5,0.816496581

Now the data is formatted properly and ready for import into CartoDB.  I login on CartoDB and go to my Datasets.  Then, I’ll click the New Dataset and select my file to upload and connect the dataset.  After a few moments a table should appear with the dataset values.  That’s it for getting the data into CartoDB.  I’m able to view the map and see my plots.

After a bit of muddling, the plot should be ready to share and embed.

Summary – getting past the rough patch

CartoDB has many features that aren’t included with non-subscription accounts.  If you have extensive geotagged datasets and want to convey the information clearly, it would be worth it to invest in.  It really doesn’t take much effort to get the values to show up on the map.  I always knew that North Lake Union and Eastlake were crappy roads for bikes to be on, yet folks brave it.

Geotagging data isn’t difficult and it opens up possibilities for choosing routes that offer the most, while avoiding those that shouldn’t be taken.

Comments are closed.