|||

Theory Maker - technical details

Theory Maker is a free and simple web app for making diagrams of theories of change, logframes, etc. Its special feature is that you can also create boxes to group the pieces of your network, for example to mark off different phases, regions or stakeholders.

You can read more about it here. This page is about the technical features.

This kind of directed graph with additional boxes is drawn using the relatively undocumented cluster” feature of graphviz. This is the only toolkit I know of which lets you draw a network with hierarchical boxes around the nodes. The site is running on shiny server, hosting a single R script. Shiny provides the interactivity. Originally, this script took a .csv file as input, with a row for each node and a column for node properties. Now I have made it a bit easier - you can provide a text input instead of a spreadsheet, which is converted into an equivalent matrix, which is then converted into a .dot file. Finally, the .dot file is sent to by Graphviz’s dot which produces the diagram and Shiny displays it reactively, i.e. live.

It took me the best part of a year to actually develop the main R script in spare half-hours, and it is not part of my plan to play at being a developer. So I paid for some help from Ali on upwork.com to turn it into a Shiny application. Thanks Ali!

It is run by just a single script, open source of course.

There is also a markdown test script.

Specification of global attributes

There are two kinds of global attributes - defaults for things like node color, edge width, etc etc, and graph-level attributes: ratio, label (we should call this title, not label), labeljust, rankdir, ranksep, addID.

The user can specify global attributes either in the function call and/or in the text, i.e. if the user is running the script locally, they can do this:

makeToC(backgroundcolor="pink",tex="
a
")

or, in the online app, just this:

a
backgroundcolor=pink

This way of specifying global attributes in the input text already works in principle but it will need checking when all the attributes are tidied up as above.

Up next nvpy on Android Wherever possible, I use plain text files for everything - note-taking, coding, writing, etc. My operating system of choice is ubuntu, so I use the Theory Maker - technical details Theory Maker is a free and simple web app for making diagrams of theories of change, logframes, etc. Its special feature is that you can also create
Latest posts Causal Mapping - an earlier guide The walk to school in Sarajevo Glitches Draft blog post for AEA365 Theory Maker! Inventory & analysis of small conservation grants, C&W Africa - Powell & Mesbach! Lots of charts! Answering the “why” question: piecing together multiple pieces of causal information rbind.fill for 1-dimensional tables in r yED graph editor Examples of trivial graph format Using attr labels for ggplot An evaluation puzzle: “Talent show” An evaluation puzzle: “Mobile first” An evaluation puzzle: “Many hands” An evaluation puzzle: Loaves and fishes An evaluation puzzle: “Freak weather” An evaluation puzzle: “Billionaire” Publications Using Dropbox for syncing Shiny app data on Amazon EC2 Progress on the Causal Map app Articles and presentations related to Causal Maps and Theorymaker Better ways to present country-level data on a world map: equal-area cartograms A starter kit for reproducible research with R A reproducible workflow for evaluation reports Welcome to the Wiggle Room Realtime comments on a Theory of Change Responses to open questions shown as tooltips in a chart A panel on visualising Theories of Change for EES 2018? Peer mentoring for evaluators How do you explain reproducible research to clients? Links for my AEA eval2017 presentation, Washington DC