...
...
...
...
...
...
...
...
...
...
...
...
...
...
Rationale
We are planning a "Publish to HDX" functionality from KoBo and HOT-OSM, and will be discussing with other partners as well (e.g. DHIS2). OSM will likely use the CKAN API, but for others, it would make sense to design a reusable framework where we can easily support publish buttons from any number of additional partners with little or no incremental effort on our part.
Proposal
The minimum viable product for a "Publish to HDX" link/button would be the ability to link to HDX's contribute form at https://data.humdata.org/contribute/new with parameters to prefill the form. For example, a button or HTML a element linking to
...
Client-side usage
On a Bootstrap3 site, the HTML markup for a publish button might look like this:
or alternately, as a POST form:
<form method="post" action="https://data.humdata.org/contribute/new">
<input type="hidden" name="url" value="http://example.org/api/12345.csv"/>
<input type="hidden" name="title" value="Sample dataset"/>
<input type="hidden" name="org" value="foo_org"/>
<input type="hidden" name="location" value="SYR"/>
<button type="submit" class="btn btn-success">Publish to HDX</button>
Suggested HTTP parameters
Parameter | Required? | Description |
---|---|---|
url | Yes | URL of first resource |
name | No | Download filename for first resource |
mimetype | No | Type of first resource |
description | No | Long description of first resource |
private | No | Flag for whether the dataset should be private (default: true) |
title | No | Title for dataset |
slug | No | Proposed slug for dataset (if the slug already exists, and the user has authorisation, open the form to update an existing dataset instead). |
notes | No | Long description of dataset |
subnational | No | Flag for subnational data (default: false) |
dataset_source | No | Description of original source |
org | No | HDX org id |
maintainer | No | HDX user id for maintainer |
date | No | Single date for dataset (excludes start_date and end_date) |
start_date | No | Start date for dataset (excludes date) |
end_date | No | End date for dataset (excludes date) |
location | No | HDX location id (e.g. "SYR") |
license | No | HDX license id |
methodology | No | HDX methodology id |
update_frequency | No | HDX update-frequency id |
caveats | No | Text with caveats |
tags | No | HDX tags, comma-separated |