Good workflow for getting samples from PyStan (python) into ShinyStan (R)?

Hi all,

I am using PyStan for a current project (most convenient, since I have python libraries for manipulating and analysing the DNA sequence data that I am working on here), running mostly from inside Jupyter notebooks. This is working really well for me, however I find that I am missing ShinyStan for monitoring convergence, diagnosing problems, and summarising analyses. I am therefore interested in finding the best way of getting my samples from python and into R.

I have experimented with using “R-magics” from inside the Jupyter notebook (inspired in part by a thread on the old Stan forum), but without success. I assume the best approach will be something like saving individual chains as csv-files, and then read these into R and then importing them into shinystan. I notice that there are threads that seem relevant for this problem (links below), but I was curious about whether someone here already has a well functioning workflow for this? Any pointers appreciated!


1 Like

I don’t know if @jonah or @ariddell are listening, but the former can explain ShinyStan and the latter PyStan.

Missed this question. Sorry.

I don’t think there’s an established workflow for this (or at least I haven’t seen one). You just need to get everything into R and into a format accepted by the as.shinystan function. If you’re successful definitely let us know and maybe we can use whatever worked for you as the recommended workflow.