Category Archives: Own Work

ANN: PyWordPress – Python WordPress Library using the WordPress XML-RPC API

Announcing PyWordpress, a Python library for WordPress that provides a pythonic interface to WordPress using the WordPress XML-RPC API:

Along with a wrapper for the main functions it also provides various helper methods, for example to create many pages at once. This is somewhat of a belated announce as the first version of this was written almost a year ago!


Command line

Check out the commands:: -h 


create_many_pages: Create many pages at once (and only create pages which do not already exist).
delete_all_pages: Delete all pages (i.e. delete_page for each page in instance).
init_from_config: Class method to initialize a `Wordpress` instance from an ini file.

You will need to create a config with the details (url, login) of the wordpress instance you want to work with::

cp config.ini.tmpl config.ini
# now edit away ...
vim config.ini

Python library

Read the code documentation::

>>> from pywordpress import WordPress
>>> help(WordPress)



Shuttleworth Fellowship Bi-Annual Review

As part of my Shuttleworth Fellowship I’m preparing bi-annual reviews of what I — and projects I’m involved in — have been up to. So, herewith are some some highlights from the last 6 months.

CKAN and the theDataHub


  • Two major point releases of OpenSpending software v0.10 and v0.11 (v0.11 just last week!). Huge maturing and development of the system. Backend architecture now finalized after a major refactor and reworking.
  • Community has grown significantly with now almost 50 OpenSpending datasets on and growing group of core “data wranglers”
  • Spending Stories was a winner of the Knight News Challenge. Spending Stories will build on and extend OpenSpending.

Open Bibliography and the Public Domain

Open Knowledge Foundation and the Community

  • In September we received a 3 year grant from the Omidyar Network to help the Open Knowledge Foundation sustain and expand its community especially in the formation of new chapters
  • Completed a major recruitment process in (Summer-Autumn 2011) to bring on more paid OKFN team members including community coordinators, foundation coordinator and developers
  • The Foundation participated in launch of Open Government Partnership and CSO events surrounding the meeting
  • Working groups continuing to develop. Too much activity to summarize it all here but some highlights include:
    • WG Science Coordinator Jenny Molloy travelling to OSS2011 in SF to present Open Research Reports with Peter Murray-Rust
    • Open Economics WG developing and Open Knowledge Index in August
    • Open Bibliography working group’s work on an Metadata guide.
    • Open Humanities / Open Literature working group winning Inventare Il Futuro competition with their idea to use the Annotator
  • Development of new Local Groups and Chapters
    • Lots of ongoing activities in existing local groups and chapters such as those in Germany and Italy have
    • In addition, interest from a variety of areas in the establishment of new chapters and local groups, for example in Brazil and Belgium
  • Start of work on OKFN labs

Meetups and Events

Talks and Events

  • Attended Open Government Partnership meeting in July in Washington DC and launch event in New York in September
  • Attended Chaos Computer Camp with other OKFNers in August near Berlin
  • September: Spoke at PICNIC in Amsterdam
  • October: Code for America Summit in San Francisco (plus meetings) – see partial writeup
  • October: Open Government Data Camp in Warsaw (organized by Open Knowledge Foundation)
  • November: South Africa – see this post on Africa@Home and Open Knowledge meetup in Cape Town


Talking at Legal Aspects of Public Sector Information (LAPSI) Conference in Milan

This week on Thursday and Friday I’ll be in Milan to speak at the 1st LAPSI (Legal Aspects of Public Sector Information) Primer & Public Conference.

I’m contributing to a “primer” session on The Perspective of Open Data Communities and then giving a conference talk on Collective Costs and Benefits in Opening PSI for Re-use in a session on PSI Re-use: a Tool for Enhancing Competitive Markets where I’ll be covering work by myself and others on pricing and regulation of PSI (see e.g. the “Cambridge Study” and the paper on the Economics of the Public Sector of Information).

Update: slides are up.

Community, Openness And Technology

PSI: Costs And Benefits Of Openness

Talk at UKSG 2011 Conference

Yesterday, I was up in Harrogate at the UKSG (UK Serials Group) annual conference to speak in a keynote session on Open Bibiliograpy and Open Bibliographic Data.

I’ve posted the slides online and iframed below.


Over the past few years, there has an explosive growth in open data with significant uptake in government, research and elsewhere.

