Skip to content

Instantly share code, notes, and snippets.

@elipousson
Created June 21, 2024 15:06
Show Gist options
  • Save elipousson/ed1b746333f6a9de4cd38dbe4d91d210 to your computer and use it in GitHub Desktop.
Save elipousson/ed1b746333f6a9de4cd38dbe4d91d210 to your computer and use it in GitHub Desktop.
library(d2r)
one_many <- c(
"Agency -> Service",
"Service -> Cost Center",
"Fund -> Cost Center",
"Award -> Grant",
"Revenue Category -> Budget Plan"
)
one_one_required <- c(
"Cost Center -> Project",
"Project -> Budget Plan"
)
standard <- c(
"Sales Item -> Revenue Category"
)
c(
d2_container(d2_arrowhead("cf-many"), id = one_many),
d2_container(d2_arrowhead("cf-one-required"), id = one_one_required),
standard
) |>
d2_render("workday-diagram.png", pad = 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment