Skip to main content

Pretty Good Hat

Tag: shiny

Peloton instructor Cody Rigsby standing in a bicycle and smiling, in the background of text describing a ride. The ride is titled 2000s Ride and shows a graph of time in different heart rate zones.

This morning’s ride was a good start to a busy Sunday. I also got to test out my custom little Shiny app for building nice little shareable images with the Peloton API!

The launch of the new Destiny 2 expansion, Nightfall, adds a new subclass – Strand – and restructures the mod system that affects player stats gained from armor. I’m happy to report that it only took me a couple of hours to revise my Shiny tool to find optimal armor loadouts using the new mods and subclass fragments! I had to hunt a little through some old code, and next time it should be a simple and easy update due to having fixed how I work with the manifest.

A bright yellow background highlights bold text showing my favorite new-to-my artists this year: Big Thief, Low, Japanese Breakfast, Alvvays, and Courtney Marie Andrews. The hashtag at the bottom of the image reads #tuneR.

A heatmap showing calendar days through twelve months, with light yellow showing ‘light’ listening days shading to purple for the heavist days where I listened to the most music. I listened to a lot of music in Januar, July, October and November.

I dusted off the last.fm data visualizer that I started working on last year around this time. This year I built a couple of fun Spotify-wrapped-like visualizations; why should Spotify users have all the fun?

If you’re a last.fm user, you can try it, too! TuneR is a small Shiny app that you can provide your last.fm username and see your year in music, a comparison of this year to your all-time most-listened artists, and a fun heatmap of your listening activity.

Got nginx running on my MacBook today, as part of building some working-with-APIs-infrastructure for a small tutorial I want to write on working with oauth in Shiny. Good step!

Two windows from the RStudio profvis tool, showing the times of several procesess. The second window shows the same process being completed dramatically more quickly than the first.

I used the RStudio tool profvis this weekend to find speed improvement opportunities in Armorer. I suspected that I could rewrite a big operation that calculates the maximum of many columns across several thousand rows. Holy smokes: Using matrixStats::rowMaxs cuts processing time by an amazing amount!

Screenshot of a web application showing two items selected from a form field. They are circled in bright purple marker with an arrow pointing to them to draw the eye.

I finished a big update to Armorer this week, to enable inclusion of subclass fragments in stat calculations. I learned a ton with this release and laid good groundwork for additional mod management. I’m pretty pleased!

Super-pleased to see that a couple of small Shiny app improvements I made this weekend correctly picked up on some source data changes today and automatically handled them. Pretty cool!

I successfully made some small changes in a Shiny app to use the {pins} package to separate out a support file and data definitions from the app bundle itself. This lets me revise supporting information without needing to republish the app. It’s pretty cool! I’m excited to use the package lots more.

Sharing a quick tip that I’ve found useful while building with Shiny, recently: It’s handy to be able to save off the current state of a data set for bringing over to a scratch file. I made the download link appear only when running in my local environment. This way I can easily snapshot my in process data set for experimenting with visualization in my scratch file.

In ui.R:

    if(interactive()) {
      downloadLink("downloadData", "💾️ Download data set") 
    }

And in server.R:

    output$downloadData <- downloadHandler(
      filename = function() {
        paste("shiny-export_", Sys.Date(), ".csv", sep="")
      },
      content = function(file) {
        write.csv(globaldata$armor, file)
      }
    )