Bibliographic records are a key part of our shared cultural heritage. They too should therefore be open, that is made available to the public for access and re-use under an open license which permits use and reuse without restriction ( Doing this promises a variety of benefits.

First, it would allow libraries and other managers of bibliographic data to share records more efficiently and improve quality more rapidly through better, easier feedback. Second, through increased innovation in bibliographic services and applications generating benefits for the producers and users of bibliographic data and the wider community.

This talk will cover the what, why and how of open bibliographica data, drawing on direct recent experience such as the development of the Open Biblio Principles and the work of the Bibliographica and JISC OpenBib projects to make the 3 million records of the British Library’s British National Bibliography (BNB) into linked open data.

With a growing number of Government agencies and public institutions making data open, is it now time for the publishing and library community to do likewise?

Shuttleworth Fellowship – Activity in the Last 3 Months

As part of my Shuttleworth Fellowship I’m preparing quarterly reports on what I’ve been up to. So, herewith are some some highlights from the last 3 months. (Previous update – Sept-Dec)

Talks and Events



Open Shakespeare Annotation Sprint

Cross-posted from Open Knowledge Foundation blog.

Tomorrow we’re holding the first Open Shakespeare Annotation ‘Sprint’. We’ll be getting together online and in-person to collaborate on critically annotating a complete Shakespeare play with all our work being open.

All of Shakespeare’s texts are, of course, in the public domain, and therefore already ‘open’. However, most editions of Shakespeare people actually use (and purchase) are ‘critical’ editions, that is texts together with notes and annotations that explain or analyze the text, and, for these critical editions no open version yet exists. This weekend we’re aiming to change that!

Using the annotator tool we now have a way to work collaboratively online to add and develop these ‘critical’ additions and the aim of the sprint is to fully annotate one complete play. Anyone can get involved, from lay-Shakespeare-lover to English professor, all you’ll need is a web-browser and an interest in Bard, and even if you can’t make it, you can vote right now on which play we should work on!

Using specially-designed annotation software we intend to print an edition of Shakespeare unlike any other, incorporating glosses, textual notes and other information written by anyone able to connect to the Open Shakespeare website.

Work begins with a full-day annotation sprint on Saturday 5th February, which will take online as well as at in-person meetups. Anyone can organize a meetup and we’re organizing one at University of Cambridge English Faculty (if you’d like to hold your own please just add it to the etherpad linked above).

Copyright is a Monopoly! (And isn’t like normal property)

The equation of ‘intellectual property’ (IP) such as copyright with (traditional “real”) property is frequently made, especially by those advocating its extension. However, this equation is fundamentally erroneous and results in very serious misapprehension of the nature and effect of IP. In particular, patents and copyright confer monopolies in a way that ownership of real property does not.

How is it different?

‘Real’ property like an apple, a car or an acre of land can only ever be used by one person/entity at one time — in economist’s terminlogy they are ‘rival’ goods. Giving someone exclusive rights over them therefore does no harm — only one person can have it and via trade we can ensure the person who values it most ends up with it 1. Here, creating property rights leads to an efficient outcome (at least in our simple case — in more complex setups we would need to think about complementarities, transaction costs etc).

By contrast, a copyright in, for example, a particular text confers not simply control over this or that particular book containing the text but over every instance of such a book. This is the very essence of a monopoly: being sole supplier of some good!

And it has all of the standard consequences of the monopoly: prices rise relative to what they would have been and access is reduced relative to its efficient level in which the price equals the cost of reproduction (i.e. we have a “deadweight” loss).

Furthermore, this cost of monopoly can be particularly serious when we have extensive “reuse” — i.e. new work builds upon old — as the monopoly inhibits not only access by users but the creation of new creative work.

The difference then between “normal” property and “intellectual property” is the difference between giving someone control of one apple (the apple they bought say) and control of all apples. The latter results in significant harm and inefficiency while the former does not.

Now, of course, the fact copyright is a monopoly does not mean it is per se bad. After all, we are deeply concerned with the incentives to create and the copyright monopoly helps provide such incentives.

We may therefore be willing to tolerate the ex-post costs of a monopoly because of the ex-ante benefits it provides in incentivizing and rewarding the creation of new work. But this is fundamentally a trade-off and one which gets worse as the monopoly is extended — a completely different situation from that with “real” property.

This point is made elegantly by Macaulay (opposing a copyright term extension in the 1840s):

“It is good that authors should be remunerated, and the least exceptionable way of remunerating them is by a monopoly. Yet monopoly is evil. For the sake of the good we must submit to the evil: but the evil ought not to last a day longer than is necessary for the purpose of securing the good.”

This is not something one would write about normal, ‘real’, property.

Substitutes (or, what exactly is a Monopoly)

Some people, particularly rights-holders, tend to argue that copyright isn’t a monopoly because of the existence of close substitutes (Helprin does this too where he tries to distinguish expression and ideas). In a strict sense this is simply false: a monopoly is the control over all (or most) of a market in a particular good (in this case the copies of a given cultural work). If entity X has monopoly in apples, the fact that I can buy oranges instead of apples does not change the fact that X has a monopoly.

However, in a broader sense this point is correct: the “proximity” of substitutes will clearly affect the demand curve a monopolist faces and therefore the price they can charge (in the extreme case when substitutes are perfect the ‘monopoly’ of course disappears).2

This is the point lying behind the copyright/patent distinction — the argument being that copyrighted works have much closer substitutes than patents (whether this actually true is unclear to me: what substitutes were there for Harry Potter? Many patents have relatively close competitors etc).

Nevertheless the fact remains that a copyright still acts like a monopoly in permitting the owner of a copyright to raise price above what it would have been (if not there’d be no point in having it — at least the “economic” rights portion). Furthermore, one has to be cautious in one’s logic here: the existence of close substitutes may lessen the harm of a copyright monopoly but it also reduces the benefits (the revenue incentives).

To put it most bluntly:

If copyright isn’t acting like a monopoly then, while causing little harm, it’s also not doing much good.

Specifically, if substitutes are sufficiently close that the copyright holder can only raise prices (much) to a very small degree above reproduction cost (and hence we can say no monopoly exists), then the benefits of the copyright, in terms of increased revenues to the copyright holder, must be commensurably small.


I wrote the original version of this post over 3 years ago but failed to hit publish for reasons unknown. It’s creation was motivated by being pointed at this article by a Mr Helprin (who later fleshed out his thesis into a book). Discussions over the intervening years, especially with those advocating the extension of copyright, have only made it clearer how important it is establish the basic point that ‘copyright is a monopoly and isn’t property’.

  1. To a crude first approximation. There are many reasons why this ‘efficient’ trade may not happen (see next sentence). 

  2. As recognized in antitrust law with the endless discussions of what constitutes the ‘market’ for a given product. 

Introducing YourTopia – Development beyond GDP

The following is cross-posted from the Open Knowledge Foundation blog post. It reports the results of the code-sprint reported in this previous blog post.

Today we’re announcing a simple new app (also submitted to World Bank Apps competition) that allows anyone to say what kind of world, what ‘YourTopia’, they would like to live in:

As well as having a very simple function: to tell you what country is closest to your ideal, the app also has a very serious purpose: to help us develop a real empirical basis for the measures of development that are used to guide policy-making.

Is health more important than education, or GDP, is the amount of R&D more important than amount spent on primary education? Help us find out what the world thinks!

You can see the app in action in the following video, or head over directly YourTopia and answer the 2-minute quiz.

More Information

Development Economics has for a long time recognised the deficiency of GDP as an indicator of human development but with little reception in policy-circles. Recently, however, the debate changed and no month passes now without a high-level report on “Development beyond GDP”.

OKFN’s new Open Economics Group has now constructed an application to test two solutions to primary problems in this debate, and it is participating in the World Bank’s competition “Applications for Development“.

Measures of human progress beyond GDP either use so-called dashboards of indicators (e.g. WDI) or composite indices (e.g. HDI or MPI). An openness-problem with the first approach has been that dashboards were so complex that the public was de facto excluded from the debate. The second approach tried to simplify through combining different dimensions into a single index but then suffered from arbitrary assumptions on the choice of weights applied to indices and choice of proxies for different development dimensions.

These are significant problems and so we’ve created Yourtopia, as the first application that produces a composite index of human development (OpenHDI) without arbitrary choices of indicator-weights and proxy choices.

We circumvent these problems simply: by letting the user participate. Rather than the researcher selecting proxies and indicator-weights we let the user choose. The resulting index of human progress is then personalised and contains no arbitrary assumptions by construction.

While the constructors of the HDI, for example, was always attacked for their assumption that human progress just depends on education, health and income and that these each carried the same importance, we now let the user decide which dimensions of progress are important and how they compare to each other.

Get Involved

We’d love to improve YourTopia in lots of ways and we need help with design, coding (python or javascript), and writing (from both an economists and a layman’s point of view!) (for example what does GNI in PPP terms mean to most people — we need translators from jargon to English!).

If you’re interested in helping please send either join the open-economics mailing list or just send a mail to info [at] okfn [dot] org.


OpenHDI: Open Human Development Index

A few members of the Open Knowledge Foundation’s nascent open economics working group are having a code-sprint this Friday and Saturday to work on an app for the world bank competition currently called ‘Open HDI’ (Human Development Index):

The idea is to look at ‘development beyond GDP’ by collecting weightings on particular aspects of ‘development’ (health, education, gdp, inequality) from users and using that to build our own human development index.

We first talked about this a few months ago at the open economics online meetup. Dirk Heine and Guo Xu then put together an excellent demo version: and now we’re working to take that to the status of a full app!