Logic Models

Proof of Concept for Creating a Logic Model in graphviz

Author

Andy Grogan-Kaylor

Published

January 18, 2024

1 Introduction

Logic models are used extensively in program development and program evaluation.

This is an evolving proof of concept of creating a logic model in graphviz. graphviz is a programming language designed to represent graphs. graphviz files end in .gv.

graphviz is implemented in RStudio via the DiagrammeR package. This logic model was made with RStudio.

This proof of concept makes use of subgraphs to organize the components of a logic model.

Like all programming languages, graphviz may facilitate automation, replication, and documentation of a project. In this way, using graphviz may make creating a logic model easier.

Like all programming languages, graphviz may be finicky and hard to tweak. In this way, using graphviz may make creating a logic model much more difficult.

It may be much easier to use PowerPoint or Google Slides to create a logic model!!!

2 Call the DiagrammeR Library

Show the code
library(DiagrammeR)

3 Render the Graph of the Logic Model

The graphviz code for the logic model can be found here.

Show the code
DiagrammeR::grViz("logic-model.gv")

4 You Can Use RStudio to Work Directly in graphviz.

As long as you have installed DiagrammeR (install.packages("DiagrammeR")) you can work directly with a .gv file without working in R. You are welcome to download this sample logic-model.gv file to experiment with this.