Sunday 10 January 2016

Running QGIS on a Chromebook

I recently got a Chromebook because I wanted a lightweight, lightning fast computer that I could use for writing, e-mailing and other less computationally intensive tasks. But I also wanted something with a decent level of power so that I could install Ubuntu and run QGIS on the move (my main laptop weighs about 100kg). I just returned from doing a QGIS/dataviz training course for PhD students in Glasgow where someone was running QGIS on a Chromebook so I thought it was about time I got my act together and did it myself. I'm blogging it here in case anyone wants to have a go, or is considering doing it themselves. But let's start with a nice screenshot of QGIS on the Chromebook first.

Running QGIS in Ubuntu on a Dell Chromebook 13

I didn't want to wipe Chrome OS from my machine so I followed Matt Elias' instructions on how to get Ubuntu on my Chroombook using Crouton. He's tested it for a range of different machines and I think it's the best installation guide out there. I'm pretty new to Chrome OS and Ubuntu but it was really easy. The only problem came when I couldn't tell the difference between a 0 and a O. Once you get it all sorted, you start Ubuntu from a Chrome tab (see below) and then you can switch back and forth between Ubuntu and Chrome in an instant using CTRL+ALT+SHIFT+forward key. It really is super fast. My Chromebook has 4GB of RAM and an i3 processor so it's not top-spec by any means but the performance is great.

Looks a bit scary, is actually pretty easy

I then installed QGIS 2.8 because I'm used to it and it's very stable. This was really quick and easy as well. I decided to see what kind of damage I could do by throwing a massive dataset into the mix, just to test the capabilities of my new machine. For this, I decided to do a bit of experimental mapping with my American commute dataset of about 4 million commuter flows between 74,000 or so Census Tracts in the US. I've made the data available for anyone to use if you like what you see here: it's on my Dropbox. The total size of all parts of the shapefile is 1.6GB, so I thought it might break QGIS in Ubuntu but not at all. Here's the data loading up.

The 4 million lines loaded very quickly, the table a little slowly

I then decided to do a bit of filtering on the dataset to see how this went. Just like on my more powerful machine there was a short delay but it worked without a hitch. The only thing you'll notice is that the QGIS window goes into dimmed mode, as you can see below.

Screen dims while QGIS thinks about it

From here is was a case of experimenting with different filtering options on volume and length of commuting links, and then adding in some place labels and changing the projection, just to see what kind of performance I got. In short, it was great. No crashes, no long hangs and only quite small delays, despite the very large size of the dataset. Here are a few more images from my test session.

A bit of the Midwest without labels

Similar area, reprojected and with labels added

Slightly re-styled and focused on the Bay Area

I was very pleasantly surprised by how slick it is. The only strange thing I noticed was that when I went back to the Layers panel and right-clicked a layer name QGIS sometimes zoomed out to full extent, but this wasn't a major issue for me. I also did a little video of me switching from Chrome OS to Ubuntu and back again - it's not edited and is shown in real time just to give you a little idea of how quick it is. The video is not very good quality because as far as I'm aware there's no screen recorder that will allow me to capture this OS switch so I did it on my Android smartphone. Sorry about the blurriness but you can get the idea and also see a bit of Alt-Tabbing here. 




So, my overall verdict... The fact that my Chromebook boots up in 2-3 seconds every time and wakes up in less time than that is a major plus. I can switch between Chrome OS and Ubuntu instantaneously. QGIS works very well and is so fast. It's still better on my dual quad-core, i7, 32GB RAM Dell MegaMonster (I forget the actual name) but for working on the move with a machine that is lighter and much less pricey than a MacBook Pro, I like what I see. It's not a top-end machine, obviously, but for most daily tasks it is more than sufficient. 

If you're thinking about getting a Chromebook, then the Dell 13 gets great reviews and I think it's really nice. I know there are already a lot of QGIS users on Linux but I haven't heard too much about QGIS on the Chromebook, probably because Crouton is still relatively new and until recently quite difficult to figure out for many users (or at least people like me with limited knowledge of Chrome OS and Linux). 

I love the fact that I can run both operating systems and that they are so fast. Contrary to what some critics say, I can confirm that the Chromebook isn't just a very expensive web browser; they are actually pretty powerful Linux laptops. I'll definitely continue to use my more powerful Windows machine but I really like what I see with this 'dual-boot' set up. If you do have a Chromebook already and want to use QGIS but are not brave enough to attempt the Linux install, you can just run it in a web browser in Chrome, since rollApp have made QGIS available online now.

Why am I not just using a Mac anyway? Good question. I think it all stems from the time when everyone had a BMX but I had a Grifter