Skip to content

flatironinstitute/stan-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Stan Playground logo

stan-playground

Run Stan models directly in your browser.

Visit the live site!

Overview

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.

Forum post: Stan Playground: Stan without installing Stan

Preparing links to existing models or projects

Stan Playground offers a built-in sharing feature which integrates with Github Gists. This feature provides an easy way to share your work with collaborators, students, forum users, and many other audiences.

Additionally, you can also prepare links which will pre-populate each portion of Stan Playground when clicked by using URL Parameters. For more information, see URL Parameters.

Compilation server setup

Most users will prefer to use the public server for compilation. However, if you want to set up your own compilation server, use the following instructions.

Compilation server setup

For developers

The source code for the frontend is in the gui folder. See the readme there.

The source code for the dockerized server is in the docker folder.

Notes

This project is based on stan-web-demo which shows how to use TinyStan to build a WebAssembly version of a Stan model that can be executed in the browser. While stan-web-demo focuses on integrating a specific Stan model into a website—essentially "baking" the model into the web environment—stan-playground is designed for a broader purpose. It offers a flexible platform for experimenting with and exploring various Stan models. This makes it ideal for users looking to test different statistical models and hypotheses directly in their browser, without the commitment to a single model implementation.

How is this different from the previous stan-playground?

License

Apache License 2.0

Authors

Center for Computational Mathematics, Flatiron Institute

About

Run Stan models in the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •