Global AI and Data Science

 View Only

Shiny: A data scientist’s best friend

By JORGE CASTANON posted Wed April 17, 2019 01:08 PM

  

One of the most important skills for any data scientist is the ability to clearly communicate results to a general audience. These are the people who need to understand the insights in order to take further action. Unfortunately, too many data science projects are bogged down in math and computation that are indecipherable the general reader. This is why tools like Shiny are quickly becoming every data scientist’s best friend.



Shiny

Shiny is an R package for developing interactive web apps. A few of its benefits:

  1. Diversity. You can communicate results via interactive charts, visualizations, text, or tables.
  2. Ease-of-use. If you already know R, you can rapidly develop a cool Shiny app. Check out this excellent tutorial to quickly learn the core concepts.
  3. Share-ability. Built-in capabilities let you share your work easily with colleagues and friends.
  4. Design. Even the default display for Shiny apps is elegant and intuitive.

To convince you, let me show you two examples. To run these examples on your own Watson Studio account (creating an account is free), check out these instructions.

Car accident predictions based on weather

To predict car accidents in New York City, my team and I built a model that we trained on historical data of car accidents as well as IBM’s weather data. We used weather conditions per zip code as features to train a logistic regression with Spark that outputs the probability of car accidents for specific areas, dates, and times. Here’s a screenshot of the Shiny app that displays the results within an interactive map:


Planning your next vacation

I decided to keep experimenting with travel data, but jumped from cars to planes. Specifically, I decided to build a Shiny app that lets users explore the average flight arrival delays (in minutes) for each airport in the US. Interactive features let users explore the predictions by month and year, and let users view additional data like the airport name, code, state, city and average delay. In the screenshot below, the size of the bubbles correlates to the volume of flights for each airport. A negative average delay indicates that flights typically arrive ahead of schedule.




Would you like to build your own shiny?

Those are just two projects that Shiny helped us bring to bear. And we’ve got more in the pipeline, which I’ll share soon. In the meantime, I encourage you to jump in. Again, follow these instructions to run the Shiny examples (and more) using Watson Studio.


Jorge Castañón, Ph.D.
--
Twitter: @castanan | LinkedIn: @jorgecasta | Medium: @jorge_castanon




#GlobalAIandDataScience
#GlobalDataScience
2 comments
33 views

Permalink

Comments

Sun April 28, 2019 03:06 PM

I will immediately start to try these examples !

Mon April 22, 2019 02:33 AM

Thanks for discussed about another really useful package. i am new for Data Science. thank to give the idea about shiny.