[ckan-dev] Tag Frequency List for Tag Cloud

Rodrigo Parra rodpar07 at gmail.com
Wed May 7 14:27:45 UTC 2014


Hello all,

I'm trying to implement a tag cloud similar to the one that can be found
at: http://opendatahub.it/
I've looked around and could not find the server side source code for this
feature.

Anyway, I need a JSON tag frequency list from the server, like this one:

cloud =
[{"text":"popolazione","size":"621"},{"text":"ambiente","size":"553"},{"text":"territorio","size":"362"},{"text":"cartografia","size":"328"},{"text":"energia","size":"317"},{"text":"2012-2013","size":"306"},{"text":"statistica","size":"301"},{"text":"2006-2011","size":"248"},{"text":"turismo","size":"233"},{"text":"commercio","size":"229"},{"text":"formazione","size":"60"}];

I was thinking about exposing this functionality by implementing the
*IActions* interface.
I can use the *package_search *action to get all datasets with their tags,
and compute the frequency list myself.

However, I think this approach might not scale well, as it could become
quite resource consuming with a big number of datasets. Therefore, my
question is:

Does anyone has any suggestions regarding a better approach to get the
frequency list? Is there any API action I'm missing?

Thanks in advance,
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/9ac65499/attachment-0002.html>


More information about the ckan-dev mailing list