How LDA Works, Using Shiny for Python
Shiny
Python
A small Shiny for Python app exploring how LDA works
After learning about Shiny for Python đ in the last Posit PBC conference, I finally got around to implementing my first shiny dashboard in Python.
And I must say - I absolutely love it.
Here are some first impressions:
- â If youâre already a Shiny developer in R, the barrier to entry is very low. Posit have written some excellent documentation, and you wonât have any trouble getting your app running in Python.
- Reactive values, observe events are created using decorators instead of functions like in R
- I love how readable the UI and server bits of the code are; though this could just be my preference for how clean & readable Python code is compared to other languages
- đ It is important to understand mutability in Python objects, and adjust your mental model of objects, especially if youâre coming from a R-first paradigm. I spent way too much time trying to figure out why something simple wouldnât work, till I realized I was modifying a variable in place. Fortunately, Posit has an excellent page documenting this.
- đ¸ Shiny for Python is brand new, and quite a work in progress. There isnât the ecosystem of packages for Python as there is for R today. But, I suspect itâs only a matter of time.
- With the app running live in VSCode, I loved the live preview on save. It made development a breeze.