Stan Playground: Stan without installing Stan

There have been a few new features in Stan Playground since the original post that I thought would be worth highlighting. Because the website is continually deployed, we don’t exactly have “releases”, so some of these have been available for quite some time:

Improvements to user scripting

We’ve improved our integration with pyodide and webR that allows users to run Python and R code directly in Stan Playground. These should be faster/smoother overall, and you can now cancel a script that is stuck rather than needing to refresh your page:

Additionally, the data scripts now give you an indicator in the data.json window when the values there originate from one of them:

Speaking of data.json, the analysis scripts can now read it:

Make sure to check the examples often, as we usually update them when new features become available.

Run scripts in the exported zip file

When your project has Python or R code and you go to export it, we now give you the option to include a run.py and/or run.R file

This file contains the “glue” code necessary to run your data generation and analysis code locally using CmdStanPy/R.

Scatter plots tab

We now provide some interactive scatter plots on a new tab of the Output viewer. This allows you to select different combinations of variables to scatter against each other:

Lots of tiny tweaks

The headers on the tables are now “sticky” and follow as you scroll, the page should load faster, compilation should be slightly quicker, the console text (including print statements) is also now viewable in its own tab, “Pedantic Mode” warnings can be enabled in settings, and more. Thank you to everyone who has used the site for providing feedback and suggestions!

5 Likes

Awesome!

Is it planned to give option on the Stan version to run?

We’ve discussed this. The public compilation server will probably track the latest release, but it would be nice if we gave some way of swapping out e.g. the stanc version used to give you red squigglies in the editor etc. This would both let you run different versions but also something like Torsten, which is the first thing @charlesm93 asked me about when I showed him this a while back. I got a version of torsten working inside it locally, but we never decided quite how to let users select these.

2 Likes

You read my mind. Again, great work!