Hacker News new | ask | show | jobs
by mh12345 2614 days ago
R has a nice web development framework called Shiny. While it is not comparable to say Django or Flask, Shiny does make it incredibly easy to share data analysis. If one wants to share statistical analysis or create a data oriented dashboard, then there is definitely a reason to consider R and Shiny. Note that Python has Dash, which is comparable to Shiny, but it is less mature as far as I know.

While previously Shiny was primarily deployed through RStudio's solutions, there are now open source initiatives such as ShinyProxy, introducing Kubernetes as an option for deploying Shiny applications. The latest iterations of Shiny related libraries are facilitating automated testing and deployment. These developments allow companies to use Shiny in production, but it has to be said that the R ecosystem is not as developed as Python's from a traditional software development perspective.

4 comments

Dash by plotly is also amazing its like shiny but for python! - we were able to whip together an app that would let you drag and drop xyyy data and get a scatter plot instantly - you can try it here (first load takes 1-2s):

https://dash-app-dx9g2r0la6-8000.cloud.kyso.io

It was also really easy to make it, maybe 250 lines of python in total

(guide to making this app is here: https://kyso.io/KyleOS/creating-an-interactive-application-u...)

I'm not sure if there's a convent way in R Shiny to upload files using drag and drop, but otherwise this would be a dozen lines of code in R, at most. Shiny creates the plumbing and interactivity automatically.
I thought the Python equivalent to Shiny is Bokeh, see https://bokeh.pydata.org/en/latest/docs/gallery.html#gallery) ?
Yeah Bokeh is also excellent
I learned some R just so I could try out Shiny earlier -- Shiny is pretty awesome!

By Dash for Python, you mean the one from Plotly? https://plot.ly/products/dash/

Thank you for sharing ShinyProxy!

Indeed, the one from Plotly! I gave Dash a quick shot about a year ago, it worked quite well to generate interactive reports.

ShinyProxy is amazing. It is pretty easy to setup, but does require quite some specialized knowledge compared to the RStudio solutions.

This is one of the most fun comments I have read in a while: learn a bit of a language to check out the web dev framework behind it.

Awesome!

I maintain R and Shiny where I work. With Shiny, one can now build any web application imaginable, even a completely generic one.

R has such a huge library of software now, that it has gone far and wide outside of statistics and analytics - any kind of application can be built in R now.

In fact I see no point in using Python for mathematics or number crunching any more as R has it all and performance critical parts can be rewritten in modern Fortran for very high speed and made available inside of R transparently.

Sorry to be so blunt, but if you think R is comparable with Python on the web app side, you haven't built any moderately complex web apps. Shiny is fine for single-page reactive apps, but it's not a generic framework in the way that Django or Flask is.
I hate web frameworks, absolutely despise those horrible, over-complicated, bloated monstrosities. If writing for "Flask" or "Django" is considered an advantage, then I'm deeply glad I didn't fall for that garbage.
I suppose everyone using a web framework is just a rube, and that you alone have a monopoly on wisdom? Well, I take back my apology. Ignorance and arrogance together are not a good combination, but you possess both in spades.

As you gain experience building applications, at some point you'll learn that you were wrong. Or you won't, in which case I feel sorry for whoever inherits your reinvented-wheel codebase.

I won't, because I've been building applications for over 30 years; I know what's best, as I've had ample time to find out what works and what is sheer idiocy.

The various software I've written is small, fast, light, with minimal dependencies and it's easy to install because I deliver it as OS packages for the operating systems I support; my users tell me they are happy. The memory requirements are miniscule and the software lightning fast. Its size is measured in kilobytes, not megabytes or gigabytes, which means I must be doing something right. The manual pages often exceed the software in size and are brimming with examples. I pay extra attention to being backwards compatible when I implement changes and enhancements. Regressions are non-existent.

So I know I'm right and that using a bloated "framework" would have been one of the stupidest things I could have ever done.

As for re-inventing wheels, I use what comes with the OS and leverage what's already there; I've purposely not implemented any algorithm re-implementations of my own, although I easily could have. I'm neither dumb nor stupid to go re-inventing wheels, in fact that's one of the reasons why I hate webshits' frameworks. They don't call them webshit for no reason.

Shiny is fantastic! (Especially paired up with RStudio Connect)