Python Graffiti in Copenhagen

København-20130912-00008

For the last few months I have wondered why some Copenhagen street artist active between Svanemøllen and Hellerup stations had found a reason to celebrate my favourite programming language.

Are they marking the programming language, the television series, or is there a street gang that has appropriated the name? I may never know.

Whatever the explanation, ever since I noticed it, I have wanted a picture for this blog. I succeeded in getting a clear-enough photo from the moving train today, and here it is.

Social Graph of 8GCHP

The 8th Global Conference on Health Promotion took place in Helsinki on 10-14th June 2013. It was the first of these conferences to feature a Twitter Wall, a projected feed of tweets that included the conference hashtag:  #healthinall. Given the novelty of the initiative to many colleagues at the conference and in public health, I thought I would illustrate the patterns of tweeting and re-tweeting with a network diagram.

 

Continue reading

Using Gapminder data files in R

The problem: I want to use data in Excel files from multiple sources, and to combine them in one analysis. Gapminder is a rich source of such data. For instance: what if I want to look at alcohol consumption (from WHO) against GDP (from the World Bank)? I wrote a short routine (see it on Gist: gapmind-r.r) to summarize these processes:

  • Download: you first need to download two Excel files, one for alcohol consumption and one for GDP.
  • Prepare: given that Gapminder uses the string ‘..’ to denote missing values, search the ‘..’ values and replace them by ‘NA’ (no quotes in either).
  • Import: you then use the gdata package to import the data into R. There are other ways, but I find this is the easiest when working with Excel.
  • Simple manipulation then follows, to show the data in use: joining the dataframes, selecting relevant columns, and plotting with R base graphics as well as ggplot2.

Redesigning Food Labels

Here is the brief: design a label for food products that summarizes the range of nutrients inside the package and helps consumers assess their place in a healthy diet. The information should be detailed enough for intelligent analysis, standard enough to allow comparison between similar products, and graphic enough to strike the casual consumer. A contest asking designers to fulfill that brief has just ended on 25 July 2011 and three winners declared.

Continue reading

Processing with Python: A first effort

I like the power of Processing for its easy visual effects, for its fine-grained control over every pixel, for its speed, and for its sheer range of libraries. On the other hand, I have limited Java skills and any non-trivial work in Processing requires you to be fluent in Java as well. I want to try and explore whether I can use Processing within Python, a language that is as powerful as Java, but which I find more intuitive and produces cleaner code. The challenge: how easy is it to port a Processing sketch into Python?
Continue reading

Dynamic Logo for the Global Movement on NCDs

I invite you to watch a short snippet of a generative identity (a dynamic logo) that I developed for the global movement on noncommunicable diseases. I originally intended it as learning exercise to gain some experience in the Processing environment, but this version turned out to be good enough to be given limited public exposure. It was used a couple of times as a holding slide during technical meetings in the preparation for the UN High Level Meeting on Noncommunicable Disease Control.

Continue reading