A Data API for Data Packages in Seconds Using CKAN and its DataStore

SEPTEMBER 11, 2014

dpm the command-line ā€˜data package managerā€™ now supports pushing (Tabular) Data Packages straight into a CKAN instance (including pushing all the data into the CKAN DataStore):

dpm ckan {ckan-instance-url}

This allows you, in seconds, to get a fully-featured web data API ā€“ including JSON and SQL-based query APIs:

dpm ckan demo

View fullsize

Once you have a nice web data API like this we can very easily create data-driven applications and visualizations. As a simple demonstration, thereā€™s the CKAN Data Explorer (example with IMF data - see below).

Where Can I Find a CKAN instance to Upload to?

If youā€™re looking for a CKAN site to upload your Data Packages to we recommend the DataHub which is community-run and free. To upload to the DataHub youā€™ll want to.

  1. Configure the DataHub CKAN instance in your .dpmrc

    <pre><code>[ckan.datahub]
    

    url = http://datahub.io/ apikey = your-api-key

  2. Upload your Data Package

    <pre><code>dpm ckan datahub --owner_org=your-organization
    

    <p>You have to set the owner organization as all datasts on the DataHub need an
    

    owner organization.

One I Did Earlier

Hereā€™s a live example of one ā€œI did earlierā€:

Context: a big motivation (personally) for doing this is that Iā€™d like to see a nice web data API available for the ā€œCoreā€ Data Packages weā€™re creating as part of the Frictionless Data effort. If youā€™re interested in helping, get in touch.