SPSS .sav to CSV

In attempting to download some data from the UK Data Service, I ended up having to use a file created by the statistics package SPSS. I don't have SPSS, nor have I ever used it, and these .sav files don't seem to open up sensibly in a text editor.

Fortunately, R has come to my rescue! What follows are the steps I took in Debian linux to get a comma separated values (CSV) file out, which can be opened by Excel, text editors and lots of other programs.

To install R, you do:

sudo apt-get install r-base

Then you open up R by typing "R". Once you're in, install and start the "foreign" package for handling SPSS files:

install.packages('foreign')
library(foreign)

Then you can read in the data set as a data frame:

dataset1 = read.spss('/path/to/file.sav', to.data.frame=TRUE)

Then all that remains is to output the CSV file. I saved mine in /home/beth:

write.csv(dataset1, file='/home/beth/dataset1.csv')

...

Bringing a bit of Oxford to the east coast of the USA

Map of tour places

So our crowdfunding campaign was a success! This July, we all bundled ourselves onto a plane, armed with folders of music and wide-eyed excitement. I'm so grateful to everyone that donated and spread the word about our campaign.

We started out in Washington, with concerts in the city church and in the cathedral. Washington Cathedral, it turns out, has a gargoyle on the outside shaped like Darth Vader, and a stained glass window with an honest-to-goodness moon rock in it. The White House, the senate, the Lincoln memorial, the Smithsonian and the National Academy of Sciences were all super close to each other, so we managed to do some sight-seeing despite the sweltering weather.

To science, pilot of industry, conqueror of disease, multiplier of the harvest, explorer of the universe, revealer of nature's laws, eternal guide to truth.

The ceiling at the National Academy of Sciences. It reads: "To science, pilot of industry, conqueror of disease, multiplier of the harvest, explorer of the universe, revealer of nature's laws, eternal guide to truth."

In Wilmington, after we were fed enormous amounts of food by the audience, we were kindly welcomed into the home of the Saads, whose daughter Alexa is a super-awesome singer, and whose son is distressingly good at board games. Then in Northampton our new host families threw a fourth of July party for us, and with the help of two small girls we dressed up the bass section in sparkly ball gowns.

The next day we sang in the church next to Smith College, and by a truly amazing stroke of luck, a few of us were shown around the university bell tower, and even got to ring the bells!

All in all, I had a wonderful time, met amazing people, sang beautiful music and saw utterly unique sights. Again, you guys, I am so grateful.

...

Wuthering Bytes

I spent this weekend at Wuthering Bytes in Hebden Bridge, Yorkshire - three days of talks and workshops on hardware, software, and tech in general.

A joystick attached to a Raspberry Pi.
Some of the projects from the workshop.

Amongst the cool talks that I listened to there was steam-powered techno, a presentation from the mother of the ARM processor, the Oxford Flood Network, and some literal rocket science, with fire and ear protectors and everything.

(You can see what we were all tweeting by checking out the #wutheringbytes hashtag.)

The wonderful Gareth & Naomi gave a presentation on their work with the Incredible Aqua Garden, an aquaponics system for growing food in Todmorden. They've built a monitoring system from scratch using a combination of Raspberry Pi and Arduinos, and even invented their own wireless sensors. They use NodeRED for wiring together hardware and APIs. We took a little detour to visit the garden, which is inside a local school, and found a greenhouse full of basil and watercress, getting nutrients from the fish that live beneath them.

The Sunday was given over to workshops. At my table, the Incredible Aqua Garden people (Gareth, Naomi and Paulo) were teaching attendees how to interface Raspberry Pis and sensors. I spent the day with some JavaScript libraries, and (with help from @hoegrammer and @errietta) made some graphs of real-time data from the sensors attached to the Raspberry Pi inside Incredible Aqua Garden, which broadcasts data across the internet using WebSockets.

Graphs of light level and pH from the Incredible Aqua Garden
The graphs aren't very exciting because the environment inside the aqua garden is very well controlled.

The code is available on GitHub (incidentally, this was my first experiment with GitHub Pages, and I benefitted very much from this tutorial), and it uses Rickshaw, as well as WebSockets. We were given two different electronics kits to play with as going-home gifts, as well as the world's cutest GitHub sticker, which now has pride of place on my little laptop.

...