This post is for anyone interested in any of the Government Transparency inituatives. If you’ve been following this topic then you’re probably aware that Vivek Kundra sees a dashboard as a way of accelerating the transparency and transformation of the Government.
After watching groups like the Sunlight Foundation and Change Congress work their magic, I’ve now begun seeing much of this transformation from the inside due to my new job.
However, I still endeavor to participate externally as well and so I wanted to do some analysis on the public data.
In order to start, I wanted to import the USASpending.gov information into Google spreadsheets, since I can kill two buzzwords at once by leveraging Cloud Computing services for Transparency!
For a while, I fought with the easiest way to import the data and wanted to share what eventually worked for me.
First, create an new spreadsheet and name your tab appropriately. Then go to the USASpending Feeds page to select the specific data you want. I suggest starting with the Exhibit 300 information since it’s typically a smaller dataset and my Exhibit 53 tab with more than 1200 rows has proven to be very slow.
Next pick, and I highly suggest reordering, the data fields you want you must then pick which Agency or Agencies you’d like info on. Again, considering that lots of data will be pretty slow.
Finally, select the CSV icon which should open the download prompt for your browser. It’s unfortunate that the implementers didn’t use a dynamic tag here because you can’t simply copy the URL. Instead I had to first download the file itself and then copy the originating URL into my clipboard (I was using Chrome so how to do this will depend on your browser).
The URL should look like a much longer version of this:
Now that we’ve got the URL we can import everything into our spreadsheet by selecting the A1 cell and entering:
=ImportData("<url>")
Where “<url>” is of course the long URL you copied earlier.
After a quick few seconds your data should be automajically imported!
For the Exhibit 300, things worked just great but for the Exhibit 53 data I ended up with each cell of Column A holding the full data for each entry. So in B1 I simply entered: =SPLIT(A1, “,”) (note thre’s a bug with Google where the quotes ave to be double quotes not single) and then things auto populated left to right.
Unfortunatley, the “SPLIT()” didn’t auto-populate downwards as well and dragging the function down the full B column is very very painful.
In the beginning you were a Starfighter, recruited by the Star League to defend the Frontier against Xur and the Ko-Dan armada… well, actually the beginning was something much simpler, something more like Space Invaders.
Space Invaders was a classic, it spurred the video game industry, inspired a vast genre, can still be played online and occasionally even in a lecture hall.
Now, you can play in my office;
Well, it would be hubris to claim that my humble beginnings have reached the same success but I do believe it has matured in much the same vein. I seem to have moved beyond building a deadly office putting toy to a serious office defense system!
This might even classify as something much more sophisticated than some Russian spy gear! Now I’m truly ready to defend my office against any and all invaders, alien or otherwise!
In truth, I’m hoping I can stash this in a friends office maybe for a surprise ambush! However, in practice it might be hard to convince someone to put on a face shield before heading to work.
Building from my previous creation I connected my wiimote to a servo via some python and my ioBridge204 module, only this time I replaced the coilgun with a remotely triggered airsoft gun! Now there are no more issues with reloading a weapons system half a world a way after each shot!
I know it seems like a while since I last posted, but since my Christmas enlistment into the Joint Strike Force I’ve been busy winning WWIII for America! Actually it’s not been all video games, I’ve been working on a Django project that I hope to release in a few weeks, and inspired by ServoBeer I managed to find time for some ioBridge hacking.
However, as you can tell my recent militaristic tendencies have probably gotten the better of me!
Weapons of War
As you know from my previous posts I’m interested bringing a higher level of physical awareness and capability to my typical computing environment. Embedded systems are usually used to bypass the need for sophisticated systems, and the ioBridge is great for those situations.
Yet, I’m perfectly comfortable with the idea of using a laptop for a command and control system. It might be a more “tethered” solution then some people would like but I figure in a few years my iPhone will be able to fulfill the role my laptop currently has!
I wanted to move beyond some of the work I’ve been doing with passivesensors and in thinking about some ideas for a more active interfaces I realized that the wiimote certainly fits the description of a powerful controller! There are already enoughgreat wii controlhacks out there and some programs let you use the wiimote as a mouse!
But I wanted more then to just replace my mouse, and in most of these cases the flow control goes from the wiimote to a computer, or the wiimote to an arduino with lots of wiring. I wanted to both avoid the electrical requirements as well as extend the influence and “reach” of my wiimote beyond my immediate vicinity.
There are certainly times when you wouldn’t want to put your expensive new Macbook in harm’s way. Whether on the front lines or in the basement laptops are sometimes the wrong systems to dedicate to a task, so ioBridge to the rescue!
The ioBridge already has a number of features which make it idea for “remote” situations and so all I needed create was a mechanism to coordinate wiimote events sent to my computer with ioBridge events sent to the module. Luckily the team at ioBridge has created just such an API!
In this setup I use a python script and MoteDaemeon to bring the events into my laptop’s domain. Of course I could script up a number of local events but what I wanted to do was act on that data and sending commands to an ioBridge module.
So I build a website which monitors the position from one axis of the wiimote and extrapolates that position to a servo output on a remote ioBridge module (which happens to be in my office, but doesn’t have to be). I’m also tracking some of the button inputs and can expand easilly to include other axes as well!
Now I just needed something fun to control on the other end! I happened to have an office golf putter lying around and that uses an electromagnetic induction coil to generate the force needed for the ball return when you sink a putt. If you take that apart and replace the metal cylinder with something a tad bit smaller then you’re left with a coil gun capable of some pretty powerful shooting!
I’m not sure it’s up to DoD standards yet but remember the only required link between the wiimote and the ioBridge module is the Internet so if you can sneak one of these into your friend’s house, or a colleagues’ office, then you could be anywhere on the planet with Internet access and stick it to them!
How’s that for “Can you hear me now?”. Check out the video of it in action on YouTube or Vimeo!
I wanted to post something relatively quick tonight, so here’s a bit of poking I’ve been doing. I’ve yet to get anything interesting with bluetooth between my laptop and my iPhone. That and I’m a pretty paranoid person so I keep the bluetooth turned off. However, I decided to leverage my paranoia to give me a reason to keep bluetooth on.
So I did some poking around and came up with the shell script below… yes, I know shell scripts are old-time-y, and I’m even more aware that my bash skills have slipped with age.
I’m working on some python code but rather then looking crufty and forgetful that will come off as clueless and juvenile so we’re sticking with shell for now, because it works (which is all most shell scripts can claim anyway).
A few things that made this hard has been the evolution of dbus and the apps built on them. There’s some interesting articles out there but most tell you how to implement a dbus service and not how to make calls to an existing one, i.e. how in the world can I query dbus methods rather then just “sniffing” them out.
The example in this post incorrectly lists the locking target as "org.gnome.ScreenSaver.setActive" when it is actually "org.gnome.ScreenSaver.Lock" also it is listed in the method list. The command dbus-monitor will help immensely, and if someone can tell me why ^C doesn’t work and I end up having to ^Z and then kill %1 that would be great.
Also the Poke method doesn’t initiate activity in such as way as to produce an “unlock” screen as you’d expect.
Another example of frustration is this python sample from RedHat which fails, i.e. the object returned by dbus.SystemBus() has no member get_service().
I grew using KDE and although I run GNOME now I miss many KDE things, but I’m hopeful that dbus becomes a common communication system for all things on Linux, although there are times when it feels like reinventing the wheel like why can’t network manager just use the standard ifconfig and iwconfig commands.
However, I think I’ll save trying to figure that part out until after I get my python in shape.
My apologies for the code formatting, I’m not sure how to do this cleanly in WP, however, I hope this helps someone out there!
#!/bin/bash
### You’ll need to change the 00:FF:FF:FF:FF:FF below to the bdaddr of your phone
if [ $jay_found -eq "1" ]; then
echo “I found your phone”;
sleep 10
dbus-send –session –type=method_call –dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Poke boolean:true
lock_it=0
else
if [ $lock_it -eq "0" ]; then
echo “Not yet!”;
lock_it=1
sleep 30
elif [ $lock_it -eq "1" ]; then
echo “I think I should lock your screen”;
# dbus-send –session –type=method_call –dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock boolean:true
lock_it=2
else
# I don’t know that there’s a good alternative here
sleep 60
fi
fi
done
I often think I have good ideas, but I tend to be a “thinker” and have problems “doing”. It’s not that I can’t “do” it’s usually the familiar feeling of saying “Wouldn’t it be nice if…” quickly followed by “yea, and it would also be nice if I had time for that” which I’m sure we can all sympathize with.
I recently read Accelerando by Charles Stross. It’s not my favorite book of his but I really like his work. In this story one of the main characters embodies sort of the ultimate in opensource philosophy. Rather then just the typical “writing code and giving it away for free” that we’re all familiar with, he shares his ideas for free and lives off the goodwill of those who implement them.
It would be an ideal job description for me, and although I never expect to get compensated for an idea I thought I would try to embody that idealism. I seem to recall a website somewhere in the ether with the same philosophy but can’t recall the URL.
Anyway, in that spirit, here goes;
I think someone should hack greasemonkey and google reader so that “sharing” or “starting” an entry automatically promotes it on digg and reddit. There shouldn’t be an additional step. Or maybe digg and reddit could simply implement feed slurping for your shared list.
I believe the future of the Internet as a whole will be an increasingly seemless interaction between multiple services. User’s don’t want to manage Gmail and Yahoo mail as separate entities (yes I have both). That’s a simple example but ask yourself the question why, given the proper security / policy / profile controls, it’s necessary for you to goto Facebook to receive your Facebook messages.
Why can’t your Facebook “status” be slurped from Twitter, or pushed there?
Seamless integration, it’s what many of the best “hacks” seem to be about.
Lets be witty I’ll call it “seemless” integration, where multiple services seem unified.