Save 37% off PRO during our Black Friday Sale! »

How we combined CKAN with WordPress for opendata.swiss

How we combined CKAN with WordPress for opendata.swiss

28183e09aff101bc1f80c7e7a1917d83?s=128

Stefan Oderbolz

October 04, 2016
Tweet

Transcript

  1. How we combined CKAN with WordPress Stefan Oderbolz CKANCon 2016

    4th October 2016
  2. None
  3. 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 • ...
  4. 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
  5. None
  6. None
  7. 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
  8. 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
  9. None
  10. None
  11. DCAT-AP XML Import/Export • Easy transfer from test system to

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

    & clear harvester jobs • Indicator of status • Check the error log of previous jobs
  13. None
  14. None
  15. 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)
  16. @odi Questions?