Category Archives: TidyX Screen Cast

TidyX 74: Joins in SQL vs Local R Environment

This week, Ellis Hughes and I continue our SQL in R series by discussing an important database task, joining two tables. Some of the things we cover:

  • The different types of joins (LEFT JOIN, RIGHT JOIN, FULL JOIN, INNER JOIN, and ANTI JOIN)
  • Doing a JOIN using SQL versus the local R environment and when you might choose one over the other
  • Using the {microbenchmark} package to test which query is faster and performing optimally
  • Finally, if you’d like more explicit info on creating JOINS in R, I wrote a blog post a little over a year ago that covers this topic in more detail, CLICK HERE.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.

 

 

TidyX 73: Update Shiny Automatically When the Database Changes

Continuing with our work on accessing a SQL database via R, Ellis Hughes and I deal with one of the more commonly faced problems — getting your {shiny} app to automatically update when something in the database changes!

We walk through setting up the {shiny} server so that it checks the database for any new data, pulls the new data and automatically refreshes the {shiny} app without disturbing whatever the user is looking at. This set up will ensure that your end users are always viewing the most up to date data in your system.

To watch the screen cast, CLICK HERE.

To access our code, CLICK HERE.