Skip to content

culturecreates/artsdata-planet-capacoa

Repository files navigation

artsdata-planet-capacoa

This repo runs a workflow on Github that fetches CAPACOA member data (from CAPACOA's Wordpress database), transforms it to RDF and sends it to the Artsdata Databus on a schedule.

It also contains the CAPACOA controlled vocabulary derived from the questionnaire when members create their account on the CAPACOA website.

Controlled Vocabulary

The controlled vocabulary, derived from the questionnaire when members create their account, is modeled using SKOS and the triples are stored in Github. To update the triples please use this spreadsheet to edit the CAPACOA vocabulary and copy/paste the generated SKOS from the "Export" tab into the Github controlled-vocabulary directory. The commit will trigger a workflow to publish to Artsdata.

Workflow to fetch CAPACOA's Wordpress database

Here is a summary of the workflow fetch-and-push-data.yml

  1. Run ruby src/fetch_data.rb
  2. Run Ontotext Openrefine
    • remove members unless they "agree" to share data. See issue #8
    • remove members unless they have "type": https://schema.org/Organization or https://schema.org/Person. See issue #9
    • remove members with a MemberTerminationDate (active members have no value meaning MemberTerminationDate='')
    • map JSON to RDF using ontorefine-config.json
  3. Run ruby src/run_sparql.rb to execute the SPARQL to infer presenter type
  4. Commit dump to Github (output/data.ttl)
  5. Upload dump to Artsdata (culturecreates/artsdata-pipeline-action@v3)

How to test locally

Setup

  1. Clone and cd into the project directory
  2. bundle install

Pipeline 1 — CAPACOA member data

  1. ruby src/fetch_data.rb
  2. ./run_ontorefine.sh
    • launches your browser to OpenRefine (Docker must be running) with the data loaded
    • use OpenRefine to:
      • view the existing project with the data already loaded
      • edit the RDF Mapping
      • filter by facet to delete members
    • export the changes in OpenRefine projet settings and replace ontorefine-config.json in Github.
  3. ruby src/run_sparql.rb

Pipeline 2 — Fetch Wikidata for CAPACOA Members

  1. bundle exec ruby src/reload_wikidata.rb
    • fetches CAPACOA members with Wikidata IDs from Artsdata
    • queries Wikidata for social media handles and venue details in batches
    • replaces venue image URLs with 300px Wikimedia thumbnails
    • serializes the result to output/capacoa-wikidata.jsonld

Unit tests

bundle exec rake test

Wordpress plugins

The CAPACOA Wordpress website uses 2 plugins:

capacoa-artsdata-usermeta

artsdata-shortcode

  • artsdata-shortcode Wordpress plugin that reads data from Artsdata for display on the CAPACAO website

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors