# Quantum Forest

### notes in a shoebox

Flower pot on the window sill, Bordeaux, France (Photo: Luis, click to enlarge).

I write differently from what I speak, I speak differently from what I think, I think differently from the way I ought to think, and so it all proceeds into deepest darkness—Franz Kafka

Almost 3 years ago I posted my computer setup following the model introduced by The Setup. A few things have changed in the meantime and this time is as good as any for updating the list.

### Hardware

Computers: I have been using a 13″ macbook air for 2 years now, with a 256GB SSD and 8GB of RAM. At the beginning it was strange moving from a 3.5 year older macbook 15″ to a new computer with the same hard drive and RAM. Soon the differences became more apparent: 1.2 kg lighter and much longer battery life made lugging around the computer easier. I didn’t miss (much) the larger screen. The biggest constraint has been disk space; now I only have 25 to 30GB available in disk, which involves some juggling on my part. Next computer should have a minimum of 512GB hard drive, especially when considering the size of photographs. I also have a 2009 iMac 27″ which keeps on going; at most I’ll go for extra RAM this year but It’s OK as it stands.

Phone: I use a Samsung S4 (courtesy of my job), which is good enough although I have to turn it off every few days or some errand process will consume battery like there is no tomorrow. It meets most of my requirements, except I find the camera disappointing. Basic apps: email, calendar, twitter, runkeeper, pocket casts (paid), 1weather (paid), camscanner (paid), kindle & evernote.

Bag: For the last year and a half or so I have been using an Osprey Flapjack backpack, which is OK for walking with a laptop during short distances. However, it has poor back ventilation,  making walking for fun (yes, I do that sometimes) and cycling uncomfortable. I’m considering buying an Ortlieb Downtown pannier for cycling to work, instead of my current crappy panniers.

Photo/sound:  I still use my Nikon P7100, which is a point and click with manual features too. I take fewer pictures than I would like, but it is not its fault. Sometimes I carry a Sony PCM-M10 digital recorder, which does a pretty good job in general.

### Software

I have continued my belief on the impermanence of software and the need to stay operating system agnostic as much as possible.

Statistics: plain R for quickies, plain R + RStudio for bigger problems, plain R + RStudio + ASReml for quantitative genetics. SAS the odd time for historical reasons.

Presentations: back to PowerPoint after several years of Keynote. Main reason: Keynote is horrible at supporting presentations in older versions, which is death by a thousand cuts when preparing lectures. Secondary reason: the updates  have worsened Keynote.

Writing: most journal articles in Word, because most of my coauthors use it, short bursts of writing/quickies go to a text editor. I keep on changing editors, but I tend to return to Textmate 2, which has received some TLC since it was open sourced. I keep up some lecture and lab notes in latex but overtime I update them I think if it’s worth the trouble: a combination of cargo cult and Stockholm syndrome.

Photos: an old version of Adobe Lightroom for photo management, Skitch for quick image manipulation. Not completely happy with the latter, but haven’t found a good substitute.

Email: I dislike Outlook and can put up with Thunderbird, so Thunderbird it is. I can’t understand people who say I’ve kept all my email for the last 20 years, so every few years I have a catastrophic email cleansing and messages disappear. Note to self, organize an email implosion for 2015.

Browser: jumping between Firefox and Safari depending on my mood. Add-ons: Adblock Plus to make the internet free of ads.

Keeping things in sync: Dropbox.

All this software works well/it’s palatable in both Mac and Windows (keeping up with my agnosticism); some of it (Thunderbird, R, RStudio) also works in Linux. Some days I’m tempted to use OpenOffice to reduce operating system dependencies but, let’s be honest, OpenOffice is still clunky as hell.

There are loads of other programs in my computers, but don’t use them often enough to mentioning them.

Traveling for swimming competition—kiddo competing while I officiate—and staying in a motel. There is some novelty and adventure for a kid in jumping in a car and appearing in a slightly different landscape a few hours later. That sense of adventure has often been lost or drowned in adults, probably the product of too much business travel to (almost) pointless meetings. I should say brief adventure, as tonight will be early bed as Saturday starts at 7:30am sharp on the pool deck.

