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.
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.
Here is a summary of the workflow fetch-and-push-data.yml
- Run
ruby src/fetch_data.rb- downloads data from the CAPACOA Wordpress API to a JSON file
- Run Ontotext Openrefine
- remove members unless they "agree" to share data. See issue #8
- remove members unless they have "type":
https://schema.org/Organizationorhttps://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
- Run
ruby src/run_sparql.rbto execute the SPARQL to infer presenter type - Commit dump to Github (output/data.ttl)
- Upload dump to Artsdata (culturecreates/artsdata-pipeline-action@v3)
- Clone and cd into the project directory
bundle install
ruby src/fetch_data.rb./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.jsonin Github.
ruby src/run_sparql.rb
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
bundle exec rake testThe CAPACOA Wordpress website uses 2 plugins:
- capacoa-artsdata-usermeta Wordpress plugin that opens specific fields for export to Artsdata at https://capacoa.ca/wp-json/wp/v2/users
- artsdata-shortcode Wordpress plugin that reads data from Artsdata for display on the CAPACAO website