Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How we combined CKAN with WordPress for opendat...

How we combined CKAN with WordPress for opendata.swiss

Stefan Oderbolz

October 04, 2016
Tweet

More Decks by Stefan Oderbolz

Other Decks in Technology

Transcript

  1. Requirements • Use CKAN for the data catalogue ◦ DCAT-AP

    Switzerland metadata standard ◦ Multilingual content • Arbitrary pages (FAQ, About, Blog) ◦ Multilingual content • Manageable forms (Contact, surveys etc.) • Harvesting of data in DCAT-AP Switzerland format • ...
  2. Solution: let’s combine CKAN with WordPress • Loosly coupled: they

    call each others APIs • We use Apache as a proxy ◦ WordPress runs on port 80 ◦ CKAN runs on port 8080 ◦ Specific routes are proxied on WordPress • User management only on WordPress
  3. Goal: one administration interface • Our WordPress plugin (soon Open

    Source!) let’s us manage CKAN entities: ◦ Datasets ◦ Groups ◦ Organizations ◦ Harvester • We save all data in WordPress and make API calls to “sync” them to CKAN • Form has some usability issues ◦ Too long, no possibility to collapse ◦ Save button is on the top
  4. Intermezzo: What is DCAT-AP? • DCAT = Data Catalog vocabulary

    ◦ Vocabulary to describe catalogs, dataset and distributions • AP = Application profile ◦ Ruleset of mandatory, optional or conditional fields • E.g. “DCAT-AP for data portals in Europe” (DCAT-AP EU) is a standard for public sector data in Europe • DCAT-AP Switzerland is compatible to DCAT-AP EU, but has some additional fields or fields that are currently not used More Information: http://handbook.opendata.swiss/en/library/ch-dcat-ap
  5. DCAT-AP XML Import/Export • Easy transfer from test system to

    production • Reference implementation for data owners, transition to DCAT-AP XML harvester
  6. Harvester Dashboard • Manage harvesters from WordPress • Start, stop

    & clear harvester jobs • Indicator of status • Check the error log of previous jobs
  7. APIs are key • To exchange data between the two

    systems we use APIs on both sides • CKAN ◦ Standard API calls for CRUD operations on all entities ◦ Custom API calls where needed (e.g. dataset count total + per group, to have only one call) • WordPress ◦ Expose WordPress entities as custom API (e.g. “Application”) ◦ To increase performance we save some API responses for 10 minutes in Redis (e.g. Dataset count on frontpage)