Driving down Canterbury on a Friday evening is an easy and unexciting drive: flat, straight roads with the odd narrow bridge and no much traffic. Farmland, milk trucks, some crops here and irrigators over there. The clouds are always impressive though. This time they look mildly menacing, grey but well defined, with a hint of yellow and ocre nearing the end of the day.

We arrived at the motel, checked-in and moved our luggage to the room. On the plus side the place is spotless and not terribly noisy (despite being next to the road); however, it suffers of internet scarcity: room includes 50MB for two nights. My phone’s farts use more bandwidth! Of course I spoke too soon, as I can now hear boggans driving down the road with their modified cars: very low, one can imagine their bottoms almost touching the street, with huge exhausts to compensate for their [insert complex here] and bass boosting stereos.

It was just over a 2 hour drive but I feel a tad tired. I have lost practice driving around and most of my ‘commute’ (if 15 minutes can be called that) is by bicycle. Better wrap up this post here before I blow away all my fifty megabytes of restricted browsing.

No one can become really educated without having pursued some study in which he took no interest—for it is a part of education to learn to interest ourselves in subjects for which we have no aptitude—T.S. Eliot

I have been writing in internet on and off—perhaps mostly off—for near 20 years, including various blog stints since July 2003. This is my fifth or sixth iteration for a blog and I figured out that one element that makes it difficult to keep going in its current form is how skewed is the sampling of topics I covered. I mean all this quantitative, coding, etc. is like looking through a prism that only lets through a tiny portion of life.

Prism used to set ‘prism plots’ in forest inventory, where the distance to the tree and its size determines if it is inside the plot (Photo: Luis, click to enlarge).

I am loosening my mental definition of what should be in this site because as much as I like programming and numbers, it becomes tiring to always be switched on for those topics.  Some times this change will go unnoticed while others will represent a big departure from what is (or used to be) the core of this blog’s content.

I am hoping to try different topics (perhaps more common in a previous blog incarnation), angles and media. We will see how it works out.

…All right, but apart from the sanitation, medicine, education, wine, public order, irrigation, roads, the fresh water system and public health, what have the Romans ever done for us?—Reg in ‘Life of Brian’, Monthy Python.

I don’t believe in New Year resolutions: the idea that people have to wait until this particular position of the orbit around the sun to start doing something. At the same time, I am not great at sticking with changes of behavior: I get distracted easily and I trace it back to losing momentum. Once I stop I find it very difficult to restart.

Yesterday—Tuesday 27 January—I decided to fix at least one thing at home every day, so I can one day be up to date with all the DIY and TLC the house needs. It can be working in a big project or as simple as hanging a picture, but I have to do something. In reality I have been doing this since mid-December, but I prefer to formalize it just to keep momentum. Keep on moving forward; that simple.

Gratuitous picture: cabling my head (Photo: Luis, click to enlarge).

Accidental phone camera knee (Photo: Luis, click to enlarge).

I’ve been having a conversation for a while with @kamal_hothi and @aschiff on maps, schools, census, making NZ data available, etc. This post documents some basic steps I used for creating a map on ethnic diversity in schools at the census-area-unit level. This “el quicko” version requires 3 ingredients:

• Census area units shape files (available from Statistics New Zealand for free here).
• R with some spatial packages (also free).

We’ll read the school directory data, aggregate ethnicity information to calculate the Herfindahl–Hirschman Index of diversity and then plot it.

Then I moved to create a map in R, for the sake of it:

And we get a plot like this:

Ethnic diversity in schools at the Census Area Unit level (0 very diverse, 1 not diverse at all).

Just because it is Monday down under.

P.S. Using the diversity-index-census-area-unit.csv and joining it with the shapefile in QGIS one can get something prettier (I have to work on matching the color scales):

Similar map produced with point and click in QGIS.

Map rendering is so much faster in QGIS than in R! Clearly the system has been optimized for this user case.