Run Stan models directly in your browser.
Stan Playground is a browser-based editor and runtime environment for Stan models. Users can edit, compile, and run models, as well as analyze the results using built-in plots and statistics or custom analysis code in Python or R, all with no local installation required. This is well-suited for teaching and learning purposes and for users who want to experiment with Stan models without the hassle of setting up a local environment. You can also share your results with others using the GitHub Gist feature.
While the Stan models execute in the browser (on your local machine), the compilation process requires a dedicated server. We provide a default public server for your convenience, but you can also set up your own compilation server either locally or remotely.
Announcement post: Stan Playground: Stan without installing Stan
The features of Stan Playground are documented on Github Pages. See there for information on customizing the website, preparing easy-to-share links, embedding it in your own page, and more.
The compilation server is a FastAPI project with a dockerized environment
located in the backend/ folder.
The README there describes the server architecture and
how one can build the docker image from scratch.
The website frontend is a Vitejs/React project located in the gui/ folder.
The README there gives information on how to get started running a local development server.
No installation is required, simply navigate to https://stan-playground.flatironinstitute.org using a recent version of your favorite browser (tested in Chrome, Firefox, and Safari -- please let us know if you find a browser that does not work!).
That being said, it is of course possible to run both the backend and website locally and get the same set of features.
If you'd like to run a local compilation server, consult the local compilation server documentation. The only dependency needed is Docker.
If you'd like to run a local copy of the website, consult the
instructions in the gui/ folder. The only dependency
needed to get started is Yarn.
Apache License 2.0
Center for Computational Mathematics, Flatiron Institute