Off to the races with a new semester! 🙂
Looks like a decent SIU raffle is open: http://t.co/9uYc6vEJ
So, I have started toying with location tracking as one function of a suite of lifelogging tools I’m crafting. I’m not comfortable trusting my location with companies whose business models are tied to collecting and using that information somehow, so rolling my own solution seems like a reasonable idea. Fortunately, the new HTML5 geolocation functionality makes web-based geolocation very, very easy.
My current setup is about 1 day old, so it certainly isn’t perfect (or 100% transparent, another main goal), but it logs my location to a webserver that I control, not one that someone else packages and sells.
It is a two-part solution: part 1 is a Chrome extension that triggers whenever a new page is loaded. Here are the main components of the extension:
"name": "Lifelogging for Logan",
// End Required
“description”: “Periodically logs info to my database.”,
“128”: “icon128.png” },
// Pick one (or none)
“default_title”: “Lifelogging for Logan”,
// Add any of these that you need
“js”: [“jquery-1.7.2.js”, “lifelogging.js”]
“content_security_policy”: “script-src ‘self’; object-src ‘self'”,
“geolocation”, // to query without user permission each time
“background”, // to let the extension run even if a Chrome window isn’t open
and lifelogging.js (note the whitespaces to break the commands down from working live.)
$('body').ap pend('>ifr ame s rc="http://YOUR.DOMAIN.COM/chrome-extension-iframe.html" frameborder="0" id="Lifelogging_iFrame"></iframe>');
The plugin inserts and loads chrome-extension-iframe.html, which in turn receives the geolocation data and writes it to your private web database with PHP and MYSQL.
As you can see, this HTML file gathers the browser’s reported geolocation data and squirts it over to geolocate.php for writing to the database. I’m posting a stripped down version of geolocate.php as it is a security risk to show the whole thing. Needless to say, scrub the input for malicious data:
//insert new record into log
$sql = “INSERT INTO lifelog_table_name (id, userid, event_type, value_1_name, value_1, value_2_name, value_2, value_3_name, value_3, value_4_name, value_4, value_5_name, value_5, value_6_name, value_6, value_7_name, value_7)
VALUES(‘$id’, ‘$userid’, ‘geo’, ‘latitude’, ‘$latitude’, ‘longitude’, ‘$longitude’, ‘accuracy’, ‘$accuracy’, ‘altitude’, ‘$altitude’, ‘altitude accuracy’, ‘$altitude_accuracy’, ‘heading’, ‘$heading’, ‘speed’, ‘$speed’)”;
$query = mysql_query($sql)
. “: Was not able to geolog this event.”
. ” email SONANDSO about it.”
There you go! Location tracked every time you load a webpage. It is a good idea to encrypt the geodata before sending it to your server, which I’m not showing here. Think about using tools like blowfish, SHA512, MD5, etc. to protect yourself.
Hey You! If you like this app, write a comment and suggest how it can be improved.
In my quest to become a more effective worker and husband, I have been paying a lot of attention lately to websites like David Allen’s Getting Thing Done (for workflow management), LifeHacker (tips and tricks), and more recently Quantified Self. The latter is a gathering point for lifelogging enthusiasts.
One primary task of lifelogging is to capture data about oneself and one’s surroundings as:
- detailed as possible
- often as possible
- easily as possible.
The first two are fairly easy for me, with dual backgrounds in physiographic research (trained to make detailed, reliable, repeatable, meaningful statistical measures) and web application development (heck, we can log interesting things as often as we want with cellular, PHP, MySQL, and statistical software like R/SPSS/SAS). The third– ease of capturing data– is very difficult to get right for a busy guy like me.
This post details my first attempt at automating screenshot capture and saving it to a private online archive. Continue reading Lifelogging Made Easy: Automated Screenshot Capture and Private Upload Using OSX Automator
Working on measuring the 3D surface of a trail on the fly.
My wife is one amazing lady. I consider myself very fortunate.
Videos are linked, below.
Near Asakusa, we stumbled into a very cool street performance of Taiko drumming. Â It mixes elements of percussion music, martial arts, dance, and a hefty dollop of old fashioned stage presence.
Oh yeah, a few days ago we got to sit in on a kindergarten kid’s taiko lesson. Â The cuteness level was over 9000.
In Narita, we got to check out a gion street festival. Â The Japanese are very hard workers, but they also have more holidays than we enjoy in the States. Â So, they do stuff like haul these shrine-on-a-cart things (“mikoshi”) around and stop for a drink every hour or so. Â It all starts out very disciplined and by the end of the day they’re pretty smashed.
Aaaaand one more, from the Tokyo National Museum of Natural History (equivalent to our Smithsonian Institutions in DC). Â Wait for it…
Hey dad! This video is for you.Sunset on Lake Superior
Hello family and friends! A few photos and videos of our trip so far–
Canyoning [Canyoneering] in Fox Canyon, Minakami, Japan.
Click photos for full-size version, click text links for videos…