
CKAN dataset preview
Still in a develpment status
Adds automatically charts for all datasets in the dataset list.
Uses messytables to discover field types.
How to set up?
General extension config values
Available config options
# Define if the extension should draw chart for
# - 'ALL' All datasets with a CSV resource
# - 'EXTRA' Just datasets with the 'dataset_preview' extra dictionary defined
# - 'NO' No datasets with show any preview
ckanext.datasetpreview.draw = 'ALL' # default draw all
ckanext.datasetpreview.chart_height = 300 # pixels
Each dataset could add and extra value with the key dataset_preview:
“`js
extras[“dataset_preview”] = {
// field to use in the chart. Could be:
// - A list of field names (valids in the CSV resource)
// Default will be [0, 1] ( the first two columns in the CSV). You could use numbers instead of field names
“fields”: [“Field1”, “Field2”],
“chart_type”: “Bar”, // Allows ‘Pie’, ‘Ba