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.
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.
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.