Category Archives: TidyX Screen Cast

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.

TidyX 70: Getting Started with SQL Databases in R — dbplyr

This week, Ellis Hughes and I kick off a new series discussing the use of SQL databases in R.

In this episode we cover a simple way to use R, more specifically the dbplyr package, to build your own SQLite database, add tables to the database, and query the database using tidyverse instead of SQL syntax.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.

TidyX 68: Cleaning Messy Data, Part 5 – Writing Results to an External File

For the last 4 screen casts, Ellis Hughes and I have been showing methods of cleaning messy excel data. Now that you have the data cleaned and structured in a data frame, you might need to write that data back out to an external file. Perhaps you need to save it as a csv and upload it to a database or maybe you want to write it out to a cleaner excel file that has the data in an accessible manner for your end users.

This week, we will write our cleaned data out to csv and excel in four formats:

  1. Write to csv
  2. Write the flat file out to a single excel sheet
  3. Write the flat file out to individual athlete tabs within an excel sheet
  4. Write the flat file out to individual athlete tabs within an excel sheet along with a bunch of custom excel formatting, available via the {openxlsx} package.

To watch the screen cast, CLICK HERE.

To access our code, CLICK HERE.