Tag Archives: Wolfram Alpha

Open data: e se usassimo Wolfram Alpha?

In molti paesi (e finalmente anche in Italia) le pubbliche amministrazioni cominciano a rilasciare i loro dati perché i cittadini li riutilizzino e li remixino. Già l’atto è importante, ma naturalmente questi dati genereranno tanta più energia sociale quanto più semplice e intuitivo sarà il loro utilizzo. Le strategie di usabilità che ho visto in giro sono molto, molto diverse tra loro.

A un’estremità dello spettro, alcune organizzazioni puntano sulla visualizzazione, per così dire, in-house. Un esempio è l’OCSE, con il suo eXplorer: un’interfaccia di visualizzazione sofisticata, che permette animazioni, mappe multistrato, integrazione con GoogleMaps. L’unico problema è che i dati rimangono bloccati lì dentro, e anche le visualizzazioni – il sistema le chiama “stories” – si possono vedere solo da eXplorer. L’unica cosa che puoi fare è esportarle sotto forma di un file XML da condividere con i tuoi amici e colleghi; ma poi loro devono caricarlo su eXplorer per poterlo leggere. In generale, il sistema è complicato e poco flessibile; inoltre, lo scalino per gli utenti novellini è piuttosto alto (il file di istruzioni è oltre 30 pagine).

All’estremità opposta ci sono esperienze come quella della Ragioneria Generale dello Stato italiano. Il database è scaricabile, e ci sono istruzioni per generare tabelle riepilogative. Purtroppo, sono molto specifiche: presuppongono che il cittadino usi una funzione specifica (tabelle pivot) di un particolare software, per di più proprietario e costoso (Microsoft Excel. Forse sarebbe stato più elegante riferire il tutorial a OpenOffice). Tranne che per gli utenti esperti di Excel, questo sistema è “tutto o niente”: o ti confronti con enormi tabelle di dati disaggregati o investi una mezza giornata per seguire il tutorial e provare a fare qualche ipotesi di aggregazione. Va bene per i ricercatori, ma non crea interesse per giocare con i dati in chi ricercatore non è.

Forse una buona via di mezzo è la strategia della Banca Mondiale. World Databank permette la creazione di semplici report (compresi grafici e mappe) direttamente sul sito ma consente anche di scaricarsi i dati in formati diversi. Così, un cittadino può fare una prima esplorazione direttamente dal sito: in un minuto scarso può già guardare un semplice grafico. Se poi ci prende gusto, scarica i database e costruisce le elaborazioni che preferisce con il software che preferisce.

Credo che il senso delle politiche di open data sia tanto più profondo quanto più si riesce ad allargare la comunità dei cittadini che sanno capire, riutilizzare e spiegare agli altri i database governativi. Per questa ragione consiglio assolutamente a quelle autorità pubbliche che volessero intraprendere questa strada di incorporare nei loro siti delle funzionalità di preview rapida, come quelle di World Databank.

Sviluppare queste funzionalità costa caro (eXplorer certo ha l’aria di costare caro). Una possibilità low cost è probabilmente quella di scrivere un widget per Wolfram Alph, il motore computazionale ideato dall’uomo che ci ha dato Mathematica. Le sue capacità di calcolo sono largamente adeguate a qualunque ragionevole uso in questo contesto (fa delle cose semplicemente sbalorditive: provate a inserire nella riga di ricerca “compare a mouse and an elephant”): il problema è piuttosto quello di aggiungere a fare comunicare Wolfram Alpha con i database governativi. Se si riesce, però, è possibile scrivere widget facilissimi da usare come quello qui sopra, senza contare che a quel punto i dati diventano accessibili a chiunque, in tutto il mondo, usi Wolfram Alpha, anche se non lo usa dal sito dell’autorità in questione — e che i widget possono essere facilmente copincollati in altri siti e blog. Più open data di così…

Lavorare con Wolfram Alpha permetterebbe alle autorità pubbliche di avere una modalità di preview interattiva in tempi rapidissimi, e con investimenti molto piccoli in sviluppo software; ed accrescerebbe il valore di Wolfram Alpha stesso, che naturalmente è funzione della massa di dati a cui riesce a accedere. Non è gratis, però: si pagano abbonamenti che coprono un certo numero di interrogazioni mensili. Ho provato a scrivere all’azienda chiedendo se hanno una linea sugli open data, vediamo se mi rispondono e cosa. La soluzione vera sarebbe una versione open source di Wolfram Alpha, ma non ho notizia di cose lontanamente simili.

Open data: what if we used Wolfram Alpha?

In several countries governments and local authorities are starting to release their data for citizen reuse and remix. This is important in itself, but clearly these data will generat more impact the easier and intuitive using them is. I am seeing very different usability strategies being tried out.

At one end of the spectrum, some authorities go for “in-house” visualization. An example is the OECD with their eXplorer: it comes with a sophisticated visualization interface that supports animations, multilayer maps, Google Maps integration. The only problem is that the data themselves are locked inside, as are citizen-created visualization (“stories” in eXplorer parlance). Just about the pnly thing you can do is export them as XML files to share with your friends, but they need to go to the eXplorer website to see it. In general, the system is complicated and lacks flexibility; plus, it’s quite unfriendly for beginners (the instructions files is more than 30 pages long).

At the opposite end we find experience like the Italian State Accounting Service’s. The databases are downloadable, and there are instructions to generate tables summarizing them. Unfortunately, they are very specific, assuming as they do that all citizen use a specific function (pivot tables) of a specific software, proprietary and expensive on top of that (Microsoft Excel. It would probably have been more tasteful to refer the tutorial to Open Office). Except for expert users of Excel, this system is “all or nothing”: either you are looking at enormous, unmanageable disaggregated tables or you invest several hours to follow the tutorial and try a few ways to crunch the numbers so that they make sense. It’s ok for researchers, but it does not create an interest for citizens to play around with data.

Maybe a good middle ground is the World Bank’s strategy. World Databank enables the creation of simple reports (charts and maps included) directly on the site, and it also allows users to download the data in several formats. So a citizen can start by exploring directly on the website in less than a minute she can be looking at a simple chart. Then, if she so chooses, she can download the data and explore them more thoroughly with the software of her choice.

I think open data policies are just as meaningful as the community of citizens that know how to interpret, reuse and explain to others public data is wide. On this ground, I would strongly advocate to public authorities contemplating them to incorporate in their websites rapid preview features, as the World Bank did.

Developing those feature can be expensive (eXplorer certainly does not look cheap). A low cost possibility is probably to write a widget for Wolfram Alph, the computational engine of the man who gave us Mathematica. Its computational capacity is more than adequate to any reasonable open data use (it does some amazing stuff: try typing “compare a mouse and an elephant” as in the compute field): the problem is rather interfacing it with government databases. If that can be done, it becomes easy to write intuitive widgets like the one above – with the added benefit that the data then become accessible to anyone using Wolfram Alpha anywhere in the world, even if they are not even aware of the existence of this database in particular. More open data than that…

Wolfram Alpha could provide public authorities with a fast, cheap preview mode for citizens to develop a taste for open data; this would also increase the value of Wolfram Alpha itself, as the mass of data accessible to the engine is increased. It’s not for free, though: Wolfram sells subscriptions that cover a certain number of monthly queries. I wrote them to find out whether they have solutions for this kind of client, curious to see what they get back to me with. The real solution would be an open source version of Wolfram Alpha, but I am not aware of anything remotely like that.