Skip to content

Commit

Permalink
[#531] Update data viewer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnglover committed Apr 29, 2013
1 parent 0dfbc87 commit 8131650
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
6 changes: 6 additions & 0 deletions doc/configuration.rst
Expand Up @@ -192,6 +192,9 @@ Default value: ``20``

This controls the pagination of the dataset search results page. This is the maximum number of datasets viewed per page of results.


.. _ckan_preview_direct:

ckan.preview.direct
^^^^^^^^^^^^^^^^^^^

Expand All @@ -203,6 +206,9 @@ Default value: ``png jpg gif``
Defines the resource formats which should be embedded directly in an `img` tag
when previewing them.


.. _ckan_preview_loadable:

ckan.preview.loadable
^^^^^^^^^^^^^^^^^^^^^

Expand Down
23 changes: 16 additions & 7 deletions doc/data-viewer.rst
Expand Up @@ -7,11 +7,11 @@ This works by either:

1. Embedding the data into the page, either directly or by loading the data
in an iframe.
2. Using a custom widget (such as `Recline <http://github.com/okfn/recline>`_)
2. Using a custom widget (such as `Recline <http://okfnlabs.org/recline>`_)
to view the data.

The decision as to which action to take is determined by the type of resource
being viewed.
Generally, the decision as to which action to take is determined by the type of
resource being viewed.
In general, images will be directly embedded, unstructured or plain text
files will be loaded in an iframe, and more complex data types will need to
use a custom widget.
Expand Down Expand Up @@ -48,6 +48,9 @@ the resource read page:
* ``jpg``
* ``gif``

The types of resources that are embedded directly can be specified in the
CKAN config file. See :ref:`_ckan_preview_direct` for more information.

The following types of resources will be loaded in an iframe:

* ``plain``
Expand All @@ -63,14 +66,19 @@ The following types of resources will be loaded in an iframe:
* ``atom``
* ``rss``

The types of resources that are loaded in an iframe can be specified in the
CKAN config file. See :ref:`_ckan_preview_loadable` for more information.


Viewing structured data: the Data Explorer
------------------------------------------

.. versionadded:: 2.0
the ``recline_preview`` extension is new in CKAN 2.0.

.. versionchanged:: 2.0
The ``recline_preview`` extension did not exist in previous versions of
CKAN. The ability to embed Recline previews is not supported in the
current version of CKAN.
The ability to embed data explorer previews in external sites is
not supported in CKAN 2.0.

**Configuration required:** The ``recline_preview`` extension must be added to
``ckan.plugins`` in your CKAN configuration file.
Expand All @@ -79,7 +87,7 @@ This extension is part of CKAN and so does not need to be installed separately.
**Resource formats:** DataStore, ``csv``, ``xls``.

Structured data can be previewed using the
`Recline <http://github.com/okfn/recline>`_ Data Explorer.
`Recline <http://okfnlabs.org/recline>`_ Data Explorer.
The Data Explorer provides a rich, queryable view of the data, and allows the
data to be filtered, graphed and mapped.

Expand Down Expand Up @@ -137,3 +145,4 @@ This extension is part of CKAN and so does not need to be installed separately.
The ``pdf_preview`` extension provides previews of any ``pdf`` documents
that have been added to a CKAN instance (and so are stored in
the `Filestore <filestore.html>`_) as well as any external ``pdf`` documents.
This extension uses Mozilla's `pdf.js <http://mozilla.github.io/pdf.js>`_ library.

0 comments on commit 8131650

Please sign in to comment.