Preview for datasets
Project description
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 nthe key dataset_preview
:
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', 'Bar', 'Column'
// URL could be:
// - A external url
// - No use this value: will be "csv_resource" with pick the first CSV resource in the dataset
// - Name of the resource in the datasets (must be a CSV one)
"url": "csv_resource",
"height": 450, // pixels
"chart_color": "#AA5521"
}
If you don't setup each dataset it will show the first CSV resource in the dataset (using the first two columns)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ckanext-datasetpreview-0.2.36.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a71cd0f87ae4ad957629683cdda4bce79142f5aa76fefe37683bfc1590251a67 |
|
MD5 | 1f6783576c815e55297e1689a5a45a83 |
|
BLAKE2b-256 | 12a7e1381c249935c25968b8ceca3475436ed7fe35ca3b4bb9a46b96a1d0bbfb |
Close
Hashes for ckanext_datasetpreview-0.2.36-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0064635b786a97e15b5f95c5ea07772519b199201a6fa280025f7f4d13fa4ed |
|
MD5 | a68cbb3d675fd2b32d6aaf53e91f4c1b |
|
BLAKE2b-256 | 8f4e6d16d34f79ee04922cb6f76aa7d82cf3a4c06ce91c6bff47e2de359097e2 |