[ECODP-dev] handover questions

John Glover john.glover at okfn.org
Thu Oct 17 09:57:41 UTC 2013


Hi Bert,


> Q1: How works the CKAN statistics collecting,
>

When a user visits page, an AJAX request is made to /_tracking. Accessing
this url logs (in the tracking_raw database table) that a given user key
accessed a specific url at a specific time. A user key is a hash of the
HTTP_USER_AGENT, REMOTE_ADDR, HTTP_ACCEPT_LANGUAGE and HTTP_ACCEPT_ENCODING
fields.

When the paster tracking update command is run, the number of hits (user
key requests) on each url (bucketed by day) is inserted into the
tracking_summary database table. For each url, this also includes a running
total of the current number of views so far, and the number of recent views
(which is hardcoded to be views in the last 2 weeks).

By default the tracking update command does not go through the entire
tracking_raw database each time, it just updates the counts starting with 2
days before the most recent date that already exists in the
tracking_summary table.

To output the stats, the figures are simply read from the tracking_summary
table and saved to a CSV file.



> how the collected information is used?
>

I'm not sure what you mean here, how they are used seems to be up to
whoever is running the server. Can you elaborate?



> Q2:How works the CKAN rdf module? how to configure it in case of data
> model changes?
>
>
This is also a very broad question so I am not really sure what information
you are looking for here. Can you be more specific?

Some general points:

* if the RDF field is present in the JSON object that is sent to create a
dataset using the API, this will simply be returned when you request the
RDF version of a dataset. If not, CKAN will generate an RDF version from a
fixed template.

* The CKAN RDF template can be found at
ckanext-ecportal/ckanext/ecportal/templates/package/custom_read.rdf [1]. If
the data model changes and you need to change the RDF, this template must
be edited by hand to reflect the new model. Also, the data in the database
will have to be updated for all datasets that supplied their own RDF in the
JSON.

[1]
https://github.com/okfn/ckanext-ecportal/blob/master/ckanext/ecportal/templates/package/custom_read.rdf

Regards,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20131017/033b5214/attachment.html>


More information about the ecodp-dev mailing list