Interactive documentation

Ok, the catchy title is just to get people thinking creatively about this post. I did not build a streamlit app for interactive documentation… But I want to share a scenario where streamlit is proving useful as a supplement to Python package documentation.

As a maintainer of an open-source repository, kneed, users frequently ask me questions about which parameters they should use to identify the knee-point in their data. To answer these questions, I need to:

  1. request their data (if they didn’t provide it)
  2. plot their data with the desired knee-point
  3. email it back to them with an explanation of the parameters

With streamlit and streamlit share, I built an interactive app that allows users to input their data and explore the parameter space in real-time. Of course, I included links to the app in kneed’s README and documentation, so users should be directed to the app before emailing me directly. :slightly_smiling_face:

How many other repos could benefit from a streamlit implementation like this? I imagine most would, but word2vec and doc2vec come to mind. The difficult step for some projects is: creating a visual that generates a mental connection for the user between the parameter and the outcome.

I’m curious to hear people’s thoughts about efforts in making documentation more interactive. This is a new concept to me, but one I’d like to read more about.

5 Likes

Hey @Kevin_Arvai,

I think this is one of the very use cases where Streamlit absolutely shines, interactively showing how a parameter changes the outcome.

Just 2 days ago I built an app to study how changing parameters in aitextgen modified the nature of generated text (also I know the author has an issue on this).

I guess my years of teaching are in play there, students/users tend to remember and assimilate faster what they can play/interact with. I think a lot of Python librairies would benefit from a small explanatory Streamlit app.

So, if you can build and share Streamlit apps of any Python package that can be a little difficult to understand at first glance, I think that would help a lot of Python users :balloon:

@Marisa_Smith time to work on the PRs :laughing: (it’s a little joke I made)


Also you just made me thinking, could we extract code snippets in docstrings with pydoc to create an interactive documentation…hmmmmmm…anyway.


PS: I took the liberty to edit the link to the Streamlit Share app :wink: which wrongly linked to the GH project.

3 Likes

Hey @Kevin_Arvai!

It’s so interesting that you should bring this up, actually there are a few of us right now (@AustinC @randyzwitch) that are working on something very similar to this idea! I don’t want to ruin any surprises, but we are hoping to have something ready to show the community before the end of the year! :nerd_face: :star_struck: :stuck_out_tongue_winking_eye:

:shushing_face: you know how much Randy liked that idea! :rofl:

3 Likes

Hi @andfanilo,
Nice implementation with the aitextgen app! It’s definitely one of the libraries that benefit from this idea. Thanks for editing the link :wink:.

:eyes::eyes::eyes:
@Marisa_Smith ohhh, I’m excited for this news!

1 Like