Skip to content

Instantly share code, notes, and snippets.

@r-k-b
Last active September 19, 2017 07:00
Show Gist options
  • Save r-k-b/b5ea04fe57653b9fb0d81255816eb8a1 to your computer and use it in GitHub Desktop.
Save r-k-b/b5ea04fe57653b9fb0d81255816eb8a1 to your computer and use it in GitHub Desktop.
data relationship visualisations
digraph G {
// for getting from Activities to Companies
// https://gist.github.com/r-k-b/b5ea04fe57653b9fb0d81255816eb8a1
// all relations use fields `against_id` and `against_type`, except where noted.
// Names are as internally used by the Accelo API.
// Names in parenthesis are those used by Big Blue Digital.
accountInvoice
[ label = "Account Invoices\n(Invoices)"
]
affiliation
[ label = "Affiliations\n(Contacts)" // cf. `contact`
]
contact
[ label = "Contacts\n(Contacts)" // cf. `affiliation`
]
job
[ label = "Jobs\n(Projects)"
]
activity
[ label = "Activities"
]
asset
[ label = "Assets"
]
contractPeriod
[ label = "Contract Periods\n(Membership Periods)"
]
contract
[ label = "Contracts\n(Memberships)"
]
issue
[ label = "Issues"
]
milestone
[ label = "Milestones"
]
prospect
[ label = "Prospects\n(Opportunities)"
]
request
[ label = "Requests"
]
staff
[ label = "Staff"
, color = grey
, fontcolor = grey
, tooltip = "This is mostly uninteresting?"
]
company
[ label = "Companies\n(Clients)"
]
task
[ label = "Tasks"
]
accountInvoice -> affiliation
accountInvoice -> job
[ color = red
, style = dashed
, label = "No Go"
, fontcolor = red
, tooltip = "API provides no way to match these"
]
activity -> affiliation
activity -> accountInvoice
activity -> asset
activity -> contractPeriod
activity -> contract
activity -> issue
activity -> job
activity -> milestone
activity -> prospect
activity -> request
activity -> staff
[ color = grey
]
activity -> task
[ style = dashed
, color = grey
, label = "`task_id`"
, tooltip = "Uses column `task_id`"
]
affiliation -> company
asset -> company
contact -> affiliation
contract -> company
contractPeriod -> contract
issue -> company
issue -> contact
job -> company
job -> contact
milestone -> job
prospect -> affiliation
request -> affiliation
task -> {company; issue; job; milestone; prospect}
[ style = dashed
, color = grey
, label = "`task_id`"
, tooltip = "Uses column `task_id`"
]
// task -> company
// task -> issue
// task -> job
// task -> milestone
// task -> prospect
}
digraph G {
// For getting from Object Budgets to Projects
// https://gist.github.com/r-k-b/b5ea04fe57653b9fb0d81255816eb8a1
"Object Budgets" -> "Milestones"
"Object Budgets" -> "Projects"
"Object Budgets" -> "Tasks"
"Object Budgets" -> "Issues" [color=grey]
"Milestones" -> "Projects"
"Issues" -> "Companies" [color=grey]
"Issues" -> "Contacts" [color=grey]
"Tasks" -> "Milestones"
"Tasks" -> "Projects"
"Tasks" -> "Companies" [color=grey]
"Tasks" -> "Contract Periods" [color=grey]
"Tasks" -> "Prospects" [color=grey]
"Tasks" -> "Issues" [color=grey]
"Contract Periods" -> "Contracts" [color=grey]
"Issues" [color=grey, fontcolor=grey]
"Companies" [color=grey, fontcolor=grey]
"Contacts" [color=grey, fontcolor=grey]
"Contracts" [color=grey, fontcolor=grey]
"Prospects" [color=grey, fontcolor=grey]
"Contract Periods" [color=grey, fontcolor=grey]
# unknowns
"..." [color=grey, fontcolor=grey]
"Prospects" -> "..." [color=grey, fontcolor=grey]
"Contracts" -> "..." [color=grey, fontcolor=grey]
"Companies" -> "..." [color=grey, fontcolor=grey]
"Contacts" -> "..." [color=grey, fontcolor=grey]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment