Skip to content

Instantly share code, notes, and snippets.

@ericmoritz
Last active August 29, 2015 13:57
Show Gist options
  • Save ericmoritz/9458682 to your computer and use it in GitHub Desktop.
Save ericmoritz/9458682 to your computer and use it in GitHub Desktop.
Weight Matrix using RDF
@prefix wm: <http://vocab-ld.org/vocab/weighted-matrix#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
_:intuitive
rdfs:label "Is the interface intuitive?" ;
wm:importance wm:veryHighImportance ;
a wm:Requirement .
_:isPretty
rdfs:label "Are the diagrams pretty by default?" ;
wm:importance wm:veryHighImportance ;
a wm:Requirement .
_:onlineColab
rdfs:label "Is online colab possible?" ;
rdfs:comment "3 = chat & interactive" ;
wm:importance wm:mediumImportance ;
a wm:Requirement .
_:uml
rdfs:label "Is UML natively supported?" ;
rdfs:comment "3 = UML can be exported natively" ;
wm:importance wm:veryLowImportance ;
a wm:Requirement .
_:graph
rdfs:label "Are graphs natively supported?" ;
wm:importance wm:veryHighImportance ;
rdfs:comment "1 = nodes can connect" ;
a wm:Requirement .
_:flowchart
rdfs:label "Are flowcharts natively supported?" ;
wm:importance wm:mediumImportance ;
a wm:Requirement .
_:sequence-diagram
rdfs:label "Are sequence-diagram natively supported?" ;
wm:importance wm:mediumImportance ;
a wm:Requirement .
_:stateDiagram
rdfs:label "Are state diagrams natively supported?" ;
wm:importance wm:highImportance ;
a wm:Requirement .
_:uiMock
rdfs:label "Are UI mocks natively supported?" ;
wm:importance wm:highImportance ;
a wm:Requirement .
_:siteMap
rdfs:label "Are site maps natively supported?" ;
wm:importance wm:highImportance ;
a wm:Requirement .
<http://drive.google.com/>
wm:choiceScore [
wm:req _:intuitive ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:onlineColab ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:graph ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:flowchart ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:sequence-diagram ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:isPretty ;
wm:score wm:partlySatisfies
] ;
a wm:Choice .
<http://www.lucidchart.com/>
wm:choiceScore [
wm:req _:intuitive ;
rdfs:comment "No ellipse; Cant figure out how to connect two shapes with a line... wtf." ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:isPretty ;
wm:score wm:substantiallySatisfies # more than google docs
] ;
wm:choiceScore [
wm:req _:onlineColab ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:uml ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:graph ;
rdfs:comment "I cant find a dang ellipse shape... weird..; Cant figure out how to connect two shapes with a line wtf." ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:flowchart ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:sequence-diagram ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:siteMap ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:uiMock ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:stateDiagram ;
wm:score wm:fullySatisfies
] ;
a wm:Choice .
<http://www.omnigroup.com/omnigraffle/>
rdfs:label "Omnigraffle Pro" ;
rdfs:comment "Couldnt use it on my computer for some reason. It kept locking up." ;
wm:choiceScore [
wm:req _:android ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:intuitive ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:isPretty ;
rdfs:comment "Line labels are nice" ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:onlineColab ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:uml ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:graph ;
wm:score wm:partlySatisfies ;
rdfs:comment "Graph doesnt arrange automatically but the arrows flow nicely"
] ;
wm:choiceScore [
wm:req _:flowchart ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:sequence-diagram ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:siteMap ;
wm:score wm:doesNotSatisfy
] ;
wm:choiceScore [
wm:req _:uiMock ;
rdfs:comment "Konigi Wireframes?" ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:stateDiagram ;
wm:score wm:fullySatisfies
] ;
a wm:Choice .
<http://www.gliffy.com/>
rdfs:comment "Gliffy seems to revial Omnigraffle in functionality but is an HTML5 app.";
wm:choiceScore [
wm:req _:isPretty ;
rdfs:comment "These are very really pretty diagrams. Line labels look nice" ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:onlineColab ;
rdfs:comment "There doesnt seem to be live colab, but you can share and edit the diagrams concurrently. Unfortunately, users are not notified of a new version. Im Sad. I wish it was better" ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:uml ;
wm:score wm:substantiallySatisfies
] ;
wm:choiceScore [
wm:req _:graph ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:flowchart ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:sequence-diagram ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:siteMap ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:uiMock ;
wm:score wm:fullySatisfies
] ;
wm:choiceScore [
wm:req _:stateDiagram ;
wm:score wm:fullySatisfies
] ;
a wm:Choice .
<http://creately.com/>
rdfs:comment "So ugly that I dont even want to include it" ;
wm:choiceScore [
wm:req _:intuitive ;
rdfs:comment "A big ol Meh." ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:isPretty ;
rdfs:comment "Meh, it isnt ugly, but it isnt that pretty either." ;
wm:score wm:partlySatisfies
] ;
wm:choiceScore [
wm:req _:onlineColab ;
] ;
wm:choiceScore [
wm:req _:uml ;
] ;
wm:choiceScore [
wm:req _:graph ;
] ;
wm:choiceScore [
wm:req _:flowchart ;
] ;
wm:choiceScore [
wm:req _:sequence-diagram ;
] ;
a wm:Choice .
results.txt:
arq --query weighted-matrix.rq --data weighted-matrix.ttl --data diagram-software.ttl > results.txt
clean:
rm results.txt
----------------------------------------------------
| choice | weight |
====================================================
| <http://www.gliffy.com/> | 79 |
| <http://www.omnigroup.com/omnigraffle/> | 73 |
| <http://www.lucidchart.com/> | 65 |
| <http://drive.google.com/> | 35 |
| <http://creately.com/> | 10 |
----------------------------------------------------
PREFIX wm: <http://vocab-ld.org/vocab/weighted-matrix#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT
?choice (SUM(xsd:integer(?scoreValue)*xsd:integer(?reqValue)) AS ?weight)
{
?choice a wm:Choice .
?choice wm:choiceScore ?cs .
?cs wm:req ?req .
?cs wm:score ?score .
?score wm:value ?scoreValue .
?req wm:importance ?importance .
?importance wm:value ?reqValue .
}
GROUP BY ?choice
ORDER BY DESC
@prefix wm: <http://vocab-ld.org/vocab/weighted-matrix#> .
@prefix schema: <http://schema.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
###===================================================================
### Document metadata
###===================================================================
<.>
schema:citation <http://it.toolbox.com/blogs/enterprise-solutions/constructing-a-weighted-matrix-13125> .
<http://it.toolbox.com/blogs/enterprise-solutions/constructing-a-weighted-matrix-13125>
schema:title "Constructing a Weighted Matrix".
###===================================================================
### Classes
###===================================================================
wm:Decision
rdfs:commant "A decision that needs to be made" ;
a rdf:Class .
wm:Requirement
rdfs:comment "A requirement of a decision" ;
a rdf:Class .
wm:Choice
rdfs:comment "A choice to make for the decision" ;
a rdf:Class .
wm:Importance
rdfs:comment "The importance of a requirement" ;
a rdf:Class .
###===================================================================
### Properties
###===================================================================
wm:importance
rdfs:domain wm:Requirement ;
rdfs:range wm:Importance ;
rdfs:comment "How important is this requirement?" ;
a rdf:Property .
wm:score
rdfs:comment "How fully does this choice satisfy a choice" ;
a rdf:Property .
wm:value
rdfs:comment "The numeric value of the score or importance" ;
a rdf:Property .
wm:weight
rdfs:comment "The calculated weight of the choice" ;
a rdf:Property .
###===================================================================
### Objects
###===================================================================
wm:veryHighImportance
wm:value 5 ;
a wm:Importance .
wm:highImportance
wm:value 4 ;
a wm:Importance .
wm:mediumImportance
wm:value 3 ;
a wm:Importance .
wm:LowImportance
wm:value 2 ;
a wm:Importance .
wm:veryLowImportance
wm:value 1 ;
a wm:Importance .
wm:notImportant
wm:value 0 ;
a wm:Importance .
wm:fullySatisfies
wm:value 3 ;
a wm:Score .
wm:substantiallySatisfies
a wm:Score ;
wm:value 2 ;
rdfs:label "Substantially Satisfies"@en .
wm:partlySatisfies
a wm:Score ;
wm:value 1 ;
rdfs:label "Partly Satisfies"@en .
wm:doesNotSatisfy
a wm:Score ;
wm:value 0 ;
rdfs:comment "This is the default score" ;
rdfs:label "Does Not Satisfy"@en .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment