Show and Tell: Using Dash for Research Articles

Hi, I wrote a research/educational article in Dash that uses agent-based modeling (ABM) to simulate residential segregation.

Why We Don’t Live Together

Programmers and computer scientists should love ABM because it’s basically about trying to build a computer simulation of the world! One of the very first applications of ABM was from the 1970s when economist Thomas Schelling built a model to “explain” why we might see racial segregation patterns across housing (he later won the Nobel Memorial Price in Economics).

To a very large degree, my presentation is inspired by distill.pub. The idea is that plain text research articles can be made much better when we use webpages as the medium and are able to add interactivity, animations, and the like.

I used Dash to add interactivity to my article in several ways:

  • Panels that present the same content at varying levels of complexity
  • Interactive visualizations that give examples of how calculations are done
  • Interactive charts
  • Animated visuals

In comparison to other websites about “Schelling segregation”, I also think that Dash allowed me to construct a modern looking website. Some of the other websites on the topic are perfectly functional, but they also look very dated.

An obvious feature upgrade to my app would be to add a “simulation calculator” where users can enter their own parameters and run a simulation. That was my original intent but frankly the project has already consumed much more time than I wanted and, in practice, no matter how you change the parameters the ultimate results are pretty much the same.

For anyone who’s interested, all my code is available in Github for both the dash app itself as well as for the underlying ABM simulation code.

3 Likes

SO good! Would love love love to see more researchers publishing their work in formats like this. This was one of our original goals in 2012 when we started writing plotly.js! So great to see the inspiration from distill.pub - their work is so inspiring. Hardly any reason that Dash couldn’t be used for this, as you’ve shown :slightly_smiling_face:

Just beautiful work. Here are some screenshots for those passing through.

Great design - Love the thicker lines, big chart titles, and larger font. Very readable.

Thanks for sharing this, I hope that you’ll keep publishing!