An ontology for modeling sports activities, performance metrics, and athlete data. This ontology integrates with PROV-O for provenance tracking and FOAF for person modeling.
The complete ontology documentation is automatically generated and hosted at: https://solidlabresearch.github.io/activity-ontology/
- Comprehensive Activity Modeling: Supports local activity type concepts linked to IPTC Media Topic and OpenActive Activity List identifiers
- Performance Metrics: Detailed statistics for speed, power, heart rate, cadence, and more
- Athlete Profiles: Athlete settings and dated settings history modeling
- Provenance Integration: Built-in support for data lineage and device tracking using PROV-O
- Standards Compliant: Follows W3C best practices and integrates with established ontologies
- Dereferencable URIs: Content negotiation support for both human and machine-readable formats
Activity- Base class for all sports activities, classified withactivo:activityTypeActivityType- Local SKOS concept values for activity type classificationAthlete- Athlete profiles with performance dataStats- Statistical measurements and metricsDevice- Sports tracking devices and data sources
Activities are typed as activo:Activity and classified with activo:activityType. Prefer local activo:ActivityType values for project data; direct IPTC Media Topic and OpenActive Activity List SKOS concepts are also valid values.
Local value example:
@prefix activo: <https://solidlabresearch.github.io/activity-ontology#>.
:activity a activo:Activity;
activo:activityType activo:Ride.External identifier example:
@prefix activo: <https://solidlabresearch.github.io/activity-ontology#>.
@prefix medtop: <http://cv.iptc.org/newscodes/mediatopic/>.
@prefix oaactivity: <https://openactive.io/activity-list#>.
:activity a activo:Activity;
activo:activityType medtop:20000892,
oaactivity:4a19873e-118e-43f4-b86e-05acba8fb1de.Local activity type values are defined in the ontology. Where an exact or clear equivalent exists, they are linked with skos:exactMatch to IPTC and/or OpenActive identifiers.
- Speed, Pace, Power, Heart Rate
- Cadence, Grade, Elevation
- Cycling and Running Dynamics
This repository uses GitHub Actions to automatically generate and deploy documentation using pyLODE. The documentation is updated automatically when changes are pushed to the main branch.
To work with the ontology locally:
-
First-time setup (recommended):
make setup
Or manually:
python -m venv .venv source .venv/bin/activate # On Linux/macOS # .venv\Scripts\activate # On Windows pip install -r requirements.txt
-
Validate ontology syntax:
make test -
Generate documentation:
make docs
-
View the documentation: Open
docs/index.htmlin your browser
Note: The .venv directory is excluded from version control and should be created locally by each developer.
The ontology includes automated validation to ensure Turtle syntax correctness:
- Local testing: Run
python test_ontology.pyormake test - CI/CD: Automated validation runs on every push and pull request
- Statistics: The test provides helpful statistics about classes, properties, and triples
The script automatically:
- Generates HTML documentation with enhanced styling (
vocpubprofile) - Creates content negotiation rules (
.htaccess) - Copies the ontology file for download
- Sets up w3id.org redirect documentation
This ontology supports content negotiation for dereferencable URIs:
- HTML: Human-readable documentation
- RDF formats: Machine-readable ontology (Turtle, RDF/XML, JSON-LD)
- Individual terms: Direct access to classes and properties
For permanent identifiers, consider using w3id.org namespace redirection.
To enable automatic documentation deployment:
- Go to your repository Settings
- Navigate to "Pages" in the left sidebar
- Under "Source", select "GitHub Actions"
- The workflow will automatically run on the next push to main
- Fork the repository
- Create a feature branch
- Make your changes to
ontology.ttl - Test the ontology syntax:
make testorpython test_ontology.py - Submit a pull request
All pull requests are automatically validated using GitHub Actions.
This project is licensed under the MIT License - see the LICENSE file for details.